Skip to content

Commit e2decb9

Browse files
Deprecate E0706
1 parent fc32ded commit e2decb9

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

compiler/rustc_ast_lowering/src/errors.rs

-11
Original file line numberDiff line numberDiff line change
@@ -354,17 +354,6 @@ pub struct InclusiveRangeWithNoEnd {
354354
pub span: Span,
355355
}
356356

357-
#[derive(Diagnostic, Clone, Copy)]
358-
#[diag(ast_lowering_trait_fn_async, code = "E0706")]
359-
#[note]
360-
#[note(ast_lowering_note2)]
361-
pub struct TraitFnAsync {
362-
#[primary_span]
363-
pub fn_span: Span,
364-
#[label]
365-
pub span: Span,
366-
}
367-
368357
#[derive(Diagnostic)]
369358
pub enum BadReturnTypeNotation {
370359
#[diag(ast_lowering_bad_return_type_notation_inputs)]

compiler/rustc_error_codes/src/error_codes/E0706.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
#### Note: this error code is no longer emitted by the compiler.
2+
13
`async fn`s are not yet supported in traits in Rust.
24

35
Erroneous code example:
46

5-
```compile_fail,edition2018
7+
```ignore,edition2018
68
trait T {
79
// Neither case is currently supported.
810
async fn foo() {}
@@ -13,7 +15,7 @@ trait T {
1315
`async fn`s return an `impl Future`, making the following two examples
1416
equivalent:
1517

16-
```edition2018,ignore (example-of-desugaring-equivalence)
18+
```ignore,edition2018 (example-of-desugaring-equivalence)
1719
async fn foo() -> User {
1820
unimplemented!()
1921
}

0 commit comments

Comments
 (0)