Skip to content

Commit

Permalink
Deprecate E0706
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Sep 13, 2023
1 parent fc32ded commit e2decb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
11 changes: 0 additions & 11 deletions compiler/rustc_ast_lowering/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,6 @@ pub struct InclusiveRangeWithNoEnd {
pub span: Span,
}

#[derive(Diagnostic, Clone, Copy)]
#[diag(ast_lowering_trait_fn_async, code = "E0706")]
#[note]
#[note(ast_lowering_note2)]
pub struct TraitFnAsync {
#[primary_span]
pub fn_span: Span,
#[label]
pub span: Span,
}

#[derive(Diagnostic)]
pub enum BadReturnTypeNotation {
#[diag(ast_lowering_bad_return_type_notation_inputs)]
Expand Down
6 changes: 4 additions & 2 deletions compiler/rustc_error_codes/src/error_codes/E0706.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#### Note: this error code is no longer emitted by the compiler.

`async fn`s are not yet supported in traits in Rust.

Erroneous code example:

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

```edition2018,ignore (example-of-desugaring-equivalence)
```ignore,edition2018 (example-of-desugaring-equivalence)
async fn foo() -> User {
unimplemented!()
}
Expand Down

0 comments on commit e2decb9

Please sign in to comment.