From e2decb908053fbca3520317b2ad9d0ecf42cc704 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Wed, 13 Sep 2023 19:32:02 +0000 Subject: [PATCH] Deprecate E0706 --- compiler/rustc_ast_lowering/src/errors.rs | 11 ----------- compiler/rustc_error_codes/src/error_codes/E0706.md | 6 ++++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_ast_lowering/src/errors.rs b/compiler/rustc_ast_lowering/src/errors.rs index a63bd4f8a0255..fe0c7d101c19c 100644 --- a/compiler/rustc_ast_lowering/src/errors.rs +++ b/compiler/rustc_ast_lowering/src/errors.rs @@ -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)] diff --git a/compiler/rustc_error_codes/src/error_codes/E0706.md b/compiler/rustc_error_codes/src/error_codes/E0706.md index fabd855a222f0..a09abb59ba8c9 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0706.md +++ b/compiler/rustc_error_codes/src/error_codes/E0706.md @@ -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() {} @@ -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!() }