From b0d47829489d44512c01868d6985cf1e86de3673 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 2 Aug 2019 03:44:00 +0200 Subject: [PATCH 1/4] Stabilize 'async_await'. --- src/librustc/error_codes.rs | 2 -- src/librustc_typeck/check/mod.rs | 2 -- src/librustc_typeck/error_codes.rs | 7 ++----- src/libstd/keyword_docs.rs | 2 -- src/libsyntax/feature_gate.rs | 19 ++----------------- 5 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/librustc/error_codes.rs b/src/librustc/error_codes.rs index b3eee7c346489..a200a058f4f99 100644 --- a/src/librustc/error_codes.rs +++ b/src/librustc/error_codes.rs @@ -2088,7 +2088,6 @@ generator can be constructed. Erroneous code example: ```edition2018,compile-fail,E0698 -#![feature(async_await)] async fn bar() -> () {} async fn foo() { @@ -2101,7 +2100,6 @@ To fix this you must bind `T` to a concrete type such as `String` so that a generator can then be constructed: ```edition2018 -#![feature(async_await)] async fn bar() -> () {} async fn foo() { diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index fc1ee649e287f..9c7ac83e82e97 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -4197,8 +4197,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { /// A possible error is to forget to add `.await` when using futures: /// /// ``` - /// #![feature(async_await)] - /// /// async fn make_u32() -> u32 { /// 22 /// } diff --git a/src/librustc_typeck/error_codes.rs b/src/librustc_typeck/error_codes.rs index ca9ce3d22b5cb..b52183d4b1b56 100644 --- a/src/librustc_typeck/error_codes.rs +++ b/src/librustc_typeck/error_codes.rs @@ -4751,7 +4751,6 @@ E0733: r##" Recursion in an `async fn` requires boxing. For example, this will not compile: ```edition2018,compile_fail,E0733 -#![feature(async_await)] async fn foo(n: usize) { if n > 0 { foo(n - 1).await; @@ -4763,12 +4762,11 @@ To achieve async recursion, the `async fn` needs to be desugared such that the `Future` is explicit in the return type: ```edition2018,compile_fail,E0720 -# #![feature(async_await)] use std::future::Future; -fn foo_desugered(n: usize) -> impl Future { +fn foo_desugared(n: usize) -> impl Future { async move { if n > 0 { - foo_desugered(n - 1).await; + foo_desugared(n - 1).await; } } } @@ -4777,7 +4775,6 @@ fn foo_desugered(n: usize) -> impl Future { Finally, the future is wrapped in a pinned box: ```edition2018 -# #![feature(async_await)] use std::future::Future; use std::pin::Pin; fn foo_recursive(n: usize) -> Pin>> { diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs index f5018485ef7bc..85a9dea09ed0d 100644 --- a/src/libstd/keyword_docs.rs +++ b/src/libstd/keyword_docs.rs @@ -984,7 +984,6 @@ mod where_keyword { } // 2018 Edition keywords -#[unstable(feature = "async_await", issue = "50547")] #[doc(keyword = "async")] // /// Return a [`Future`] instead of blocking the current thread. @@ -995,7 +994,6 @@ mod where_keyword { } /// [not yet complete]: https://github.com/rust-lang/rust/issues/34601 mod async_keyword { } -#[unstable(feature = "async_await", issue = "50547")] #[doc(keyword = "await")] // /// Suspend execution until the result of a [`Future`] is ready. diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index bbc3ae2822558..bce0b07db1c23 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -461,9 +461,6 @@ declare_features! ( // Allows using `#[doc(keyword = "...")]`. (active, doc_keyword, "1.28.0", Some(51315), None), - // Allows async and await syntax. - (active, async_await, "1.28.0", Some(50547), None), - // Allows reinterpretation of the bits of a value of one type as another type during const eval. (active, const_transmute, "1.29.0", Some(53605), None), @@ -857,6 +854,8 @@ declare_features! ( (accepted, repr_align_enum, "1.37.0", Some(57996), None), // Allows `const _: TYPE = VALUE`. (accepted, underscore_const_names, "1.37.0", Some(54912), None), + // Allows free and inherent `async fn`s, `async` blocks, and `.await` expressions. + (accepted, async_await, "1.38.0", Some(50547), None), // ------------------------------------------------------------------------- // feature-group-end: accepted features @@ -2100,12 +2099,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { "labels on blocks are unstable"); } } - ast::ExprKind::Async(..) => { - gate_feature_post!(&self, async_await, e.span, "async blocks are unstable"); - } - ast::ExprKind::Await(_) => { - gate_feature_post!(&self, async_await, e.span, "async/await is unstable"); - } _ => {} } visit::walk_expr(self, e) @@ -2154,11 +2147,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { span: Span, _node_id: NodeId) { if let Some(header) = fn_kind.header() { - // Check for const fn and async fn declarations. - if header.asyncness.node.is_async() { - gate_feature_post!(&self, async_await, span, "async fn is unstable"); - } - // Stability of const fn methods are covered in // `visit_trait_item` and `visit_impl_item` below; this is // because default methods don't pass through this point. @@ -2198,9 +2186,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { if block.is_none() { self.check_abi(sig.header.abi, ti.span); } - if sig.header.asyncness.node.is_async() { - gate_feature_post!(&self, async_await, ti.span, "async fn is unstable"); - } if sig.decl.c_variadic { gate_feature_post!(&self, c_variadic, ti.span, "C-variadic functions are unstable"); From 6a14411b7633ecaf70dc9ae0112678487a9b0d64 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 2 Aug 2019 03:45:29 +0200 Subject: [PATCH 2/4] Remove async_await feature gate tests. --- .../feature-gate-async-await-2015-edition.rs | 9 ---- ...ature-gate-async-await-2015-edition.stderr | 31 ------------- .../feature-gates/feature-gate-async-await.rs | 18 -------- .../feature-gate-async-await.stderr | 45 ------------------- 4 files changed, 103 deletions(-) delete mode 100644 src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr delete mode 100644 src/test/ui/feature-gates/feature-gate-async-await.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-async-await.stderr diff --git a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs deleted file mode 100644 index 801aeb82aa266..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.rs +++ /dev/null @@ -1,9 +0,0 @@ -// edition:2015 - -async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition - //~^ ERROR async fn is unstable - -fn main() { - let _ = async {}; //~ ERROR cannot find struct, variant or union type `async` - let _ = async || { true }; //~ ERROR cannot find value `async` in this scope -} diff --git a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr b/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr deleted file mode 100644 index 0157ed5534423..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-async-await-2015-edition.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/feature-gate-async-await-2015-edition.rs:3:1 - | -LL | async fn foo() {} - | ^^^^^ - -error[E0422]: cannot find struct, variant or union type `async` in this scope - --> $DIR/feature-gate-async-await-2015-edition.rs:7:13 - | -LL | let _ = async {}; - | ^^^^^ not found in this scope - -error[E0425]: cannot find value `async` in this scope - --> $DIR/feature-gate-async-await-2015-edition.rs:8:13 - | -LL | let _ = async || { true }; - | ^^^^^ not found in this scope - -error[E0658]: async fn is unstable - --> $DIR/feature-gate-async-await-2015-edition.rs:3:1 - | -LL | async fn foo() {} - | ^^^^^^^^^^^^^^^^^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/50547 - = help: add `#![feature(async_await)]` to the crate attributes to enable - -error: aborting due to 4 previous errors - -Some errors have detailed explanations: E0422, E0425, E0658, E0670. -For more information about an error, try `rustc --explain E0422`. diff --git a/src/test/ui/feature-gates/feature-gate-async-await.rs b/src/test/ui/feature-gates/feature-gate-async-await.rs deleted file mode 100644 index 78391c0e104cc..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-async-await.rs +++ /dev/null @@ -1,18 +0,0 @@ -// edition:2018 - -struct S; - -impl S { - async fn foo() {} //~ ERROR async fn is unstable -} - -trait T { - async fn foo(); //~ ERROR trait fns cannot be declared `async` - //~^ ERROR async fn is unstable -} - -async fn foo() {} //~ ERROR async fn is unstable - -fn main() { - let _ = async {}; //~ ERROR async blocks are unstable -} diff --git a/src/test/ui/feature-gates/feature-gate-async-await.stderr b/src/test/ui/feature-gates/feature-gate-async-await.stderr deleted file mode 100644 index 9f4a90157a495..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-async-await.stderr +++ /dev/null @@ -1,45 +0,0 @@ -error[E0706]: trait fns cannot be declared `async` - --> $DIR/feature-gate-async-await.rs:10:5 - | -LL | async fn foo(); - | ^^^^^^^^^^^^^^^ - -error[E0658]: async fn is unstable - --> $DIR/feature-gate-async-await.rs:6:5 - | -LL | async fn foo() {} - | ^^^^^^^^^^^^^^^^^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/50547 - = help: add `#![feature(async_await)]` to the crate attributes to enable - -error[E0658]: async fn is unstable - --> $DIR/feature-gate-async-await.rs:10:5 - | -LL | async fn foo(); - | ^^^^^^^^^^^^^^^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/50547 - = help: add `#![feature(async_await)]` to the crate attributes to enable - -error[E0658]: async fn is unstable - --> $DIR/feature-gate-async-await.rs:14:1 - | -LL | async fn foo() {} - | ^^^^^^^^^^^^^^^^^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/50547 - = help: add `#![feature(async_await)]` to the crate attributes to enable - -error[E0658]: async blocks are unstable - --> $DIR/feature-gate-async-await.rs:17:13 - | -LL | let _ = async {}; - | ^^^^^^^^ - | - = note: for more information, see https://github.com/rust-lang/rust/issues/50547 - = help: add `#![feature(async_await)]` to the crate attributes to enable - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0658`. From 228015acd29ceaaed815a0430da462648e44ea42 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 2 Aug 2019 03:45:58 +0200 Subject: [PATCH 3/4] Remove async_await gates from tests. --- src/test/rustdoc/async-fn.rs | 2 -- src/test/rustdoc/async-move-doctest.rs | 6 ++---- src/test/rustdoc/edition-flag.rs | 3 --- src/test/ui/async-await/argument-patterns.rs | 1 - src/test/ui/async-await/async-await.rs | 2 -- .../async-block-control-flow-static-semantics.rs | 2 -- src/test/ui/async-await/async-closure-matches-expr.rs | 2 +- src/test/ui/async-await/async-closure.rs | 2 +- src/test/ui/async-await/async-error-span.rs | 3 +-- .../async-await/async-fn-elided-impl-lifetime-parameter.rs | 2 -- src/test/ui/async-await/async-fn-nonsend.rs | 2 -- src/test/ui/async-await/async-fn-path-elision.rs | 3 --- src/test/ui/async-await/async-fn-send-uses-nonsend.rs | 2 -- src/test/ui/async-await/async-fn-size-moved-locals.rs | 2 -- src/test/ui/async-await/async-fn-size.rs | 2 -- src/test/ui/async-await/async-matches-expr.rs | 2 -- src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs | 2 -- src/test/ui/async-await/async-with-closure.rs | 2 -- .../await-keyword/2015-edition-error-various-positions.rs | 1 - .../2018-edition-error-in-non-macro-position.rs | 1 - .../await-keyword/incorrect-syntax-suggestions.rs | 2 -- src/test/ui/async-await/await-unsize.rs | 2 -- src/test/ui/async-await/bound-normalization.rs | 2 -- .../conditional-and-guaranteed-initialization.rs | 2 -- src/test/ui/async-await/dont-print-desugared-async.rs | 1 - src/test/ui/async-await/dont-suggest-missing-await.rs | 2 -- .../drop-order-for-async-fn-parameters-by-ref-binding.rs | 1 - .../drop-order/drop-order-for-async-fn-parameters.rs | 1 - .../drop-order/drop-order-for-locals-when-cancelled.rs | 2 -- .../async-await/drop-order/drop-order-locals-are-hidden.rs | 3 --- .../ui/async-await/drop-order/drop-order-when-cancelled.rs | 3 --- src/test/ui/async-await/edition-deny-async-fns-2015.rs | 2 -- src/test/ui/async-await/generics-and-bounds.rs | 2 -- src/test/ui/async-await/issue-60709.rs | 3 --- src/test/ui/async-await/issue-61452.rs | 1 - src/test/ui/async-await/issue-61793.rs | 3 --- src/test/ui/async-await/issue-61949-self-return-type.rs | 1 - src/test/ui/async-await/issue-62658.rs | 2 -- src/test/ui/async-await/issues/issue-51719.rs | 2 -- src/test/ui/async-await/issues/issue-51751.rs | 2 -- src/test/ui/async-await/issues/issue-53249.rs | 2 +- src/test/ui/async-await/issues/issue-54752-async-block.rs | 3 --- src/test/ui/async-await/issues/issue-54974.rs | 2 -- src/test/ui/async-await/issues/issue-55324.rs | 3 --- src/test/ui/async-await/issues/issue-55809.rs | 2 -- src/test/ui/async-await/issues/issue-58885.rs | 2 -- src/test/ui/async-await/issues/issue-59001.rs | 3 --- src/test/ui/async-await/issues/issue-59972.rs | 6 ------ src/test/ui/async-await/issues/issue-60518.rs | 2 -- .../ui/async-await/issues/issue-60655-latebound-regions.rs | 1 - src/test/ui/async-await/issues/issue-60674.rs | 1 - src/test/ui/async-await/issues/issue-61187.rs | 4 +--- src/test/ui/async-await/issues/issue-61986.rs | 2 -- src/test/ui/async-await/issues/issue-62009-1.rs | 2 -- src/test/ui/async-await/issues/issue-62009-2.rs | 2 +- src/test/ui/async-await/issues/issue-62517-1.rs | 2 -- src/test/ui/async-await/issues/issue-62517-2.rs | 2 -- src/test/ui/async-await/issues/issue-63388-1.rs | 2 -- src/test/ui/async-await/issues/issue-63388-2.rs | 2 -- src/test/ui/async-await/issues/issue-63388-3.rs | 2 -- src/test/ui/async-await/issues/issue-63388-4.rs | 2 -- src/test/ui/async-await/issues/non-async-enclosing-span.rs | 1 - .../ui/async-await/move-part-await-return-rest-struct.rs | 2 -- .../ui/async-await/move-part-await-return-rest-tuple.rs | 2 -- src/test/ui/async-await/multiple-lifetimes/elided.rs | 2 -- src/test/ui/async-await/multiple-lifetimes/fn-ptr.rs | 2 -- src/test/ui/async-await/multiple-lifetimes/hrtb.rs | 3 --- src/test/ui/async-await/multiple-lifetimes/named.rs | 2 -- .../ui/async-await/multiple-lifetimes/partial-relation.rs | 2 -- .../ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs | 2 +- .../async-await/multiple-lifetimes/ret-impl-trait-no-fg.rs | 2 -- .../ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs | 2 +- src/test/ui/async-await/multiple-lifetimes/ret-ref.rs | 2 -- src/test/ui/async-await/multiple-lifetimes/variance.rs | 3 --- src/test/ui/async-await/nested-in-impl.rs | 2 -- src/test/ui/async-await/no-args-non-move-async-closure.rs | 2 +- src/test/ui/async-await/no-async-const.rs | 2 -- src/test/ui/async-await/no-const-async.rs | 2 -- src/test/ui/async-await/no-move-across-await-struct.rs | 2 -- src/test/ui/async-await/no-move-across-await-tuple.rs | 2 -- src/test/ui/async-await/no-non-guaranteed-initialization.rs | 2 -- .../ui/async-await/partial-initialization-across-await.rs | 2 -- src/test/ui/async-await/recursive-async-impl-trait-type.rs | 2 -- src/test/ui/async-await/suggest-missing-await-closure.rs | 2 +- src/test/ui/async-await/suggest-missing-await.rs | 2 -- src/test/ui/async-await/unresolved_type_param.rs | 2 +- src/test/ui/drop/dynamic-drop-async.rs | 3 --- src/test/ui/generator/issue-61442-stmt-expr-with-drop.rs | 2 +- src/test/ui/generator/issue-62506-two_awaits.rs | 1 - src/test/ui/impl-trait/bound-normalization-fail.rs | 1 - src/test/ui/impl-trait/bound-normalization-pass.rs | 1 - src/test/ui/impl-trait/issue-55872-2.rs | 3 ++- .../cannot-infer-async-enabled-impl-trait-bindings.rs | 1 - src/test/ui/inference/cannot-infer-async.rs | 1 - src/test/ui/lint/lint-unused-mut-variables.rs | 2 +- src/test/ui/lint/lint-unused-variables.rs | 2 +- src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.rs | 2 +- src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs | 2 -- .../arbitrary_self_types_pin_lifetime_impl_trait-async.rs | 2 -- .../arbitrary_self_types_pin_lifetime_mismatch-async.rs | 2 -- src/test/ui/self/elision/alias-async.rs | 2 -- src/test/ui/self/elision/assoc-async.rs | 2 -- src/test/ui/self/elision/lt-alias-async.rs | 2 -- src/test/ui/self/elision/lt-assoc-async.rs | 2 -- src/test/ui/self/elision/lt-ref-self-async.rs | 2 -- src/test/ui/self/elision/lt-self-async.rs | 2 -- src/test/ui/self/elision/lt-struct-async.rs | 2 -- src/test/ui/self/elision/multiple-ref-self-async.rs | 2 -- src/test/ui/self/elision/ref-alias-async.rs | 2 -- src/test/ui/self/elision/ref-assoc-async.rs | 2 -- src/test/ui/self/elision/ref-mut-alias-async.rs | 1 - src/test/ui/self/elision/ref-mut-self-async.rs | 2 -- src/test/ui/self/elision/ref-mut-struct-async.rs | 2 -- src/test/ui/self/elision/ref-self-async.rs | 2 -- src/test/ui/self/elision/ref-struct-async.rs | 2 -- src/test/ui/self/elision/self-async.rs | 2 -- src/test/ui/self/elision/struct-async.rs | 2 -- src/test/ui/self/self_lifetime-async.rs | 2 -- 118 files changed, 19 insertions(+), 224 deletions(-) diff --git a/src/test/rustdoc/async-fn.rs b/src/test/rustdoc/async-fn.rs index 7384f7027d185..5f9708a39722a 100644 --- a/src/test/rustdoc/async-fn.rs +++ b/src/test/rustdoc/async-fn.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - // @has async_fn/fn.foo.html '//pre[@class="rust fn"]' 'pub async fn foo() -> Option' pub async fn foo() -> Option { None diff --git a/src/test/rustdoc/async-move-doctest.rs b/src/test/rustdoc/async-move-doctest.rs index 42723132782ca..2ba61388c9e3b 100644 --- a/src/test/rustdoc/async-move-doctest.rs +++ b/src/test/rustdoc/async-move-doctest.rs @@ -1,13 +1,11 @@ // compile-flags:--test // edition:2018 -// prior to setting the default edition for the doctest pre-parser, this doctest would fail due to -// a fatal parsing error +// Prior to setting the default edition for the doctest pre-parser, +// this doctest would fail due to a fatal parsing error. // see https://github.com/rust-lang/rust/issues/59313 //! ``` -//! #![feature(async_await)] -//! //! fn foo() { //! drop(async move {}); //! } diff --git a/src/test/rustdoc/edition-flag.rs b/src/test/rustdoc/edition-flag.rs index 5571245f28ddb..ddbc2be651d90 100644 --- a/src/test/rustdoc/edition-flag.rs +++ b/src/test/rustdoc/edition-flag.rs @@ -1,10 +1,7 @@ // compile-flags:--test -Z unstable-options // edition:2018 -#![feature(async_await)] - /// ```rust -/// #![feature(async_await)] /// fn main() { /// let _ = async { }; /// } diff --git a/src/test/ui/async-await/argument-patterns.rs b/src/test/ui/async-await/argument-patterns.rs index 3750c2bcb701a..0e42f48b8351e 100644 --- a/src/test/ui/async-await/argument-patterns.rs +++ b/src/test/ui/async-await/argument-patterns.rs @@ -3,7 +3,6 @@ #![allow(unused_variables)] #![deny(unused_mut)] -#![feature(async_await)] type A = Vec; diff --git a/src/test/ui/async-await/async-await.rs b/src/test/ui/async-await/async-await.rs index 8a15eb8c573b1..bf8bf0bcce0fe 100644 --- a/src/test/ui/async-await/async-await.rs +++ b/src/test/ui/async-await/async-await.rs @@ -3,8 +3,6 @@ // edition:2018 // aux-build:arc_wake.rs -#![feature(async_await)] - extern crate arc_wake; use std::pin::Pin; diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.rs b/src/test/ui/async-await/async-block-control-flow-static-semantics.rs index 4ddcdcac82282..90d75118f8e42 100644 --- a/src/test/ui/async-await/async-block-control-flow-static-semantics.rs +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.rs @@ -6,8 +6,6 @@ // edition:2018 // ignore-tidy-linelength -#![feature(async_await)] - fn main() {} use core::future::Future; diff --git a/src/test/ui/async-await/async-closure-matches-expr.rs b/src/test/ui/async-await/async-closure-matches-expr.rs index 1c192a4d1d882..d82fbcdc5505b 100644 --- a/src/test/ui/async-await/async-closure-matches-expr.rs +++ b/src/test/ui/async-await/async-closure-matches-expr.rs @@ -1,7 +1,7 @@ // build-pass // edition:2018 -#![feature(async_await, async_closure)] +#![feature(async_closure)] macro_rules! match_expr { ($x:expr) => {} diff --git a/src/test/ui/async-await/async-closure.rs b/src/test/ui/async-await/async-closure.rs index 925b54b398517..9a24bd8c95439 100644 --- a/src/test/ui/async-await/async-closure.rs +++ b/src/test/ui/async-await/async-closure.rs @@ -3,7 +3,7 @@ // edition:2018 // aux-build:arc_wake.rs -#![feature(async_await, async_closure)] +#![feature(async_closure)] extern crate arc_wake; diff --git a/src/test/ui/async-await/async-error-span.rs b/src/test/ui/async-await/async-error-span.rs index d362348a3fddb..dec3ac0f68554 100644 --- a/src/test/ui/async-await/async-error-span.rs +++ b/src/test/ui/async-await/async-error-span.rs @@ -1,7 +1,6 @@ // edition:2018 -#![feature(async_await)] -// Regression test for issue #62382 +// Regression test for issue #62382. use std::future::Future; diff --git a/src/test/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs b/src/test/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs index 1cbc5133a07e6..1c369fd7415db 100644 --- a/src/test/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs +++ b/src/test/ui/async-await/async-fn-elided-impl-lifetime-parameter.rs @@ -6,8 +6,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - struct Foo<'a>(&'a u8); impl Foo<'_> { diff --git a/src/test/ui/async-await/async-fn-nonsend.rs b/src/test/ui/async-await/async-fn-nonsend.rs index 612c1e29d82bd..1f1bf4250eadf 100644 --- a/src/test/ui/async-await/async-fn-nonsend.rs +++ b/src/test/ui/async-await/async-fn-nonsend.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - use std::{ cell::RefCell, fmt::Debug, diff --git a/src/test/ui/async-await/async-fn-path-elision.rs b/src/test/ui/async-await/async-fn-path-elision.rs index 447e40dddd910..3f1f51c20ca0c 100644 --- a/src/test/ui/async-await/async-fn-path-elision.rs +++ b/src/test/ui/async-await/async-fn-path-elision.rs @@ -1,8 +1,5 @@ // edition:2018 -#![feature(async_await)] -#![allow(dead_code)] - struct HasLifetime<'a>(&'a bool); async fn error(lt: HasLifetime) { //~ ERROR implicit elided lifetime not allowed here diff --git a/src/test/ui/async-await/async-fn-send-uses-nonsend.rs b/src/test/ui/async-await/async-fn-send-uses-nonsend.rs index 5e1b8c6280b81..35d9cb15540d1 100644 --- a/src/test/ui/async-await/async-fn-send-uses-nonsend.rs +++ b/src/test/ui/async-await/async-fn-send-uses-nonsend.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - use std::{ cell::RefCell, fmt::Debug, diff --git a/src/test/ui/async-await/async-fn-size-moved-locals.rs b/src/test/ui/async-await/async-fn-size-moved-locals.rs index 30b59d037d512..3ffcbb58595eb 100644 --- a/src/test/ui/async-await/async-fn-size-moved-locals.rs +++ b/src/test/ui/async-await/async-fn-size-moved-locals.rs @@ -12,8 +12,6 @@ // edition:2018 -#![feature(async_await)] - use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/src/test/ui/async-await/async-fn-size.rs b/src/test/ui/async-await/async-fn-size.rs index c6b2ed13b0a8d..b5c94ecb71690 100644 --- a/src/test/ui/async-await/async-fn-size.rs +++ b/src/test/ui/async-await/async-fn-size.rs @@ -2,8 +2,6 @@ // aux-build:arc_wake.rs // edition:2018 -#![feature(async_await)] - extern crate arc_wake; use std::pin::Pin; diff --git a/src/test/ui/async-await/async-matches-expr.rs b/src/test/ui/async-await/async-matches-expr.rs index a6f0211e41f98..299faa0587bd5 100644 --- a/src/test/ui/async-await/async-matches-expr.rs +++ b/src/test/ui/async-await/async-matches-expr.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - macro_rules! match_expr { ($x:expr) => {} } diff --git a/src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs b/src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs index cb9156dcc6e58..ccc1b8553f071 100644 --- a/src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs +++ b/src/test/ui/async-await/async-unsafe-fn-call-in-safe.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - struct S; impl S { diff --git a/src/test/ui/async-await/async-with-closure.rs b/src/test/ui/async-await/async-with-closure.rs index f7dc874affd26..0b2255266753d 100644 --- a/src/test/ui/async-await/async-with-closure.rs +++ b/src/test/ui/async-await/async-with-closure.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - trait MyClosure { type Args; } diff --git a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs index 422a5a6394f8e..a3a20cb97e150 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs +++ b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.rs @@ -1,4 +1,3 @@ -#![feature(async_await)] #![allow(non_camel_case_types)] #![deny(keyword_idents)] diff --git a/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs b/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs index 92f3210ac89a3..5d85b0a243e03 100644 --- a/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs +++ b/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.rs @@ -1,7 +1,6 @@ // edition:2018 #![allow(non_camel_case_types)] -#![feature(async_await)] mod outer_mod { pub mod await { //~ ERROR expected identifier, found reserved keyword `await` diff --git a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs index 25da337c58798..22bcbb1064dd7 100644 --- a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs +++ b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - async fn bar() -> Result<(), ()> { Ok(()) } diff --git a/src/test/ui/async-await/await-unsize.rs b/src/test/ui/async-await/await-unsize.rs index d5e21257f4f7d..aa09d4bdf0883 100644 --- a/src/test/ui/async-await/await-unsize.rs +++ b/src/test/ui/async-await/await-unsize.rs @@ -3,8 +3,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - async fn make_boxed_object() -> Box { Box::new(()) as _ } diff --git a/src/test/ui/async-await/bound-normalization.rs b/src/test/ui/async-await/bound-normalization.rs index 8026350aaf2fb..5d260682f1d81 100644 --- a/src/test/ui/async-await/bound-normalization.rs +++ b/src/test/ui/async-await/bound-normalization.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - // See issue 60414 trait Trait { diff --git a/src/test/ui/async-await/conditional-and-guaranteed-initialization.rs b/src/test/ui/async-await/conditional-and-guaranteed-initialization.rs index a5947e7f71870..56f4cbbd190f8 100644 --- a/src/test/ui/async-await/conditional-and-guaranteed-initialization.rs +++ b/src/test/ui/async-await/conditional-and-guaranteed-initialization.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - async fn conditional_and_guaranteed_initialization(x: usize) -> usize { let y; if x > 5 { diff --git a/src/test/ui/async-await/dont-print-desugared-async.rs b/src/test/ui/async-await/dont-print-desugared-async.rs index 8150a260866b9..68341a24c4e5d 100644 --- a/src/test/ui/async-await/dont-print-desugared-async.rs +++ b/src/test/ui/async-await/dont-print-desugared-async.rs @@ -1,7 +1,6 @@ // Test that we don't show variables with from async fn desugaring // edition:2018 -#![feature(async_await)] async fn async_fn(&ref mut s: &[i32]) {} //~^ ERROR cannot borrow data in a `&` reference as mutable [E0596] diff --git a/src/test/ui/async-await/dont-suggest-missing-await.rs b/src/test/ui/async-await/dont-suggest-missing-await.rs index d551ef57985a1..a8e5b38ec1dd8 100644 --- a/src/test/ui/async-await/dont-suggest-missing-await.rs +++ b/src/test/ui/async-await/dont-suggest-missing-await.rs @@ -2,8 +2,6 @@ // This test ensures we don't make the suggestion in bodies that aren't `async`. -#![feature(async_await)] - fn take_u32(x: u32) {} async fn make_u32() -> u32 { diff --git a/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs b/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs index dfd8b2e361eef..9817d377a7886 100644 --- a/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs +++ b/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters-by-ref-binding.rs @@ -3,7 +3,6 @@ // run-pass #![allow(unused_variables)] -#![feature(async_await)] // Test that the drop order for parameters in a fn and async fn matches up. Also test that // parameters (used or unused) are not dropped until the async fn completes execution. diff --git a/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs b/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs index 2a74485afb450..00072786a50a7 100644 --- a/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs +++ b/src/test/ui/async-await/drop-order/drop-order-for-async-fn-parameters.rs @@ -3,7 +3,6 @@ // run-pass #![allow(unused_variables)] -#![feature(async_await)] // Test that the drop order for parameters in a fn and async fn matches up. Also test that // parameters (used or unused) are not dropped until the async fn completes execution. diff --git a/src/test/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs b/src/test/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs index db396d3957e13..5d020c9a52601 100644 --- a/src/test/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs +++ b/src/test/ui/async-await/drop-order/drop-order-for-locals-when-cancelled.rs @@ -2,9 +2,7 @@ // edition:2018 // run-pass -#![allow(unused_variables)] #![deny(dead_code)] -#![feature(async_await)] // Test that the drop order for locals in a fn and async fn matches up. extern crate arc_wake; diff --git a/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.rs b/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.rs index bcdb8878eb5d2..79dedb1ba285e 100644 --- a/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.rs +++ b/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.rs @@ -1,8 +1,5 @@ // edition:2018 -#![allow(unused_variables)] -#![feature(async_await)] - async fn foobar_async(x: u32, (a, _, _c): (u32, u32, u32), _: u32, _y: u32) { assert_eq!(__arg1, (1, 2, 3)); //~ ERROR cannot find value `__arg1` in this scope [E0425] assert_eq!(__arg2, 4); //~ ERROR cannot find value `__arg2` in this scope [E0425] diff --git a/src/test/ui/async-await/drop-order/drop-order-when-cancelled.rs b/src/test/ui/async-await/drop-order/drop-order-when-cancelled.rs index 410a623681db5..84fe79348c601 100644 --- a/src/test/ui/async-await/drop-order/drop-order-when-cancelled.rs +++ b/src/test/ui/async-await/drop-order/drop-order-when-cancelled.rs @@ -2,9 +2,6 @@ // edition:2018 // run-pass -#![allow(unused_variables)] -#![feature(async_await)] - // Test that the drop order for parameters in a fn and async fn matches up. Also test that // parameters (used or unused) are not dropped until the async fn is cancelled. // This file is mostly copy-pasted from drop-order-for-async-fn-parameters.rs diff --git a/src/test/ui/async-await/edition-deny-async-fns-2015.rs b/src/test/ui/async-await/edition-deny-async-fns-2015.rs index a5bc181015475..c85896150c29f 100644 --- a/src/test/ui/async-await/edition-deny-async-fns-2015.rs +++ b/src/test/ui/async-await/edition-deny-async-fns-2015.rs @@ -1,7 +1,5 @@ // edition:2015 -#![feature(async_await)] - async fn foo() {} //~ ERROR `async fn` is not permitted in the 2015 edition fn baz() { async fn foo() {} } //~ ERROR `async fn` is not permitted in the 2015 edition diff --git a/src/test/ui/async-await/generics-and-bounds.rs b/src/test/ui/async-await/generics-and-bounds.rs index 8b60f2f82f1d6..963b19b34a620 100644 --- a/src/test/ui/async-await/generics-and-bounds.rs +++ b/src/test/ui/async-await/generics-and-bounds.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - use std::future::Future; pub async fn simple_generic() {} diff --git a/src/test/ui/async-await/issue-60709.rs b/src/test/ui/async-await/issue-60709.rs index ad0b49fa4a219..9ee419c4a56fb 100644 --- a/src/test/ui/async-await/issue-60709.rs +++ b/src/test/ui/async-await/issue-60709.rs @@ -4,9 +4,6 @@ // run-pass -#![feature(async_await)] -#![allow(unused)] - use std::future::Future; use std::task::Poll; use std::task::Context; diff --git a/src/test/ui/async-await/issue-61452.rs b/src/test/ui/async-await/issue-61452.rs index 20b9b645daead..9381251ad6968 100644 --- a/src/test/ui/async-await/issue-61452.rs +++ b/src/test/ui/async-await/issue-61452.rs @@ -1,5 +1,4 @@ // edition:2018 -#![feature(async_await)] pub async fn f(x: Option) { x.take(); diff --git a/src/test/ui/async-await/issue-61793.rs b/src/test/ui/async-await/issue-61793.rs index a18fad8bb9150..f6084be916745 100644 --- a/src/test/ui/async-await/issue-61793.rs +++ b/src/test/ui/async-await/issue-61793.rs @@ -6,9 +6,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] -#![allow(unused)] - async fn foo(_: &(), _: F) {} fn main() { diff --git a/src/test/ui/async-await/issue-61949-self-return-type.rs b/src/test/ui/async-await/issue-61949-self-return-type.rs index c5a66d5d4a312..6a28c69193da0 100644 --- a/src/test/ui/async-await/issue-61949-self-return-type.rs +++ b/src/test/ui/async-await/issue-61949-self-return-type.rs @@ -1,6 +1,5 @@ // ignore-tidy-linelength // edition:2018 -#![feature(async_await)] // This test checks that `Self` is prohibited as a return type. See #61949 for context. diff --git a/src/test/ui/async-await/issue-62658.rs b/src/test/ui/async-await/issue-62658.rs index 90fbb47bffda8..d0af01e0c009f 100644 --- a/src/test/ui/async-await/issue-62658.rs +++ b/src/test/ui/async-await/issue-62658.rs @@ -4,8 +4,6 @@ // build-pass // edition:2018 -#![feature(async_await)] - async fn noop() {} async fn foo() { diff --git a/src/test/ui/async-await/issues/issue-51719.rs b/src/test/ui/async-await/issues/issue-51719.rs index 361a49c2774ec..09241f982aa8a 100644 --- a/src/test/ui/async-await/issues/issue-51719.rs +++ b/src/test/ui/async-await/issues/issue-51719.rs @@ -2,8 +2,6 @@ // // Tests that the .await syntax can't be used to make a generator -#![feature(async_await)] - async fn foo() {} fn make_generator() { diff --git a/src/test/ui/async-await/issues/issue-51751.rs b/src/test/ui/async-await/issues/issue-51751.rs index 7afd7ecc82649..bc85a96cea99e 100644 --- a/src/test/ui/async-await/issues/issue-51751.rs +++ b/src/test/ui/async-await/issues/issue-51751.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - async fn inc(limit: i64) -> i64 { limit + 1 } diff --git a/src/test/ui/async-await/issues/issue-53249.rs b/src/test/ui/async-await/issues/issue-53249.rs index c57dc6b0ef6f9..5cae070444460 100644 --- a/src/test/ui/async-await/issues/issue-53249.rs +++ b/src/test/ui/async-await/issues/issue-53249.rs @@ -1,7 +1,7 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(arbitrary_self_types, async_await)] +#![feature(arbitrary_self_types)] use std::task::{self, Poll}; use std::future::Future; diff --git a/src/test/ui/async-await/issues/issue-54752-async-block.rs b/src/test/ui/async-await/issues/issue-54752-async-block.rs index 0036de90b2579..64f260cfe01b6 100644 --- a/src/test/ui/async-await/issues/issue-54752-async-block.rs +++ b/src/test/ui/async-await/issues/issue-54752-async-block.rs @@ -3,7 +3,4 @@ // edition:2018 // pp-exact -#![feature(async_await)] -#![allow(unused_parens)] - fn main() { let _a = (async { }); } diff --git a/src/test/ui/async-await/issues/issue-54974.rs b/src/test/ui/async-await/issues/issue-54974.rs index 040989b33fc1a..9adc0a8232388 100644 --- a/src/test/ui/async-await/issues/issue-54974.rs +++ b/src/test/ui/async-await/issues/issue-54974.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - use std::sync::Arc; trait SomeTrait: Send + Sync + 'static { diff --git a/src/test/ui/async-await/issues/issue-55324.rs b/src/test/ui/async-await/issues/issue-55324.rs index 4f383a51a88e7..1d77d420127a8 100644 --- a/src/test/ui/async-await/issues/issue-55324.rs +++ b/src/test/ui/async-await/issues/issue-55324.rs @@ -1,11 +1,8 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - use std::future::Future; -#[allow(unused)] async fn foo>(x: &i32, future: F) -> i32 { let y = future.await; *x + y diff --git a/src/test/ui/async-await/issues/issue-55809.rs b/src/test/ui/async-await/issues/issue-55809.rs index b7e60b773b416..3b271775a3851 100644 --- a/src/test/ui/async-await/issues/issue-55809.rs +++ b/src/test/ui/async-await/issues/issue-55809.rs @@ -1,8 +1,6 @@ // edition:2018 // run-pass -#![feature(async_await)] - trait Foo { } impl Foo for () { } diff --git a/src/test/ui/async-await/issues/issue-58885.rs b/src/test/ui/async-await/issues/issue-58885.rs index 47744aeea6034..72a45b5007d7a 100644 --- a/src/test/ui/async-await/issues/issue-58885.rs +++ b/src/test/ui/async-await/issues/issue-58885.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - struct Xyz { a: u64, } diff --git a/src/test/ui/async-await/issues/issue-59001.rs b/src/test/ui/async-await/issues/issue-59001.rs index 9334ddb0af588..ea780d9f62214 100644 --- a/src/test/ui/async-await/issues/issue-59001.rs +++ b/src/test/ui/async-await/issues/issue-59001.rs @@ -1,11 +1,8 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - use std::future::Future; -#[allow(unused)] async fn enter<'a, F, R>(mut callback: F) where F: FnMut(&'a mut i32) -> R, diff --git a/src/test/ui/async-await/issues/issue-59972.rs b/src/test/ui/async-await/issues/issue-59972.rs index 8f4254b10ceaf..154226e8bb88f 100644 --- a/src/test/ui/async-await/issues/issue-59972.rs +++ b/src/test/ui/async-await/issues/issue-59972.rs @@ -6,8 +6,6 @@ // compile-flags: --edition=2018 -#![feature(async_await)] - pub enum Uninhabited { } fn uninhabited_async() -> Uninhabited { @@ -16,14 +14,12 @@ fn uninhabited_async() -> Uninhabited { async fn noop() { } -#[allow(unused)] async fn contains_never() { let error = uninhabited_async(); noop().await; let error2 = error; } -#[allow(unused)] async fn overlap_never() { let error1 = uninhabited_async(); noop().await; @@ -35,6 +31,4 @@ async fn overlap_never() { #[allow(unused_must_use)] fn main() { - contains_never(); - overlap_never(); } diff --git a/src/test/ui/async-await/issues/issue-60518.rs b/src/test/ui/async-await/issues/issue-60518.rs index e4bdc96511e3c..1ca051607518e 100644 --- a/src/test/ui/async-await/issues/issue-60518.rs +++ b/src/test/ui/async-await/issues/issue-60518.rs @@ -1,8 +1,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] - // This is a regression test to ensure that simple bindings (where replacement arguments aren't // created during async fn lowering) that have their DefId used during HIR lowering (such as impl // trait) are visited during def collection and thus have a DefId. diff --git a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs index 99213e64d16df..0d015e54f8b1c 100644 --- a/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs +++ b/src/test/ui/async-await/issues/issue-60655-latebound-regions.rs @@ -3,7 +3,6 @@ // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] #![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/src/test/ui/async-await/issues/issue-60674.rs b/src/test/ui/async-await/issues/issue-60674.rs index 99cdcbafc766f..c0e34a8df77a4 100644 --- a/src/test/ui/async-await/issues/issue-60674.rs +++ b/src/test/ui/async-await/issues/issue-60674.rs @@ -1,7 +1,6 @@ // aux-build:issue-60674.rs // build-pass (FIXME(62277): could be check-pass?) // edition:2018 -#![feature(async_await)] // This is a regression test that ensures that `mut` patterns are not lost when provided as input // to a proc macro. diff --git a/src/test/ui/async-await/issues/issue-61187.rs b/src/test/ui/async-await/issues/issue-61187.rs index 8b939b43b8bd4..8585a42511104 100644 --- a/src/test/ui/async-await/issues/issue-61187.rs +++ b/src/test/ui/async-await/issues/issue-61187.rs @@ -1,8 +1,6 @@ // edition:2018 -#![feature(async_await)] -fn main() { -} +fn main() {} async fn response(data: Vec) { data.reverse(); //~ ERROR E0596 diff --git a/src/test/ui/async-await/issues/issue-61986.rs b/src/test/ui/async-await/issues/issue-61986.rs index 77ecc47dfef12..879bc6912fce9 100644 --- a/src/test/ui/async-await/issues/issue-61986.rs +++ b/src/test/ui/async-await/issues/issue-61986.rs @@ -4,8 +4,6 @@ // Tests that we properly handle StorageDead/StorageLives for temporaries // created in async loop bodies. -#![feature(async_await)] - async fn bar() -> Option<()> { Some(()) } diff --git a/src/test/ui/async-await/issues/issue-62009-1.rs b/src/test/ui/async-await/issues/issue-62009-1.rs index ac6605bcefff9..3ee7ab2e9d12f 100644 --- a/src/test/ui/async-await/issues/issue-62009-1.rs +++ b/src/test/ui/async-await/issues/issue-62009-1.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - async fn print_dur() {} fn main() { diff --git a/src/test/ui/async-await/issues/issue-62009-2.rs b/src/test/ui/async-await/issues/issue-62009-2.rs index 52b62eaa9e0a7..cb7336e613422 100644 --- a/src/test/ui/async-await/issues/issue-62009-2.rs +++ b/src/test/ui/async-await/issues/issue-62009-2.rs @@ -1,6 +1,6 @@ // edition:2018 -#![feature(async_await, async_closure)] +#![feature(async_closure)] async fn print_dur() {} diff --git a/src/test/ui/async-await/issues/issue-62517-1.rs b/src/test/ui/async-await/issues/issue-62517-1.rs index 5955d9751afbb..4689ce36a78c0 100644 --- a/src/test/ui/async-await/issues/issue-62517-1.rs +++ b/src/test/ui/async-await/issues/issue-62517-1.rs @@ -5,8 +5,6 @@ // edition:2018 // check-pass -#![feature(async_await)] - trait FirstTrait {} trait SecondTrait { type Item: ?Sized; diff --git a/src/test/ui/async-await/issues/issue-62517-2.rs b/src/test/ui/async-await/issues/issue-62517-2.rs index 17fac408151ea..aaf28d6c132e3 100644 --- a/src/test/ui/async-await/issues/issue-62517-2.rs +++ b/src/test/ui/async-await/issues/issue-62517-2.rs @@ -5,8 +5,6 @@ // edition:2018 // check-pass -#![feature(async_await)] - trait Object {} trait Alpha {} diff --git a/src/test/ui/async-await/issues/issue-63388-1.rs b/src/test/ui/async-await/issues/issue-63388-1.rs index 80003b0d701f5..3cde5de219880 100644 --- a/src/test/ui/async-await/issues/issue-63388-1.rs +++ b/src/test/ui/async-await/issues/issue-63388-1.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - struct Xyz { a: u64, } diff --git a/src/test/ui/async-await/issues/issue-63388-2.rs b/src/test/ui/async-await/issues/issue-63388-2.rs index ca9bbef0d503d..73e7f25f97d0d 100644 --- a/src/test/ui/async-await/issues/issue-63388-2.rs +++ b/src/test/ui/async-await/issues/issue-63388-2.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - struct Xyz { a: u64, } diff --git a/src/test/ui/async-await/issues/issue-63388-3.rs b/src/test/ui/async-await/issues/issue-63388-3.rs index 05f23f95965b9..1a9822e02fa01 100644 --- a/src/test/ui/async-await/issues/issue-63388-3.rs +++ b/src/test/ui/async-await/issues/issue-63388-3.rs @@ -1,8 +1,6 @@ // edition:2018 // check-pass -#![feature(async_await)] - struct Xyz { a: u64, } diff --git a/src/test/ui/async-await/issues/issue-63388-4.rs b/src/test/ui/async-await/issues/issue-63388-4.rs index 0939242d7fc7a..58f9dacb3bcfa 100644 --- a/src/test/ui/async-await/issues/issue-63388-4.rs +++ b/src/test/ui/async-await/issues/issue-63388-4.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - struct A; impl A { diff --git a/src/test/ui/async-await/issues/non-async-enclosing-span.rs b/src/test/ui/async-await/issues/non-async-enclosing-span.rs index 838911d9b6e8f..d47c2137725d6 100644 --- a/src/test/ui/async-await/issues/non-async-enclosing-span.rs +++ b/src/test/ui/async-await/issues/non-async-enclosing-span.rs @@ -1,5 +1,4 @@ // edition:2018 -#![feature(async_await)] async fn do_the_thing() -> u8 { 8 diff --git a/src/test/ui/async-await/move-part-await-return-rest-struct.rs b/src/test/ui/async-await/move-part-await-return-rest-struct.rs index 9bd7a515cbdbf..39ea2aae563a4 100644 --- a/src/test/ui/async-await/move-part-await-return-rest-struct.rs +++ b/src/test/ui/async-await/move-part-await-return-rest-struct.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - struct Small { x: Vec, y: Vec, diff --git a/src/test/ui/async-await/move-part-await-return-rest-tuple.rs b/src/test/ui/async-await/move-part-await-return-rest-tuple.rs index 69eee855e7594..7b958b98b414f 100644 --- a/src/test/ui/async-await/move-part-await-return-rest-tuple.rs +++ b/src/test/ui/async-await/move-part-await-return-rest-tuple.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - async fn move_part_await_return_rest_tuple() -> Vec { let x = (vec![3], vec![4, 4]); drop(x.1); diff --git a/src/test/ui/async-await/multiple-lifetimes/elided.rs b/src/test/ui/async-await/multiple-lifetimes/elided.rs index 45f3170d4c309..8258e2eff521b 100644 --- a/src/test/ui/async-await/multiple-lifetimes/elided.rs +++ b/src/test/ui/async-await/multiple-lifetimes/elided.rs @@ -3,8 +3,6 @@ // Test that we can use async fns with multiple arbitrary lifetimes. -#![feature(async_await)] - async fn multiple_elided_lifetimes(_: &u8, _: &u8) {} fn main() { diff --git a/src/test/ui/async-await/multiple-lifetimes/fn-ptr.rs b/src/test/ui/async-await/multiple-lifetimes/fn-ptr.rs index a7254cee75526..3912b854747de 100644 --- a/src/test/ui/async-await/multiple-lifetimes/fn-ptr.rs +++ b/src/test/ui/async-await/multiple-lifetimes/fn-ptr.rs @@ -3,8 +3,6 @@ // Test that we can use async fns with multiple arbitrary lifetimes. -#![feature(async_await)] - async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8, _: fn(&u8)) {} fn gimme(_: &u8) { } diff --git a/src/test/ui/async-await/multiple-lifetimes/hrtb.rs b/src/test/ui/async-await/multiple-lifetimes/hrtb.rs index 589e260d084b2..31d0736ba63c8 100644 --- a/src/test/ui/async-await/multiple-lifetimes/hrtb.rs +++ b/src/test/ui/async-await/multiple-lifetimes/hrtb.rs @@ -3,9 +3,6 @@ // Test that we can use async fns with multiple arbitrary lifetimes. -#![feature(async_await)] -#![allow(dead_code)] - use std::ops::Add; async fn multiple_hrtb_and_single_named_lifetime_ok<'c>( diff --git a/src/test/ui/async-await/multiple-lifetimes/named.rs b/src/test/ui/async-await/multiple-lifetimes/named.rs index cd479e256b4e5..e8eb98102f478 100644 --- a/src/test/ui/async-await/multiple-lifetimes/named.rs +++ b/src/test/ui/async-await/multiple-lifetimes/named.rs @@ -3,8 +3,6 @@ // Test that we can use async fns with multiple arbitrary lifetimes. -#![feature(async_await)] - async fn multiple_named_lifetimes<'a, 'b>(_: &'a u8, _: &'b u8) {} fn main() { diff --git a/src/test/ui/async-await/multiple-lifetimes/partial-relation.rs b/src/test/ui/async-await/multiple-lifetimes/partial-relation.rs index 903c43950a5c4..02b105999f5bb 100644 --- a/src/test/ui/async-await/multiple-lifetimes/partial-relation.rs +++ b/src/test/ui/async-await/multiple-lifetimes/partial-relation.rs @@ -1,8 +1,6 @@ // edition:2018 // run-pass -#![feature(async_await)] - async fn lotsa_lifetimes<'a, 'b, 'c>(a: &'a u32, b: &'b u32, c: &'c u32) -> (&'a u32, &'b u32) where 'b: 'a { diff --git a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs index 08622311f7b1c..b901b61aa1898 100644 --- a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs +++ b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-fg.rs @@ -4,7 +4,7 @@ // Test that a feature gate is needed to use `impl Trait` as the // return type of an async. -#![feature(async_await, member_constraints)] +#![feature(member_constraints)] trait Trait<'a, 'b> { } impl Trait<'_, '_> for T { } diff --git a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.rs b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.rs index 08ecea4cc85fc..2c7a5cd378fc2 100644 --- a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.rs +++ b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.rs @@ -3,8 +3,6 @@ // Test that a feature gate is needed to use `impl Trait` as the // return type of an async. -#![feature(async_await)] - trait Trait<'a, 'b> { } impl Trait<'_, '_> for T { } diff --git a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs index e1b714652737f..babc90a5e96ad 100644 --- a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs +++ b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-one.rs @@ -3,7 +3,7 @@ // Test that a feature gate is needed to use `impl Trait` as the // return type of an async. -#![feature(async_await, member_constraints)] +#![feature(member_constraints)] trait Trait<'a> { } impl Trait<'_> for T { } diff --git a/src/test/ui/async-await/multiple-lifetimes/ret-ref.rs b/src/test/ui/async-await/multiple-lifetimes/ret-ref.rs index 98da90161e5fd..149c020f9cb9c 100644 --- a/src/test/ui/async-await/multiple-lifetimes/ret-ref.rs +++ b/src/test/ui/async-await/multiple-lifetimes/ret-ref.rs @@ -4,8 +4,6 @@ // function (which takes multiple lifetimes) only returns data from // one of them. -#![feature(async_await)] - async fn multiple_named_lifetimes<'a, 'b>(a: &'a u8, _: &'b u8) -> &'a u8 { a } diff --git a/src/test/ui/async-await/multiple-lifetimes/variance.rs b/src/test/ui/async-await/multiple-lifetimes/variance.rs index b52ad17d5631d..6ed8bef956a52 100644 --- a/src/test/ui/async-await/multiple-lifetimes/variance.rs +++ b/src/test/ui/async-await/multiple-lifetimes/variance.rs @@ -4,9 +4,6 @@ // Test for async fn where the parameters have distinct lifetime // parameters that appear in all possible variances. -#![feature(async_await)] - -#[allow(dead_code)] async fn lotsa_lifetimes<'a, 'b, 'c>(_: fn(&'a u8), _: fn(&'b u8) -> &'b u8, _: fn() -> &'c u8) { } fn take_any(_: &u8) { } diff --git a/src/test/ui/async-await/nested-in-impl.rs b/src/test/ui/async-await/nested-in-impl.rs index 3c82160595f1d..76ed827d5973e 100644 --- a/src/test/ui/async-await/nested-in-impl.rs +++ b/src/test/ui/async-await/nested-in-impl.rs @@ -4,8 +4,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - struct Foo<'a>(&'a ()); impl<'a> Foo<'a> { diff --git a/src/test/ui/async-await/no-args-non-move-async-closure.rs b/src/test/ui/async-await/no-args-non-move-async-closure.rs index 62d4b3fb6f23b..0ca50807f2626 100644 --- a/src/test/ui/async-await/no-args-non-move-async-closure.rs +++ b/src/test/ui/async-await/no-args-non-move-async-closure.rs @@ -1,6 +1,6 @@ // edition:2018 -#![feature(async_await, async_closure)] +#![feature(async_closure)] fn main() { let _ = async |x: u8| {}; diff --git a/src/test/ui/async-await/no-async-const.rs b/src/test/ui/async-await/no-async-const.rs index 1db314a5aa208..7a6eb498b2ee0 100644 --- a/src/test/ui/async-await/no-async-const.rs +++ b/src/test/ui/async-await/no-async-const.rs @@ -2,7 +2,5 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - pub async const fn x() {} //~^ ERROR expected one of `fn` or `unsafe`, found `const` diff --git a/src/test/ui/async-await/no-const-async.rs b/src/test/ui/async-await/no-const-async.rs index 9f09d2188c7c0..bd78a18a40ed9 100644 --- a/src/test/ui/async-await/no-const-async.rs +++ b/src/test/ui/async-await/no-const-async.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - pub const async fn x() {} //~^ ERROR expected identifier, found reserved keyword `async` //~^^ expected `:`, found keyword `fn` diff --git a/src/test/ui/async-await/no-move-across-await-struct.rs b/src/test/ui/async-await/no-move-across-await-struct.rs index 58e094708979c..bef477bd256ec 100644 --- a/src/test/ui/async-await/no-move-across-await-struct.rs +++ b/src/test/ui/async-await/no-move-across-await-struct.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - async fn no_move_across_await_struct() -> Vec { let s = Small { x: vec![31], y: vec![19, 1441] }; needs_vec(s.x).await; diff --git a/src/test/ui/async-await/no-move-across-await-tuple.rs b/src/test/ui/async-await/no-move-across-await-tuple.rs index 5d3ed3da1e316..565cbd7d5f4ae 100644 --- a/src/test/ui/async-await/no-move-across-await-tuple.rs +++ b/src/test/ui/async-await/no-move-across-await-tuple.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - async fn no_move_across_await_tuple() -> Vec { let x = (vec![3], vec![4, 4]); drop(x.1); diff --git a/src/test/ui/async-await/no-non-guaranteed-initialization.rs b/src/test/ui/async-await/no-non-guaranteed-initialization.rs index a916afb6b09b7..0afbf4cee1d3c 100644 --- a/src/test/ui/async-await/no-non-guaranteed-initialization.rs +++ b/src/test/ui/async-await/no-non-guaranteed-initialization.rs @@ -2,8 +2,6 @@ // edition:2018 // compile-flags: --crate-type lib -#![feature(async_await)] - async fn no_non_guaranteed_initialization(x: usize) -> usize { let y; if x > 5 { diff --git a/src/test/ui/async-await/partial-initialization-across-await.rs b/src/test/ui/async-await/partial-initialization-across-await.rs index 40f9f5202e77c..1785fb7f29947 100644 --- a/src/test/ui/async-await/partial-initialization-across-await.rs +++ b/src/test/ui/async-await/partial-initialization-across-await.rs @@ -3,8 +3,6 @@ // edition:2018 -#![feature(async_await)] - struct S { x: i32, y: i32 } struct T(i32, i32); diff --git a/src/test/ui/async-await/recursive-async-impl-trait-type.rs b/src/test/ui/async-await/recursive-async-impl-trait-type.rs index 54f3339870bda..aa7733194587d 100644 --- a/src/test/ui/async-await/recursive-async-impl-trait-type.rs +++ b/src/test/ui/async-await/recursive-async-impl-trait-type.rs @@ -2,8 +2,6 @@ // Test that impl trait does not allow creating recursive types that are // otherwise forbidden when using `async` and `await`. -#![feature(async_await)] - async fn recursive_async_function() -> () { //~ ERROR recursive_async_function().await; } diff --git a/src/test/ui/async-await/suggest-missing-await-closure.rs b/src/test/ui/async-await/suggest-missing-await-closure.rs index cb992a27bc1c6..18076a1516171 100644 --- a/src/test/ui/async-await/suggest-missing-await-closure.rs +++ b/src/test/ui/async-await/suggest-missing-await-closure.rs @@ -1,7 +1,7 @@ // edition:2018 // run-rustfix -#![feature(async_await, async_closure)] +#![feature(async_closure)] fn take_u32(_x: u32) {} diff --git a/src/test/ui/async-await/suggest-missing-await.rs b/src/test/ui/async-await/suggest-missing-await.rs index 2ca814fbb22b5..91abd44e65caf 100644 --- a/src/test/ui/async-await/suggest-missing-await.rs +++ b/src/test/ui/async-await/suggest-missing-await.rs @@ -1,8 +1,6 @@ // edition:2018 // run-rustfix -#![feature(async_await)] - fn take_u32(_x: u32) {} async fn make_u32() -> u32 { diff --git a/src/test/ui/async-await/unresolved_type_param.rs b/src/test/ui/async-await/unresolved_type_param.rs index 578d41fe0df0b..d8ea87d2775bd 100644 --- a/src/test/ui/async-await/unresolved_type_param.rs +++ b/src/test/ui/async-await/unresolved_type_param.rs @@ -2,7 +2,7 @@ // Error message should pinpoint the type parameter T as needing to be bound // (rather than give a general error message) // edition:2018 -#![feature(async_await)] + async fn bar() -> () {} async fn foo() { diff --git a/src/test/ui/drop/dynamic-drop-async.rs b/src/test/ui/drop/dynamic-drop-async.rs index f3f5c382275fe..79d09d1817601 100644 --- a/src/test/ui/drop/dynamic-drop-async.rs +++ b/src/test/ui/drop/dynamic-drop-async.rs @@ -7,10 +7,7 @@ // edition:2018 // ignore-wasm32-bare compiled with panic=abort by default -#![allow(unused_assignments)] -#![allow(unused_variables)] #![feature(slice_patterns)] -#![feature(async_await)] use std::{ cell::{Cell, RefCell}, diff --git a/src/test/ui/generator/issue-61442-stmt-expr-with-drop.rs b/src/test/ui/generator/issue-61442-stmt-expr-with-drop.rs index ce4642020f0f1..e3d19029348a5 100644 --- a/src/test/ui/generator/issue-61442-stmt-expr-with-drop.rs +++ b/src/test/ui/generator/issue-61442-stmt-expr-with-drop.rs @@ -4,7 +4,7 @@ // check-pass // edition:2018 -#![feature(async_await, generators, generator_trait)] +#![feature(generators, generator_trait)] use std::ops::Generator; diff --git a/src/test/ui/generator/issue-62506-two_awaits.rs b/src/test/ui/generator/issue-62506-two_awaits.rs index 774019b6a5bda..672e16b780d03 100644 --- a/src/test/ui/generator/issue-62506-two_awaits.rs +++ b/src/test/ui/generator/issue-62506-two_awaits.rs @@ -4,7 +4,6 @@ // check-pass // edition:2018 -#![feature(async_await)] use std::future::Future; pub trait T { diff --git a/src/test/ui/impl-trait/bound-normalization-fail.rs b/src/test/ui/impl-trait/bound-normalization-fail.rs index ce1550568c19d..235c1f80ef637 100644 --- a/src/test/ui/impl-trait/bound-normalization-fail.rs +++ b/src/test/ui/impl-trait/bound-normalization-fail.rs @@ -2,7 +2,6 @@ // ignore-tidy-linelength // edition:2018 -#![feature(async_await)] #![feature(impl_trait_in_bindings)] //~^ WARNING the feature `impl_trait_in_bindings` is incomplete diff --git a/src/test/ui/impl-trait/bound-normalization-pass.rs b/src/test/ui/impl-trait/bound-normalization-pass.rs index b0ed4be54b899..fff17667fdae1 100644 --- a/src/test/ui/impl-trait/bound-normalization-pass.rs +++ b/src/test/ui/impl-trait/bound-normalization-pass.rs @@ -1,7 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] #![feature(type_alias_impl_trait)] #![feature(impl_trait_in_bindings)] //~^ WARNING the feature `impl_trait_in_bindings` is incomplete diff --git a/src/test/ui/impl-trait/issue-55872-2.rs b/src/test/ui/impl-trait/issue-55872-2.rs index dfee20ca649de..1ca2e3d906510 100644 --- a/src/test/ui/impl-trait/issue-55872-2.rs +++ b/src/test/ui/impl-trait/issue-55872-2.rs @@ -1,6 +1,7 @@ // edition:2018 // ignore-tidy-linelength -#![feature(async_await, type_alias_impl_trait)] + +#![feature(type_alias_impl_trait)] pub trait Bar { type E: Copy; diff --git a/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.rs b/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.rs index 30ed5050433a6..7d75f254bfe75 100644 --- a/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.rs +++ b/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.rs @@ -1,5 +1,4 @@ // edition:2018 -#![feature(async_await)] #![feature(impl_trait_in_bindings)] //~^ WARN the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash diff --git a/src/test/ui/inference/cannot-infer-async.rs b/src/test/ui/inference/cannot-infer-async.rs index edc64276e7ce4..05f62f3d8cbc0 100644 --- a/src/test/ui/inference/cannot-infer-async.rs +++ b/src/test/ui/inference/cannot-infer-async.rs @@ -1,5 +1,4 @@ // edition:2018 -#![feature(async_await)] use std::io::Error; diff --git a/src/test/ui/lint/lint-unused-mut-variables.rs b/src/test/ui/lint/lint-unused-mut-variables.rs index 2957f93111051..f140546b04819 100644 --- a/src/test/ui/lint/lint-unused-mut-variables.rs +++ b/src/test/ui/lint/lint-unused-mut-variables.rs @@ -3,7 +3,7 @@ // Exercise the unused_mut attribute in some positive and negative cases #![deny(unused_mut)] -#![feature(async_await, async_closure, param_attrs)] +#![feature(async_closure, param_attrs)] async fn baz_async( mut a: i32, diff --git a/src/test/ui/lint/lint-unused-variables.rs b/src/test/ui/lint/lint-unused-variables.rs index a1660d2351123..06b818636f956 100644 --- a/src/test/ui/lint/lint-unused-variables.rs +++ b/src/test/ui/lint/lint-unused-variables.rs @@ -1,7 +1,7 @@ // compile-flags: --cfg something // edition:2018 -#![feature(async_await, async_closure, param_attrs)] +#![feature(async_closure, param_attrs)] #![deny(unused_variables)] async fn foo_async( diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.rs b/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.rs index 069332ffa255f..5ad6e23cf2a63 100644 --- a/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.rs +++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-cfg.rs @@ -1,7 +1,7 @@ // compile-flags: --cfg something // edition:2018 -#![feature(async_await, async_closure, param_attrs)] +#![feature(async_closure, param_attrs)] #![deny(unused_variables)] extern "C" { diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs index b853f88a96dde..f3474bc1f9f81 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - use std::pin::Pin; use std::task::{Context, Poll}; diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs index aecb82325c1f2..0afe631f1e3fc 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - use std::pin::Pin; struct Foo; diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs index 53ab75ee16bd0..f42337d534062 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - use std::pin::Pin; struct Foo; diff --git a/src/test/ui/self/elision/alias-async.rs b/src/test/ui/self/elision/alias-async.rs index 3d5b24a8946aa..9743c13909658 100644 --- a/src/test/ui/self/elision/alias-async.rs +++ b/src/test/ui/self/elision/alias-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/assoc-async.rs b/src/test/ui/self/elision/assoc-async.rs index 0f33f2887726c..fa5968de5acc2 100644 --- a/src/test/ui/self/elision/assoc-async.rs +++ b/src/test/ui/self/elision/assoc-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/lt-alias-async.rs b/src/test/ui/self/elision/lt-alias-async.rs index 5a8989f078ef3..cc5badaaa6ef6 100644 --- a/src/test/ui/self/elision/lt-alias-async.rs +++ b/src/test/ui/self/elision/lt-alias-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/lt-assoc-async.rs b/src/test/ui/self/elision/lt-assoc-async.rs index 98c9aa3b6c26a..f060800e4da52 100644 --- a/src/test/ui/self/elision/lt-assoc-async.rs +++ b/src/test/ui/self/elision/lt-assoc-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/lt-ref-self-async.rs b/src/test/ui/self/elision/lt-ref-self-async.rs index 79a4771978a8e..e3ca0c2e2dd9d 100644 --- a/src/test/ui/self/elision/lt-ref-self-async.rs +++ b/src/test/ui/self/elision/lt-ref-self-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/lt-self-async.rs b/src/test/ui/self/elision/lt-self-async.rs index 0202db8a63526..42647b82ef8e7 100644 --- a/src/test/ui/self/elision/lt-self-async.rs +++ b/src/test/ui/self/elision/lt-self-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/lt-struct-async.rs b/src/test/ui/self/elision/lt-struct-async.rs index c0fc63d423257..dc5a53b89d786 100644 --- a/src/test/ui/self/elision/lt-struct-async.rs +++ b/src/test/ui/self/elision/lt-struct-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/multiple-ref-self-async.rs b/src/test/ui/self/elision/multiple-ref-self-async.rs index eb8c25277e145..be073c6edbad5 100644 --- a/src/test/ui/self/elision/multiple-ref-self-async.rs +++ b/src/test/ui/self/elision/multiple-ref-self-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-alias-async.rs b/src/test/ui/self/elision/ref-alias-async.rs index acc4b2153ef66..4b02c2fd00c86 100644 --- a/src/test/ui/self/elision/ref-alias-async.rs +++ b/src/test/ui/self/elision/ref-alias-async.rs @@ -1,8 +1,6 @@ // edition:2018 // check-pass -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-assoc-async.rs b/src/test/ui/self/elision/ref-assoc-async.rs index a6b6cbd6da391..258e27b7cb3bc 100644 --- a/src/test/ui/self/elision/ref-assoc-async.rs +++ b/src/test/ui/self/elision/ref-assoc-async.rs @@ -1,8 +1,6 @@ // edition:2018 // check-pass -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-mut-alias-async.rs b/src/test/ui/self/elision/ref-mut-alias-async.rs index 873e92bc6d33e..5f9ccf3bc7f2b 100644 --- a/src/test/ui/self/elision/ref-mut-alias-async.rs +++ b/src/test/ui/self/elision/ref-mut-alias-async.rs @@ -1,7 +1,6 @@ // edition:2018 // check-pass -#![feature(async_await)] #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-mut-self-async.rs b/src/test/ui/self/elision/ref-mut-self-async.rs index a6bd9d693163e..2ca14800a7556 100644 --- a/src/test/ui/self/elision/ref-mut-self-async.rs +++ b/src/test/ui/self/elision/ref-mut-self-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-mut-struct-async.rs b/src/test/ui/self/elision/ref-mut-struct-async.rs index 7a89ef9596a37..a671116de2543 100644 --- a/src/test/ui/self/elision/ref-mut-struct-async.rs +++ b/src/test/ui/self/elision/ref-mut-struct-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-self-async.rs b/src/test/ui/self/elision/ref-self-async.rs index 5a5705d7e099b..06f3b127b216a 100644 --- a/src/test/ui/self/elision/ref-self-async.rs +++ b/src/test/ui/self/elision/ref-self-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/ref-struct-async.rs b/src/test/ui/self/elision/ref-struct-async.rs index f0410bbee906d..94eaeedc734ff 100644 --- a/src/test/ui/self/elision/ref-struct-async.rs +++ b/src/test/ui/self/elision/ref-struct-async.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/self-async.rs b/src/test/ui/self/elision/self-async.rs index d1dc050be0d1e..e1379bfaf2e49 100644 --- a/src/test/ui/self/elision/self-async.rs +++ b/src/test/ui/self/elision/self-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/elision/struct-async.rs b/src/test/ui/self/elision/struct-async.rs index f7c8591ebd31d..4a38a2164c82a 100644 --- a/src/test/ui/self/elision/struct-async.rs +++ b/src/test/ui/self/elision/struct-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - #![feature(arbitrary_self_types)] #![allow(non_snake_case)] diff --git a/src/test/ui/self/self_lifetime-async.rs b/src/test/ui/self/self_lifetime-async.rs index ec4c3d1522423..c3c6e56582d9f 100644 --- a/src/test/ui/self/self_lifetime-async.rs +++ b/src/test/ui/self/self_lifetime-async.rs @@ -1,8 +1,6 @@ // check-pass // edition:2018 -#![feature(async_await)] - struct Foo<'a>(&'a ()); impl<'a> Foo<'a> { async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 } From 21476e7d6ce80640ff39eb091584092076f13359 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Fri, 2 Aug 2019 03:48:43 +0200 Subject: [PATCH 4/4] --bless post no async_await gates in tests. --- ...block-control-flow-static-semantics.stderr | 16 ++--- .../ui/async-await/async-error-span.stderr | 4 +- .../ui/async-await/async-fn-nonsend.stderr | 32 ++++----- .../async-await/async-fn-path-elision.stderr | 2 +- .../async-unsafe-fn-call-in-safe.stderr | 8 +-- ...015-edition-error-various-positions.stderr | 22 +++--- ...edition-error-in-non-macro-position.stderr | 14 ++-- .../incorrect-syntax-suggestions.stderr | 70 +++++++++---------- .../dont-print-desugared-async.stderr | 2 +- .../dont-suggest-missing-await.stderr | 2 +- .../drop-order-locals-are-hidden.stderr | 8 +-- .../edition-deny-async-fns-2015.stderr | 20 +++--- src/test/ui/async-await/issue-61452.stderr | 4 +- .../issue-61949-self-return-type.stderr | 2 +- .../ui/async-await/issues/issue-51719.stderr | 2 +- .../ui/async-await/issues/issue-51751.stderr | 2 +- .../ui/async-await/issues/issue-61187.stderr | 2 +- .../async-await/issues/issue-62009-1.stderr | 12 ++-- .../issues/issue-63388-1.nll.stderr | 4 +- .../async-await/issues/issue-63388-1.stderr | 2 +- .../issues/issue-63388-2.nll.stderr | 2 +- .../async-await/issues/issue-63388-2.stderr | 10 +-- .../issues/non-async-enclosing-span.stderr | 2 +- .../ret-impl-trait-no-fg.stderr | 2 +- .../multiple-lifetimes/ret-ref.stderr | 6 +- src/test/ui/async-await/no-async-const.stderr | 2 +- src/test/ui/async-await/no-const-async.stderr | 4 +- .../no-move-across-await-struct.stderr | 2 +- .../no-move-across-await-tuple.stderr | 2 +- .../no-non-guaranteed-initialization.stderr | 2 +- ...partial-initialization-across-await.stderr | 6 +- .../recursive-async-impl-trait-type.stderr | 2 +- .../suggest-missing-await-closure.fixed | 2 +- .../async-await/suggest-missing-await.fixed | 2 - .../async-await/suggest-missing-await.stderr | 2 +- .../bound-normalization-fail.stderr | 8 +-- .../bound-normalization-pass.stderr | 2 +- src/test/ui/impl-trait/issue-55872-2.stderr | 4 +- ...r-async-enabled-impl-trait-bindings.stderr | 4 +- .../ui/inference/cannot-infer-async.stderr | 2 +- ...s_pin_lifetime_impl_trait-async.nll.stderr | 2 +- ...types_pin_lifetime_impl_trait-async.stderr | 8 +-- ...pes_pin_lifetime_mismatch-async.nll.stderr | 10 +-- ...f_types_pin_lifetime_mismatch-async.stderr | 6 +- .../self/elision/lt-ref-self-async.nll.stderr | 24 +++---- .../ui/self/elision/lt-ref-self-async.stderr | 12 ++-- .../elision/ref-mut-self-async.nll.stderr | 24 +++---- .../ui/self/elision/ref-mut-self-async.stderr | 12 ++-- .../elision/ref-mut-struct-async.nll.stderr | 20 +++--- .../self/elision/ref-mut-struct-async.stderr | 10 +-- .../ui/self/elision/ref-self-async.nll.stderr | 28 ++++---- .../ui/self/elision/ref-self-async.stderr | 14 ++-- .../self/elision/ref-struct-async.nll.stderr | 20 +++--- .../ui/self/elision/ref-struct-async.stderr | 10 +-- 54 files changed, 248 insertions(+), 250 deletions(-) diff --git a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr index a0a5ac63d8427..bc42a46ae1021 100644 --- a/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr +++ b/src/test/ui/async-await/async-block-control-flow-static-semantics.stderr @@ -1,17 +1,17 @@ error[E0267]: `break` inside of an async block - --> $DIR/async-block-control-flow-static-semantics.rs:35:9 + --> $DIR/async-block-control-flow-static-semantics.rs:33:9 | LL | break 0u8; | ^^^^^^^^^ cannot break inside of an async block error[E0267]: `break` inside of an async block - --> $DIR/async-block-control-flow-static-semantics.rs:42:13 + --> $DIR/async-block-control-flow-static-semantics.rs:40:13 | LL | break 0u8; | ^^^^^^^^^ cannot break inside of an async block error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:15:43 + --> $DIR/async-block-control-flow-static-semantics.rs:13:43 | LL | fn return_targets_async_block_not_fn() -> u8 { | --------------------------------- ^^ expected u8, found () @@ -22,7 +22,7 @@ LL | fn return_targets_async_block_not_fn() -> u8 { found type `()` error[E0271]: type mismatch resolving `::Output == ()` - --> $DIR/async-block-control-flow-static-semantics.rs:20:39 + --> $DIR/async-block-control-flow-static-semantics.rs:18:39 | LL | let _: &dyn Future = █ | ^^^^^^ expected u8, found () @@ -32,7 +32,7 @@ LL | let _: &dyn Future = █ = note: required for the cast to the object type `dyn std::future::Future` error[E0271]: type mismatch resolving `::Output == ()` - --> $DIR/async-block-control-flow-static-semantics.rs:29:39 + --> $DIR/async-block-control-flow-static-semantics.rs:27:39 | LL | let _: &dyn Future = █ | ^^^^^^ expected u8, found () @@ -42,7 +42,7 @@ LL | let _: &dyn Future = █ = note: required for the cast to the object type `dyn std::future::Future` error[E0271]: type mismatch resolving `::Output == u8` - --> $DIR/async-block-control-flow-static-semantics.rs:24:55 + --> $DIR/async-block-control-flow-static-semantics.rs:22:55 | LL | async fn return_targets_async_block_not_async_fn() -> u8 { | ^^ expected (), found u8 @@ -52,7 +52,7 @@ LL | async fn return_targets_async_block_not_async_fn() -> u8 { = note: the return type of a function must have a statically known size error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:50:44 + --> $DIR/async-block-control-flow-static-semantics.rs:48:44 | LL | fn rethrow_targets_async_block_not_fn() -> Result { | ---------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () @@ -63,7 +63,7 @@ LL | fn rethrow_targets_async_block_not_fn() -> Result { found type `()` error[E0308]: mismatched types - --> $DIR/async-block-control-flow-static-semantics.rs:59:50 + --> $DIR/async-block-control-flow-static-semantics.rs:57:50 | LL | fn rethrow_targets_async_block_not_async_fn() -> Result { | ---------------------------------------- ^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found () diff --git a/src/test/ui/async-await/async-error-span.stderr b/src/test/ui/async-await/async-error-span.stderr index bd8966b9c7d47..47441f5e4efce 100644 --- a/src/test/ui/async-await/async-error-span.stderr +++ b/src/test/ui/async-await/async-error-span.stderr @@ -1,11 +1,11 @@ error[E0698]: type inside `async` object must be known in this context - --> $DIR/async-error-span.rs:13:9 + --> $DIR/async-error-span.rs:12:9 | LL | let a; | ^ cannot infer type | note: the type is part of the `async` object because of this `await` - --> $DIR/async-error-span.rs:14:5 + --> $DIR/async-error-span.rs:13:5 | LL | get_future().await; | ^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/async-await/async-fn-nonsend.stderr b/src/test/ui/async-await/async-fn-nonsend.stderr index 7776a36a28f2b..6b4fff2dc6844 100644 --- a/src/test/ui/async-await/async-fn-nonsend.stderr +++ b/src/test/ui/async-await/async-fn-nonsend.stderr @@ -1,5 +1,5 @@ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely - --> $DIR/async-fn-nonsend.rs:52:5 + --> $DIR/async-fn-nonsend.rs:50:5 | LL | assert_send(local_dropped_before_await()); | ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely @@ -7,18 +7,18 @@ LL | assert_send(local_dropped_before_await()); = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` = note: required because it appears within the type `impl std::fmt::Debug` = note: required because it appears within the type `{impl std::fmt::Debug, impl std::future::Future, ()}` - = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:23:39: 28:2 {impl std::fmt::Debug, impl std::future::Future, ()}]` - = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:23:39: 28:2 {impl std::fmt::Debug, impl std::future::Future, ()}]>` + = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:21:39: 26:2 {impl std::fmt::Debug, impl std::future::Future, ()}]` + = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:21:39: 26:2 {impl std::fmt::Debug, impl std::future::Future, ()}]>` = note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future` note: required by `assert_send` - --> $DIR/async-fn-nonsend.rs:49:1 + --> $DIR/async-fn-nonsend.rs:47:1 | LL | fn assert_send(_: impl Send) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `std::rc::Rc<()>` cannot be sent between threads safely - --> $DIR/async-fn-nonsend.rs:54:5 + --> $DIR/async-fn-nonsend.rs:52:5 | LL | assert_send(non_send_temporary_in_match()); | ^^^^^^^^^^^ `std::rc::Rc<()>` cannot be sent between threads safely @@ -26,18 +26,18 @@ LL | assert_send(non_send_temporary_in_match()); = help: within `impl std::future::Future`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>` = note: required because it appears within the type `impl std::fmt::Debug` = note: required because it appears within the type `{fn(impl std::fmt::Debug) -> std::option::Option {std::option::Option::::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option, impl std::future::Future, ()}` - = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:30:40: 39:2 {fn(impl std::fmt::Debug) -> std::option::Option {std::option::Option::::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option, impl std::future::Future, ()}]` - = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:30:40: 39:2 {fn(impl std::fmt::Debug) -> std::option::Option {std::option::Option::::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option, impl std::future::Future, ()}]>` + = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:28:40: 37:2 {fn(impl std::fmt::Debug) -> std::option::Option {std::option::Option::::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option, impl std::future::Future, ()}]` + = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:28:40: 37:2 {fn(impl std::fmt::Debug) -> std::option::Option {std::option::Option::::Some}, fn() -> impl std::fmt::Debug {non_send}, impl std::fmt::Debug, std::option::Option, impl std::future::Future, ()}]>` = note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future` note: required by `assert_send` - --> $DIR/async-fn-nonsend.rs:49:1 + --> $DIR/async-fn-nonsend.rs:47:1 | LL | fn assert_send(_: impl Send) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `dyn std::fmt::Write` cannot be sent between threads safely - --> $DIR/async-fn-nonsend.rs:56:5 + --> $DIR/async-fn-nonsend.rs:54:5 | LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^ `dyn std::fmt::Write` cannot be sent between threads safely @@ -47,18 +47,18 @@ LL | assert_send(non_sync_with_method_call()); = note: required because it appears within the type `std::fmt::Formatter<'_>` = note: required because of the requirements on the impl of `std::marker::Send` for `&mut std::fmt::Formatter<'_>` = note: required because it appears within the type `for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}` - = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]` - = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>` + = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]` + = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>` = note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future` note: required by `assert_send` - --> $DIR/async-fn-nonsend.rs:49:1 + --> $DIR/async-fn-nonsend.rs:47:1 | LL | fn assert_send(_: impl Send) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0277]: `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely - --> $DIR/async-fn-nonsend.rs:56:5 + --> $DIR/async-fn-nonsend.rs:54:5 | LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^ `*mut (dyn std::ops::Fn() + 'static)` cannot be shared between threads safely @@ -72,12 +72,12 @@ LL | assert_send(non_sync_with_method_call()); = note: required because it appears within the type `std::fmt::Formatter<'_>` = note: required because of the requirements on the impl of `std::marker::Send` for `&mut std::fmt::Formatter<'_>` = note: required because it appears within the type `for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}` - = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]` - = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:41:38: 47:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>` + = note: required because it appears within the type `[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]` + = note: required because it appears within the type `std::future::GenFuture<[static generator@$DIR/async-fn-nonsend.rs:39:38: 45:2 for<'r, 's> {&'r mut std::fmt::Formatter<'s>, bool, impl std::future::Future, ()}]>` = note: required because it appears within the type `impl std::future::Future` = note: required because it appears within the type `impl std::future::Future` note: required by `assert_send` - --> $DIR/async-fn-nonsend.rs:49:1 + --> $DIR/async-fn-nonsend.rs:47:1 | LL | fn assert_send(_: impl Send) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/async-await/async-fn-path-elision.stderr b/src/test/ui/async-await/async-fn-path-elision.stderr index 3b311baba01de..9694742200ef0 100644 --- a/src/test/ui/async-await/async-fn-path-elision.stderr +++ b/src/test/ui/async-await/async-fn-path-elision.stderr @@ -1,5 +1,5 @@ error[E0726]: implicit elided lifetime not allowed here - --> $DIR/async-fn-path-elision.rs:8:20 + --> $DIR/async-fn-path-elision.rs:5:20 | LL | async fn error(lt: HasLifetime) { | ^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>` diff --git a/src/test/ui/async-await/async-unsafe-fn-call-in-safe.stderr b/src/test/ui/async-await/async-unsafe-fn-call-in-safe.stderr index d22413beecbcf..c95fe17348877 100644 --- a/src/test/ui/async-await/async-unsafe-fn-call-in-safe.stderr +++ b/src/test/ui/async-await/async-unsafe-fn-call-in-safe.stderr @@ -1,5 +1,5 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/async-unsafe-fn-call-in-safe.rs:14:5 + --> $DIR/async-unsafe-fn-call-in-safe.rs:12:5 | LL | S::f(); | ^^^^^^ call to unsafe function @@ -7,7 +7,7 @@ LL | S::f(); = note: consult the function's documentation for information on how to avoid undefined behavior error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/async-unsafe-fn-call-in-safe.rs:15:5 + --> $DIR/async-unsafe-fn-call-in-safe.rs:13:5 | LL | f(); | ^^^ call to unsafe function @@ -15,7 +15,7 @@ LL | f(); = note: consult the function's documentation for information on how to avoid undefined behavior error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/async-unsafe-fn-call-in-safe.rs:19:5 + --> $DIR/async-unsafe-fn-call-in-safe.rs:17:5 | LL | S::f(); | ^^^^^^ call to unsafe function @@ -23,7 +23,7 @@ LL | S::f(); = note: consult the function's documentation for information on how to avoid undefined behavior error[E0133]: call to unsafe function is unsafe and requires unsafe function or block - --> $DIR/async-unsafe-fn-call-in-safe.rs:20:5 + --> $DIR/async-unsafe-fn-call-in-safe.rs:18:5 | LL | f(); | ^^^ call to unsafe function diff --git a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr index 8af0110169ebd..f1a22cda51b21 100644 --- a/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr +++ b/src/test/ui/async-await/await-keyword/2015-edition-error-various-positions.stderr @@ -1,11 +1,11 @@ error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:6:13 + --> $DIR/2015-edition-error-various-positions.rs:5:13 | LL | pub mod await { | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` | note: lint level defined here - --> $DIR/2015-edition-error-various-positions.rs:3:9 + --> $DIR/2015-edition-error-various-positions.rs:2:9 | LL | #![deny(keyword_idents)] | ^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ LL | #![deny(keyword_idents)] = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:8:20 + --> $DIR/2015-edition-error-various-positions.rs:7:20 | LL | pub struct await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -22,7 +22,7 @@ LL | pub struct await; = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:12:16 + --> $DIR/2015-edition-error-various-positions.rs:11:16 | LL | use outer_mod::await::await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -31,7 +31,7 @@ LL | use outer_mod::await::await; = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:12:23 + --> $DIR/2015-edition-error-various-positions.rs:11:23 | LL | use outer_mod::await::await; | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -40,7 +40,7 @@ LL | use outer_mod::await::await; = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:17:14 + --> $DIR/2015-edition-error-various-positions.rs:16:14 | LL | struct Foo { await: () } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -49,7 +49,7 @@ LL | struct Foo { await: () } = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:21:15 + --> $DIR/2015-edition-error-various-positions.rs:20:15 | LL | impl Foo { fn await() {} } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -58,7 +58,7 @@ LL | impl Foo { fn await() {} } = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:25:14 + --> $DIR/2015-edition-error-various-positions.rs:24:14 | LL | macro_rules! await { | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -67,7 +67,7 @@ LL | macro_rules! await { = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:32:5 + --> $DIR/2015-edition-error-various-positions.rs:31:5 | LL | await!(); | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -76,7 +76,7 @@ LL | await!(); = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:35:11 + --> $DIR/2015-edition-error-various-positions.rs:34:11 | LL | match await { await => {} } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` @@ -85,7 +85,7 @@ LL | match await { await => {} } = note: for more information, see issue #49716 error: `await` is a keyword in the 2018 edition - --> $DIR/2015-edition-error-various-positions.rs:35:19 + --> $DIR/2015-edition-error-various-positions.rs:34:19 | LL | match await { await => {} } | ^^^^^ help: you can use a raw identifier to stay compatible: `r#await` diff --git a/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr b/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr index c4b82b29f0270..05f28d0a5b226 100644 --- a/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr +++ b/src/test/ui/async-await/await-keyword/2018-edition-error-in-non-macro-position.stderr @@ -1,5 +1,5 @@ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:7:13 + --> $DIR/2018-edition-error-in-non-macro-position.rs:6:13 | LL | pub mod await { | ^^^^^ expected identifier, found reserved keyword @@ -9,7 +9,7 @@ LL | pub mod r#await { | ^^^^^^^ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:8:20 + --> $DIR/2018-edition-error-in-non-macro-position.rs:7:20 | LL | pub struct await; | ^^^^^ expected identifier, found reserved keyword @@ -19,7 +19,7 @@ LL | pub struct r#await; | ^^^^^^^ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:11:22 + --> $DIR/2018-edition-error-in-non-macro-position.rs:10:22 | LL | use self::outer_mod::await::await; | ^^^^^ expected identifier, found reserved keyword @@ -29,7 +29,7 @@ LL | use self::outer_mod::r#await::await; | ^^^^^^^ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:11:29 + --> $DIR/2018-edition-error-in-non-macro-position.rs:10:29 | LL | use self::outer_mod::await::await; | ^^^^^ expected identifier, found reserved keyword @@ -39,7 +39,7 @@ LL | use self::outer_mod::await::r#await; | ^^^^^^^ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:14:14 + --> $DIR/2018-edition-error-in-non-macro-position.rs:13:14 | LL | struct Foo { await: () } | ^^^^^ expected identifier, found reserved keyword @@ -49,7 +49,7 @@ LL | struct Foo { r#await: () } | ^^^^^^^ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:17:15 + --> $DIR/2018-edition-error-in-non-macro-position.rs:16:15 | LL | impl Foo { fn await() {} } | ^^^^^ expected identifier, found reserved keyword @@ -59,7 +59,7 @@ LL | impl Foo { fn r#await() {} } | ^^^^^^^ error: expected identifier, found reserved keyword `await` - --> $DIR/2018-edition-error-in-non-macro-position.rs:20:14 + --> $DIR/2018-edition-error-in-non-macro-position.rs:19:14 | LL | macro_rules! await { | ^^^^^ expected identifier, found reserved keyword diff --git a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr index db86d3d5d03ba..7caa9f26bc2f8 100644 --- a/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr +++ b/src/test/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr @@ -1,119 +1,119 @@ error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:10:13 + --> $DIR/incorrect-syntax-suggestions.rs:8:13 | LL | let _ = await bar(); | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:14:13 + --> $DIR/incorrect-syntax-suggestions.rs:12:13 | LL | let _ = await? bar(); | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:18:13 + --> $DIR/incorrect-syntax-suggestions.rs:16:13 | LL | let _ = await bar()?; | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:23:13 + --> $DIR/incorrect-syntax-suggestions.rs:21:13 | LL | let _ = await { bar() }; | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:27:13 + --> $DIR/incorrect-syntax-suggestions.rs:25:13 | LL | let _ = await(bar()); | ^^^^^^^^^^^^ help: `await` is a postfix operation: `(bar()).await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:31:13 + --> $DIR/incorrect-syntax-suggestions.rs:29:13 | LL | let _ = await { bar() }?; | ^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ bar() }.await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:35:14 + --> $DIR/incorrect-syntax-suggestions.rs:33:14 | LL | let _ = (await bar())?; | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:39:24 + --> $DIR/incorrect-syntax-suggestions.rs:37:24 | LL | let _ = bar().await(); | ^^ help: `await` is not a method call, remove the parentheses error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:43:24 + --> $DIR/incorrect-syntax-suggestions.rs:41:24 | LL | let _ = bar().await()?; | ^^ help: `await` is not a method call, remove the parentheses error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:55:13 + --> $DIR/incorrect-syntax-suggestions.rs:53:13 | LL | let _ = await bar(); | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:60:13 + --> $DIR/incorrect-syntax-suggestions.rs:58:13 | LL | let _ = await? bar(); | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await?` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:65:13 + --> $DIR/incorrect-syntax-suggestions.rs:63:13 | LL | let _ = await bar()?; | ^^^^^^^^^^^^ help: `await` is a postfix operation: `bar()?.await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:70:14 + --> $DIR/incorrect-syntax-suggestions.rs:68:14 | LL | let _ = (await bar())?; | ^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:75:24 + --> $DIR/incorrect-syntax-suggestions.rs:73:24 | LL | let _ = bar().await(); | ^^ help: `await` is not a method call, remove the parentheses error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:80:24 + --> $DIR/incorrect-syntax-suggestions.rs:78:24 | LL | let _ = bar().await()?; | ^^ help: `await` is not a method call, remove the parentheses error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:108:13 + --> $DIR/incorrect-syntax-suggestions.rs:106:13 | LL | let _ = await!(bar()); | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:112:13 + --> $DIR/incorrect-syntax-suggestions.rs:110:13 | LL | let _ = await!(bar())?; | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:117:17 + --> $DIR/incorrect-syntax-suggestions.rs:115:17 | LL | let _ = await!(bar())?; | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:125:17 + --> $DIR/incorrect-syntax-suggestions.rs:123:17 | LL | let _ = await!(bar())?; | ^^^^^^^^^^^^^ help: `await` is a postfix operation: `bar().await` error: expected expression, found `=>` - --> $DIR/incorrect-syntax-suggestions.rs:133:25 + --> $DIR/incorrect-syntax-suggestions.rs:131:25 | LL | match await { await => () } | ----- ^^ expected expression @@ -121,13 +121,13 @@ LL | match await { await => () } | while parsing this incorrect await expression error: incorrect use of `await` - --> $DIR/incorrect-syntax-suggestions.rs:133:11 + --> $DIR/incorrect-syntax-suggestions.rs:131:11 | LL | match await { await => () } | ^^^^^^^^^^^^^^^^^^^^^ help: `await` is a postfix operation: `{ await => () }.await` error: expected one of `.`, `?`, `{`, or an operator, found `}` - --> $DIR/incorrect-syntax-suggestions.rs:136:1 + --> $DIR/incorrect-syntax-suggestions.rs:134:1 | LL | match await { await => () } | ----- - expected one of `.`, `?`, `{`, or an operator here @@ -138,7 +138,7 @@ LL | } | ^ unexpected token error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:55:13 + --> $DIR/incorrect-syntax-suggestions.rs:53:13 | LL | fn foo9() -> Result<(), ()> { | ---- this is not `async` @@ -146,7 +146,7 @@ LL | let _ = await bar(); | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:60:13 + --> $DIR/incorrect-syntax-suggestions.rs:58:13 | LL | fn foo10() -> Result<(), ()> { | ----- this is not `async` @@ -154,7 +154,7 @@ LL | let _ = await? bar(); | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:65:13 + --> $DIR/incorrect-syntax-suggestions.rs:63:13 | LL | fn foo11() -> Result<(), ()> { | ----- this is not `async` @@ -162,7 +162,7 @@ LL | let _ = await bar()?; | ^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:70:14 + --> $DIR/incorrect-syntax-suggestions.rs:68:14 | LL | fn foo12() -> Result<(), ()> { | ----- this is not `async` @@ -170,7 +170,7 @@ LL | let _ = (await bar())?; | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:75:13 + --> $DIR/incorrect-syntax-suggestions.rs:73:13 | LL | fn foo13() -> Result<(), ()> { | ----- this is not `async` @@ -178,7 +178,7 @@ LL | let _ = bar().await(); | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:80:13 + --> $DIR/incorrect-syntax-suggestions.rs:78:13 | LL | fn foo14() -> Result<(), ()> { | ----- this is not `async` @@ -186,7 +186,7 @@ LL | let _ = bar().await()?; | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:85:13 + --> $DIR/incorrect-syntax-suggestions.rs:83:13 | LL | fn foo15() -> Result<(), ()> { | ----- this is not `async` @@ -194,7 +194,7 @@ LL | let _ = bar().await; | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:89:13 + --> $DIR/incorrect-syntax-suggestions.rs:87:13 | LL | fn foo16() -> Result<(), ()> { | ----- this is not `async` @@ -202,7 +202,7 @@ LL | let _ = bar().await?; | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:94:17 + --> $DIR/incorrect-syntax-suggestions.rs:92:17 | LL | fn foo() -> Result<(), ()> { | --- this is not `async` @@ -210,7 +210,7 @@ LL | let _ = bar().await?; | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:101:17 + --> $DIR/incorrect-syntax-suggestions.rs:99:17 | LL | let foo = || { | -- this is not `async` @@ -218,7 +218,7 @@ LL | let _ = bar().await?; | ^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:117:17 + --> $DIR/incorrect-syntax-suggestions.rs:115:17 | LL | fn foo() -> Result<(), ()> { | --- this is not `async` @@ -226,7 +226,7 @@ LL | let _ = await!(bar())?; | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/incorrect-syntax-suggestions.rs:125:17 + --> $DIR/incorrect-syntax-suggestions.rs:123:17 | LL | let foo = || { | -- this is not `async` @@ -234,7 +234,7 @@ LL | let _ = await!(bar())?; | ^^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try` - --> $DIR/incorrect-syntax-suggestions.rs:18:19 + --> $DIR/incorrect-syntax-suggestions.rs:16:19 | LL | let _ = await bar()?; | ^^^^^^ the `?` operator cannot be applied to type `impl std::future::Future` diff --git a/src/test/ui/async-await/dont-print-desugared-async.stderr b/src/test/ui/async-await/dont-print-desugared-async.stderr index 47726ba65df98..2bf1e77f09b3f 100644 --- a/src/test/ui/async-await/dont-print-desugared-async.stderr +++ b/src/test/ui/async-await/dont-print-desugared-async.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow data in a `&` reference as mutable - --> $DIR/dont-print-desugared-async.rs:6:20 + --> $DIR/dont-print-desugared-async.rs:5:20 | LL | async fn async_fn(&ref mut s: &[i32]) {} | -^^^^^^^^^ diff --git a/src/test/ui/async-await/dont-suggest-missing-await.stderr b/src/test/ui/async-await/dont-suggest-missing-await.stderr index c60b0d1f30e80..c87e0bc221de7 100644 --- a/src/test/ui/async-await/dont-suggest-missing-await.stderr +++ b/src/test/ui/async-await/dont-suggest-missing-await.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/dont-suggest-missing-await.rs:16:18 + --> $DIR/dont-suggest-missing-await.rs:14:18 | LL | take_u32(x) | ^ expected u32, found opaque type diff --git a/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr b/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr index 484e1f4f4269e..aa04a613f47c1 100644 --- a/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr +++ b/src/test/ui/async-await/drop-order/drop-order-locals-are-hidden.stderr @@ -1,23 +1,23 @@ error[E0425]: cannot find value `__arg1` in this scope - --> $DIR/drop-order-locals-are-hidden.rs:7:16 + --> $DIR/drop-order-locals-are-hidden.rs:4:16 | LL | assert_eq!(__arg1, (1, 2, 3)); | ^^^^^^ not found in this scope error[E0425]: cannot find value `__arg2` in this scope - --> $DIR/drop-order-locals-are-hidden.rs:8:16 + --> $DIR/drop-order-locals-are-hidden.rs:5:16 | LL | assert_eq!(__arg2, 4); | ^^^^^^ not found in this scope error[E0425]: cannot find value `__arg0` in this scope - --> $DIR/drop-order-locals-are-hidden.rs:12:16 + --> $DIR/drop-order-locals-are-hidden.rs:9:16 | LL | assert_eq!(__arg0, 1); | ^^^^^^ not found in this scope error[E0425]: cannot find value `__arg1` in this scope - --> $DIR/drop-order-locals-are-hidden.rs:13:16 + --> $DIR/drop-order-locals-are-hidden.rs:10:16 | LL | assert_eq!(__arg1, 2); | ^^^^^^ not found in this scope diff --git a/src/test/ui/async-await/edition-deny-async-fns-2015.stderr b/src/test/ui/async-await/edition-deny-async-fns-2015.stderr index efb4462095d0d..d3f88af09d134 100644 --- a/src/test/ui/async-await/edition-deny-async-fns-2015.stderr +++ b/src/test/ui/async-await/edition-deny-async-fns-2015.stderr @@ -1,59 +1,59 @@ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:5:1 + --> $DIR/edition-deny-async-fns-2015.rs:3:1 | LL | async fn foo() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:7:12 + --> $DIR/edition-deny-async-fns-2015.rs:5:12 | LL | fn baz() { async fn foo() {} } | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:10:5 + --> $DIR/edition-deny-async-fns-2015.rs:8:5 | LL | async fn bar() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:9:1 + --> $DIR/edition-deny-async-fns-2015.rs:7:1 | LL | async fn async_baz() { | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:16:5 + --> $DIR/edition-deny-async-fns-2015.rs:14:5 | LL | async fn foo() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:20:5 + --> $DIR/edition-deny-async-fns-2015.rs:18:5 | LL | async fn foo() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:38:9 + --> $DIR/edition-deny-async-fns-2015.rs:36:9 | LL | async fn bar() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:28:9 + --> $DIR/edition-deny-async-fns-2015.rs:26:9 | LL | async fn foo() {} | ^^^^^ error[E0670]: `async fn` is not permitted in the 2015 edition - --> $DIR/edition-deny-async-fns-2015.rs:33:13 + --> $DIR/edition-deny-async-fns-2015.rs:31:13 | LL | async fn bar() {} | ^^^^^ error[E0706]: trait fns cannot be declared `async` - --> $DIR/edition-deny-async-fns-2015.rs:20:5 + --> $DIR/edition-deny-async-fns-2015.rs:18:5 | LL | async fn foo() {} | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/async-await/issue-61452.stderr b/src/test/ui/async-await/issue-61452.stderr index 742490d8de43c..5eb4b54871737 100644 --- a/src/test/ui/async-await/issue-61452.stderr +++ b/src/test/ui/async-await/issue-61452.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable - --> $DIR/issue-61452.rs:5:5 + --> $DIR/issue-61452.rs:4:5 | LL | pub async fn f(x: Option) { | - help: consider changing this to be mutable: `mut x` @@ -7,7 +7,7 @@ LL | x.take(); | ^ cannot borrow as mutable error[E0384]: cannot assign twice to immutable variable `x` - --> $DIR/issue-61452.rs:10:5 + --> $DIR/issue-61452.rs:9:5 | LL | pub async fn g(x: usize) { | - diff --git a/src/test/ui/async-await/issue-61949-self-return-type.stderr b/src/test/ui/async-await/issue-61949-self-return-type.stderr index a9ae544502d08..12fb77d8dd637 100644 --- a/src/test/ui/async-await/issue-61949-self-return-type.stderr +++ b/src/test/ui/async-await/issue-61949-self-return-type.stderr @@ -1,5 +1,5 @@ error: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope - --> $DIR/issue-61949-self-return-type.rs:12:40 + --> $DIR/issue-61949-self-return-type.rs:11:40 | LL | pub async fn new(_bar: &'a i32) -> Self { | ^^^^ diff --git a/src/test/ui/async-await/issues/issue-51719.stderr b/src/test/ui/async-await/issues/issue-51719.stderr index 2a9fb6cf0df6e..6c3c8889da7ce 100644 --- a/src/test/ui/async-await/issues/issue-51719.stderr +++ b/src/test/ui/async-await/issues/issue-51719.stderr @@ -1,5 +1,5 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-51719.rs:10:19 + --> $DIR/issue-51719.rs:8:19 | LL | let _gen = || foo().await; | -- ^^^^^^^^^^^ only allowed inside `async` functions and blocks diff --git a/src/test/ui/async-await/issues/issue-51751.stderr b/src/test/ui/async-await/issues/issue-51751.stderr index 97b63d1590ec6..e50c78534f852 100644 --- a/src/test/ui/async-await/issues/issue-51751.stderr +++ b/src/test/ui/async-await/issues/issue-51751.stderr @@ -1,5 +1,5 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-51751.rs:11:20 + --> $DIR/issue-51751.rs:9:20 | LL | fn main() { | ---- this is not `async` diff --git a/src/test/ui/async-await/issues/issue-61187.stderr b/src/test/ui/async-await/issues/issue-61187.stderr index a03142263202e..4d361c824dd6d 100644 --- a/src/test/ui/async-await/issues/issue-61187.stderr +++ b/src/test/ui/async-await/issues/issue-61187.stderr @@ -1,5 +1,5 @@ error[E0596]: cannot borrow `data` as mutable, as it is not declared as mutable - --> $DIR/issue-61187.rs:8:5 + --> $DIR/issue-61187.rs:6:5 | LL | async fn response(data: Vec) { | ---- help: consider changing this to be mutable: `mut data` diff --git a/src/test/ui/async-await/issues/issue-62009-1.stderr b/src/test/ui/async-await/issues/issue-62009-1.stderr index 2bbb6d079ead1..cd155f0fc32b6 100644 --- a/src/test/ui/async-await/issues/issue-62009-1.stderr +++ b/src/test/ui/async-await/issues/issue-62009-1.stderr @@ -1,5 +1,5 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-62009-1.rs:8:5 + --> $DIR/issue-62009-1.rs:6:5 | LL | fn main() { | ---- this is not `async` @@ -7,7 +7,7 @@ LL | async { let (); }.await; | ^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-62009-1.rs:10:5 + --> $DIR/issue-62009-1.rs:8:5 | LL | fn main() { | ---- this is not `async` @@ -19,7 +19,7 @@ LL | | }.await; | |___________^ only allowed inside `async` functions and blocks error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-62009-1.rs:14:5 + --> $DIR/issue-62009-1.rs:12:5 | LL | fn main() { | ---- this is not `async` @@ -27,11 +27,11 @@ LL | fn main() { LL | (|_| 2333).await; | ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks -error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]: std::future::Future` is not satisfied - --> $DIR/issue-62009-1.rs:14:5 +error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]: std::future::Future` is not satisfied + --> $DIR/issue-62009-1.rs:12:5 | LL | (|_| 2333).await; - | ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:14:5: 14:15]` + | ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` | = note: required by `std::future::poll_with_tls_context` diff --git a/src/test/ui/async-await/issues/issue-63388-1.nll.stderr b/src/test/ui/async-await/issues/issue-63388-1.nll.stderr index 64fd1a4a78d96..22610fe54a4cb 100644 --- a/src/test/ui/async-await/issues/issue-63388-1.nll.stderr +++ b/src/test/ui/async-await/issues/issue-63388-1.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/issue-63388-1.rs:14:10 + --> $DIR/issue-63388-1.rs:12:10 | LL | ) -> &dyn Foo | ^^^^^^^^ @@ -7,7 +7,7 @@ LL | ) -> &dyn Foo = note: hidden type `impl std::future::Future` captures lifetime '_#22r error: lifetime may not live long enough - --> $DIR/issue-63388-1.rs:15:5 + --> $DIR/issue-63388-1.rs:13:5 | LL | async fn do_sth<'a>( | -- lifetime `'a` defined here diff --git a/src/test/ui/async-await/issues/issue-63388-1.stderr b/src/test/ui/async-await/issues/issue-63388-1.stderr index 5302adce5a01e..a54cadb0cd251 100644 --- a/src/test/ui/async-await/issues/issue-63388-1.stderr +++ b/src/test/ui/async-await/issues/issue-63388-1.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/issue-63388-1.rs:14:10 + --> $DIR/issue-63388-1.rs:12:10 | LL | &'a self, foo: &dyn Foo | -------- this parameter and the return type are declared with different lifetimes... diff --git a/src/test/ui/async-await/issues/issue-63388-2.nll.stderr b/src/test/ui/async-await/issues/issue-63388-2.nll.stderr index b91cdc1b770fb..7781af89deae2 100644 --- a/src/test/ui/async-await/issues/issue-63388-2.nll.stderr +++ b/src/test/ui/async-await/issues/issue-63388-2.nll.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/issue-63388-2.rs:14:10 + --> $DIR/issue-63388-2.rs:12:10 | LL | ) -> &dyn Foo | ^ help: consider using the named lifetime: `&'a` diff --git a/src/test/ui/async-await/issues/issue-63388-2.stderr b/src/test/ui/async-await/issues/issue-63388-2.stderr index 1810138dc80e0..1edeb3d549389 100644 --- a/src/test/ui/async-await/issues/issue-63388-2.stderr +++ b/src/test/ui/async-await/issues/issue-63388-2.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/issue-63388-2.rs:14:10 + --> $DIR/issue-63388-2.rs:12:10 | LL | ) -> &dyn Foo | ^ help: consider using the named lifetime: `&'a` @@ -7,19 +7,19 @@ LL | ) -> &dyn Foo = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `foo` or `bar` error: cannot infer an appropriate lifetime - --> $DIR/issue-63388-2.rs:13:9 + --> $DIR/issue-63388-2.rs:11:9 | LL | foo: &dyn Foo, bar: &'a dyn Foo | ^^^ ...but this borrow... LL | ) -> &dyn Foo | -------- this return type evaluates to the `'static` lifetime... | -note: ...can't outlive the lifetime '_ as defined on the method body at 13:14 - --> $DIR/issue-63388-2.rs:13:14 +note: ...can't outlive the lifetime '_ as defined on the method body at 11:14 + --> $DIR/issue-63388-2.rs:11:14 | LL | foo: &dyn Foo, bar: &'a dyn Foo | ^ -help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 13:14 +help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 11:14 | LL | ) -> &dyn Foo + '_ | ^^^^^^^^^^^^^ diff --git a/src/test/ui/async-await/issues/non-async-enclosing-span.stderr b/src/test/ui/async-await/issues/non-async-enclosing-span.stderr index f492c1a8045b5..49ebf414c550b 100644 --- a/src/test/ui/async-await/issues/non-async-enclosing-span.stderr +++ b/src/test/ui/async-await/issues/non-async-enclosing-span.stderr @@ -1,5 +1,5 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/non-async-enclosing-span.rs:10:13 + --> $DIR/non-async-enclosing-span.rs:9:13 | LL | fn main() { | ---- this is not `async` diff --git a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.stderr b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.stderr index de2c85d772a72..59d7728d41c4c 100644 --- a/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.stderr +++ b/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.stderr @@ -1,5 +1,5 @@ error: ambiguous lifetime bound in `impl Trait` - --> $DIR/ret-impl-trait-no-fg.rs:11:64 + --> $DIR/ret-impl-trait-no-fg.rs:9:64 | LL | async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> { | ^^^^^^^^^^^^^^^^^^ neither `'a` nor `'b` outlives the other diff --git a/src/test/ui/async-await/multiple-lifetimes/ret-ref.stderr b/src/test/ui/async-await/multiple-lifetimes/ret-ref.stderr index fe70d35942c7c..d86e84033b8cd 100644 --- a/src/test/ui/async-await/multiple-lifetimes/ret-ref.stderr +++ b/src/test/ui/async-await/multiple-lifetimes/ret-ref.stderr @@ -1,5 +1,5 @@ error[E0506]: cannot assign to `a` because it is borrowed - --> $DIR/ret-ref.rs:18:5 + --> $DIR/ret-ref.rs:16:5 | LL | let future = multiple_named_lifetimes(&a, &b); | -- borrow of `a` occurs here @@ -10,7 +10,7 @@ LL | let p = future.await; | ------ borrow later used here error[E0506]: cannot assign to `b` because it is borrowed - --> $DIR/ret-ref.rs:19:5 + --> $DIR/ret-ref.rs:17:5 | LL | let future = multiple_named_lifetimes(&a, &b); | -- borrow of `b` occurs here @@ -21,7 +21,7 @@ LL | let p = future.await; | ------ borrow later used here error[E0506]: cannot assign to `a` because it is borrowed - --> $DIR/ret-ref.rs:30:5 + --> $DIR/ret-ref.rs:28:5 | LL | let future = multiple_named_lifetimes(&a, &b); | -- borrow of `a` occurs here diff --git a/src/test/ui/async-await/no-async-const.stderr b/src/test/ui/async-await/no-async-const.stderr index cdb1c6e2d7bd9..edbdfb5652281 100644 --- a/src/test/ui/async-await/no-async-const.stderr +++ b/src/test/ui/async-await/no-async-const.stderr @@ -1,5 +1,5 @@ error: expected one of `fn` or `unsafe`, found `const` - --> $DIR/no-async-const.rs:7:11 + --> $DIR/no-async-const.rs:5:11 | LL | pub async const fn x() {} | ^^^^^ expected one of `fn` or `unsafe` here diff --git a/src/test/ui/async-await/no-const-async.stderr b/src/test/ui/async-await/no-const-async.stderr index 693fbf186f913..6d7df57e7b6af 100644 --- a/src/test/ui/async-await/no-const-async.stderr +++ b/src/test/ui/async-await/no-const-async.stderr @@ -1,5 +1,5 @@ error: expected identifier, found reserved keyword `async` - --> $DIR/no-const-async.rs:7:11 + --> $DIR/no-const-async.rs:5:11 | LL | pub const async fn x() {} | ^^^^^ expected identifier, found reserved keyword @@ -9,7 +9,7 @@ LL | pub const r#async fn x() {} | ^^^^^^^ error: expected `:`, found keyword `fn` - --> $DIR/no-const-async.rs:7:17 + --> $DIR/no-const-async.rs:5:17 | LL | pub const async fn x() {} | ^^ expected `:` diff --git a/src/test/ui/async-await/no-move-across-await-struct.stderr b/src/test/ui/async-await/no-move-across-await-struct.stderr index 121c7791bd98e..88f147b8d9ddd 100644 --- a/src/test/ui/async-await/no-move-across-await-struct.stderr +++ b/src/test/ui/async-await/no-move-across-await-struct.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `s.x` - --> $DIR/no-move-across-await-struct.rs:10:5 + --> $DIR/no-move-across-await-struct.rs:8:5 | LL | needs_vec(s.x).await; | --- value moved here diff --git a/src/test/ui/async-await/no-move-across-await-tuple.stderr b/src/test/ui/async-await/no-move-across-await-tuple.stderr index 5da037ea5c0b6..fe98ecd599a23 100644 --- a/src/test/ui/async-await/no-move-across-await-tuple.stderr +++ b/src/test/ui/async-await/no-move-across-await-tuple.stderr @@ -1,5 +1,5 @@ error[E0382]: use of moved value: `x.1` - --> $DIR/no-move-across-await-tuple.rs:11:5 + --> $DIR/no-move-across-await-tuple.rs:9:5 | LL | drop(x.1); | --- value moved here diff --git a/src/test/ui/async-await/no-non-guaranteed-initialization.stderr b/src/test/ui/async-await/no-non-guaranteed-initialization.stderr index fb94522cac08d..91d7994654f37 100644 --- a/src/test/ui/async-await/no-non-guaranteed-initialization.stderr +++ b/src/test/ui/async-await/no-non-guaranteed-initialization.stderr @@ -1,5 +1,5 @@ error[E0381]: use of possibly uninitialized variable: `y` - --> $DIR/no-non-guaranteed-initialization.rs:12:5 + --> $DIR/no-non-guaranteed-initialization.rs:10:5 | LL | y | ^ use of possibly uninitialized `y` diff --git a/src/test/ui/async-await/partial-initialization-across-await.stderr b/src/test/ui/async-await/partial-initialization-across-await.stderr index fe79eb08befaa..d9a2db985e54d 100644 --- a/src/test/ui/async-await/partial-initialization-across-await.stderr +++ b/src/test/ui/async-await/partial-initialization-across-await.stderr @@ -1,17 +1,17 @@ error[E0381]: assign to part of possibly uninitialized variable: `t` - --> $DIR/partial-initialization-across-await.rs:15:5 + --> $DIR/partial-initialization-across-await.rs:13:5 | LL | t.0 = 42; | ^^^^^^^^ use of possibly uninitialized `t` error[E0381]: assign to part of possibly uninitialized variable: `t` - --> $DIR/partial-initialization-across-await.rs:24:5 + --> $DIR/partial-initialization-across-await.rs:22:5 | LL | t.0 = 42; | ^^^^^^^^ use of possibly uninitialized `t` error[E0381]: assign to part of possibly uninitialized variable: `t` - --> $DIR/partial-initialization-across-await.rs:33:5 + --> $DIR/partial-initialization-across-await.rs:31:5 | LL | t.x = 42; | ^^^^^^^^ use of possibly uninitialized `t` diff --git a/src/test/ui/async-await/recursive-async-impl-trait-type.stderr b/src/test/ui/async-await/recursive-async-impl-trait-type.stderr index 64f6eccd5479a..8781a9c444d0a 100644 --- a/src/test/ui/async-await/recursive-async-impl-trait-type.stderr +++ b/src/test/ui/async-await/recursive-async-impl-trait-type.stderr @@ -1,5 +1,5 @@ error[E0733]: recursion in an `async fn` requires boxing - --> $DIR/recursive-async-impl-trait-type.rs:7:40 + --> $DIR/recursive-async-impl-trait-type.rs:5:40 | LL | async fn recursive_async_function() -> () { | ^^ an `async fn` cannot invoke itself directly diff --git a/src/test/ui/async-await/suggest-missing-await-closure.fixed b/src/test/ui/async-await/suggest-missing-await-closure.fixed index 60c9a8581ac9e..37b30ffe6800f 100644 --- a/src/test/ui/async-await/suggest-missing-await-closure.fixed +++ b/src/test/ui/async-await/suggest-missing-await-closure.fixed @@ -1,7 +1,7 @@ // edition:2018 // run-rustfix -#![feature(async_await, async_closure)] +#![feature(async_closure)] fn take_u32(_x: u32) {} diff --git a/src/test/ui/async-await/suggest-missing-await.fixed b/src/test/ui/async-await/suggest-missing-await.fixed index aa032682be822..7c02a907ce7ad 100644 --- a/src/test/ui/async-await/suggest-missing-await.fixed +++ b/src/test/ui/async-await/suggest-missing-await.fixed @@ -1,8 +1,6 @@ // edition:2018 // run-rustfix -#![feature(async_await)] - fn take_u32(_x: u32) {} async fn make_u32() -> u32 { diff --git a/src/test/ui/async-await/suggest-missing-await.stderr b/src/test/ui/async-await/suggest-missing-await.stderr index 9bae7150276a8..ccca97ec204b4 100644 --- a/src/test/ui/async-await/suggest-missing-await.stderr +++ b/src/test/ui/async-await/suggest-missing-await.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/suggest-missing-await.rs:15:14 + --> $DIR/suggest-missing-await.rs:13:14 | LL | take_u32(x) | ^ diff --git a/src/test/ui/impl-trait/bound-normalization-fail.stderr b/src/test/ui/impl-trait/bound-normalization-fail.stderr index 4811b1e0ff39e..2c4c61a0957f9 100644 --- a/src/test/ui/impl-trait/bound-normalization-fail.stderr +++ b/src/test/ui/impl-trait/bound-normalization-fail.stderr @@ -1,5 +1,5 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash - --> $DIR/bound-normalization-fail.rs:6:12 + --> $DIR/bound-normalization-fail.rs:5:12 | LL | #![feature(impl_trait_in_bindings)] | ^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | #![feature(impl_trait_in_bindings)] = note: `#[warn(incomplete_features)]` on by default error[E0271]: type mismatch resolving ` as FooLike>::Output == ::Assoc` - --> $DIR/bound-normalization-fail.rs:29:32 + --> $DIR/bound-normalization-fail.rs:28:32 | LL | fn foo_fail() -> impl FooLike { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type @@ -17,13 +17,13 @@ LL | fn foo_fail() -> impl FooLike { = note: the return type of a function must have a statically known size error: `impl Trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope - --> $DIR/bound-normalization-fail.rs:45:41 + --> $DIR/bound-normalization-fail.rs:44:41 | LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0271]: type mismatch resolving ` as FooLike>::Output == >::Assoc` - --> $DIR/bound-normalization-fail.rs:45:41 + --> $DIR/bound-normalization-fail.rs:44:41 | LL | fn foo2_fail<'a, T: Trait<'a>>() -> impl FooLike { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found associated type diff --git a/src/test/ui/impl-trait/bound-normalization-pass.stderr b/src/test/ui/impl-trait/bound-normalization-pass.stderr index 229acdb2b144a..d048da7f60beb 100644 --- a/src/test/ui/impl-trait/bound-normalization-pass.stderr +++ b/src/test/ui/impl-trait/bound-normalization-pass.stderr @@ -1,5 +1,5 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash - --> $DIR/bound-normalization-pass.rs:6:12 + --> $DIR/bound-normalization-pass.rs:5:12 | LL | #![feature(impl_trait_in_bindings)] | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/impl-trait/issue-55872-2.stderr b/src/test/ui/impl-trait/issue-55872-2.stderr index 676c3fe3d4c92..01371b4d5c61f 100644 --- a/src/test/ui/impl-trait/issue-55872-2.stderr +++ b/src/test/ui/impl-trait/issue-55872-2.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `impl std::future::Future: std::marker::Copy` is not satisfied - --> $DIR/issue-55872-2.rs:12:5 + --> $DIR/issue-55872-2.rs:13:5 | LL | type E = impl Copy; | ^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `impl std::future::Future` @@ -7,7 +7,7 @@ LL | type E = impl Copy; = note: the return type of a function must have a statically known size error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872-2.rs:14:28 + --> $DIR/issue-55872-2.rs:15:28 | LL | fn foo() -> Self::E { | ____________________________^ diff --git a/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr b/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr index 67a834a2e957a..f67e45b01d27e 100644 --- a/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr +++ b/src/test/ui/inference/cannot-infer-async-enabled-impl-trait-bindings.stderr @@ -1,5 +1,5 @@ warning: the feature `impl_trait_in_bindings` is incomplete and may cause the compiler to crash - --> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:3:12 + --> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:2:12 | LL | #![feature(impl_trait_in_bindings)] | ^^^^^^^^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | #![feature(impl_trait_in_bindings)] = note: `#[warn(incomplete_features)]` on by default error[E0282]: type annotations needed for `impl std::future::Future` - --> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:14:9 + --> $DIR/cannot-infer-async-enabled-impl-trait-bindings.rs:13:9 | LL | let fut = async { | --- consider giving `fut` the explicit type `impl std::future::Future`, with the type parameters specified diff --git a/src/test/ui/inference/cannot-infer-async.stderr b/src/test/ui/inference/cannot-infer-async.stderr index 36608a11bb730..bf31fb85cf6db 100644 --- a/src/test/ui/inference/cannot-infer-async.stderr +++ b/src/test/ui/inference/cannot-infer-async.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/cannot-infer-async.rs:12:9 + --> $DIR/cannot-infer-async.rs:11:9 | LL | let fut = async { | --- consider giving `fut` a type diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr index 2421632c664c1..a585b4fdbe608 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.nll.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:10:48 + --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:48 | LL | async fn f(self: Pin<&Self>) -> impl Clone { self } | - ^^^^^^^^ returning this value requires that `'_` must outlive `'static` diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr index f0032449db14e..2fb152475a1ef 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_impl_trait-async.stderr @@ -1,17 +1,17 @@ error: cannot infer an appropriate lifetime - --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:10:16 + --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:16 | LL | async fn f(self: Pin<&Self>) -> impl Clone { self } | ^^^^ ---------- this return type evaluates to the `'static` lifetime... | | | ...but this borrow... | -note: ...can't outlive the lifetime '_ as defined on the method body at 10:26 - --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:10:26 +note: ...can't outlive the lifetime '_ as defined on the method body at 8:26 + --> $DIR/arbitrary_self_types_pin_lifetime_impl_trait-async.rs:8:26 | LL | async fn f(self: Pin<&Self>) -> impl Clone { self } | ^ -help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 10:26 +help: you can add a constraint to the return type to make it last less than `'static` and match the lifetime '_ as defined on the method body at 8:26 | LL | async fn f(self: Pin<&Self>) -> impl Clone + '_ { self } | ^^^^^^^^^^^^^^^ diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr index e33001b9244da..e53d91c360489 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:45 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:45 | LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | ^^^^ @@ -7,7 +7,7 @@ LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:50 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:50 | LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | - ^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` @@ -16,7 +16,7 @@ LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | lifetime `'_` defined here error: lifetime may not live long enough - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:13:73 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:73 | LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } | - ^^^^^^^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` @@ -25,7 +25,7 @@ LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { ( | lifetime `'_` defined here error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:19:58 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:58 | LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } | ^^^ @@ -33,7 +33,7 @@ LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:19:62 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:62 | LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } | -- - ^^^^^^^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'a` diff --git a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr index 74fc474134949..57ad026bdcf97 100644 --- a/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr +++ b/src/test/ui/self/arbitrary_self_types_pin_lifetime_mismatch-async.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:10:45 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:45 | LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | ---- ^^^^ @@ -8,7 +8,7 @@ LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f } | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:13:55 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:55 | LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) } | ----- ^^^^^^^^^^^^^^^^^ @@ -17,7 +17,7 @@ LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { ( | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:19:58 + --> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:58 | LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } | ----- ^^^ diff --git a/src/test/ui/self/elision/lt-ref-self-async.nll.stderr b/src/test/ui/self/elision/lt-ref-self-async.nll.stderr index 3e58c97301975..998178dde1df1 100644 --- a/src/test/ui/self/elision/lt-ref-self-async.nll.stderr +++ b/src/test/ui/self/elision/lt-ref-self-async.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/lt-ref-self-async.rs:15:42 + --> $DIR/lt-ref-self-async.rs:13:42 | LL | async fn ref_self(&self, f: &u32) -> &u32 { | ^^^^ @@ -7,7 +7,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#23r error: lifetime may not live long enough - --> $DIR/lt-ref-self-async.rs:15:47 + --> $DIR/lt-ref-self-async.rs:13:47 | LL | async fn ref_self(&self, f: &u32) -> &u32 { | _______________________-_______________________^ @@ -19,7 +19,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/lt-ref-self-async.rs:21:48 + --> $DIR/lt-ref-self-async.rs:19:48 | LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | ^^^^ @@ -27,7 +27,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#23r error: lifetime may not live long enough - --> $DIR/lt-ref-self-async.rs:21:53 + --> $DIR/lt-ref-self-async.rs:19:53 | LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | _____________________________-_______________________^ @@ -39,7 +39,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/lt-ref-self-async.rs:25:57 + --> $DIR/lt-ref-self-async.rs:23:57 | LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | ^^^^ @@ -47,7 +47,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#23r error: lifetime may not live long enough - --> $DIR/lt-ref-self-async.rs:25:62 + --> $DIR/lt-ref-self-async.rs:23:62 | LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | _____________________________________-________________________^ @@ -59,7 +59,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/lt-ref-self-async.rs:29:57 + --> $DIR/lt-ref-self-async.rs:27:57 | LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | ^^^^ @@ -67,7 +67,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#23r error: lifetime may not live long enough - --> $DIR/lt-ref-self-async.rs:29:62 + --> $DIR/lt-ref-self-async.rs:27:62 | LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | _____________________________________-________________________^ @@ -79,7 +79,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/lt-ref-self-async.rs:33:66 + --> $DIR/lt-ref-self-async.rs:31:66 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -87,7 +87,7 @@ LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#23r error: lifetime may not live long enough - --> $DIR/lt-ref-self-async.rs:33:71 + --> $DIR/lt-ref-self-async.rs:31:71 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | _____________________________________________-_________________________^ @@ -99,7 +99,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/lt-ref-self-async.rs:37:62 + --> $DIR/lt-ref-self-async.rs:35:62 | LL | async fn box_pin_Self(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -107,7 +107,7 @@ LL | async fn box_pin_Self(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#23r error: lifetime may not live long enough - --> $DIR/lt-ref-self-async.rs:37:67 + --> $DIR/lt-ref-self-async.rs:35:67 | LL | async fn box_pin_Self(self: Box>, f: &u32) -> &u32 { | _________________________________________-_________________________^ diff --git a/src/test/ui/self/elision/lt-ref-self-async.stderr b/src/test/ui/self/elision/lt-ref-self-async.stderr index 0a459257fa708..2bc64bdf1f7a2 100644 --- a/src/test/ui/self/elision/lt-ref-self-async.stderr +++ b/src/test/ui/self/elision/lt-ref-self-async.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/lt-ref-self-async.rs:15:42 + --> $DIR/lt-ref-self-async.rs:13:42 | LL | async fn ref_self(&self, f: &u32) -> &u32 { | ----- ^^^^ @@ -8,7 +8,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/lt-ref-self-async.rs:21:48 + --> $DIR/lt-ref-self-async.rs:19:48 | LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | ----- ^^^^ @@ -17,7 +17,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/lt-ref-self-async.rs:25:57 + --> $DIR/lt-ref-self-async.rs:23:57 | LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | ----- ^^^^ @@ -26,7 +26,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/lt-ref-self-async.rs:29:57 + --> $DIR/lt-ref-self-async.rs:27:57 | LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | ----- ^^^^ @@ -35,7 +35,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/lt-ref-self-async.rs:33:66 + --> $DIR/lt-ref-self-async.rs:31:66 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | ----- ^^^^ @@ -44,7 +44,7 @@ LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/lt-ref-self-async.rs:37:62 + --> $DIR/lt-ref-self-async.rs:35:62 | LL | async fn box_pin_Self(self: Box>, f: &u32) -> &u32 { | ----- ^^^^ diff --git a/src/test/ui/self/elision/ref-mut-self-async.nll.stderr b/src/test/ui/self/elision/ref-mut-self-async.nll.stderr index b8a538088109f..97bc80509dfea 100644 --- a/src/test/ui/self/elision/ref-mut-self-async.nll.stderr +++ b/src/test/ui/self/elision/ref-mut-self-async.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-self-async.rs:15:46 + --> $DIR/ref-mut-self-async.rs:13:46 | LL | async fn ref_self(&mut self, f: &u32) -> &u32 { | ^^^^ @@ -7,7 +7,7 @@ LL | async fn ref_self(&mut self, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-self-async.rs:15:51 + --> $DIR/ref-mut-self-async.rs:13:51 | LL | async fn ref_self(&mut self, f: &u32) -> &u32 { | _______________________-___________________________^ @@ -19,7 +19,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-self-async.rs:21:52 + --> $DIR/ref-mut-self-async.rs:19:52 | LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 { | ^^^^ @@ -27,7 +27,7 @@ LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-self-async.rs:21:57 + --> $DIR/ref-mut-self-async.rs:19:57 | LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 { | _____________________________-___________________________^ @@ -39,7 +39,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-self-async.rs:25:61 + --> $DIR/ref-mut-self-async.rs:23:61 | LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 { | ^^^^ @@ -47,7 +47,7 @@ LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-self-async.rs:25:66 + --> $DIR/ref-mut-self-async.rs:23:66 | LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 { | _____________________________________-____________________________^ @@ -59,7 +59,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-self-async.rs:29:61 + --> $DIR/ref-mut-self-async.rs:27:61 | LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 { | ^^^^ @@ -67,7 +67,7 @@ LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-self-async.rs:29:66 + --> $DIR/ref-mut-self-async.rs:27:66 | LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 { | _____________________________________-____________________________^ @@ -79,7 +79,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-self-async.rs:33:70 + --> $DIR/ref-mut-self-async.rs:31:70 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -87,7 +87,7 @@ LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-self-async.rs:33:75 + --> $DIR/ref-mut-self-async.rs:31:75 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | _____________________________________________-_____________________________^ @@ -99,7 +99,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-self-async.rs:37:70 + --> $DIR/ref-mut-self-async.rs:35:70 | LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -107,7 +107,7 @@ LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-self-async.rs:37:75 + --> $DIR/ref-mut-self-async.rs:35:75 | LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | _____________________________________________-_____________________________^ diff --git a/src/test/ui/self/elision/ref-mut-self-async.stderr b/src/test/ui/self/elision/ref-mut-self-async.stderr index 805833f94720d..39a1b30ca5329 100644 --- a/src/test/ui/self/elision/ref-mut-self-async.stderr +++ b/src/test/ui/self/elision/ref-mut-self-async.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ref-mut-self-async.rs:15:46 + --> $DIR/ref-mut-self-async.rs:13:46 | LL | async fn ref_self(&mut self, f: &u32) -> &u32 { | --------- ^^^^ @@ -8,7 +8,7 @@ LL | async fn ref_self(&mut self, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-self-async.rs:21:52 + --> $DIR/ref-mut-self-async.rs:19:52 | LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 { | --------- ^^^^ @@ -17,7 +17,7 @@ LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-self-async.rs:25:61 + --> $DIR/ref-mut-self-async.rs:23:61 | LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 { | --------- ^^^^ @@ -26,7 +26,7 @@ LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-self-async.rs:29:61 + --> $DIR/ref-mut-self-async.rs:27:61 | LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 { | --------- ^^^^ @@ -35,7 +35,7 @@ LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-self-async.rs:33:70 + --> $DIR/ref-mut-self-async.rs:31:70 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | --------- ^^^^ @@ -44,7 +44,7 @@ LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-self-async.rs:37:70 + --> $DIR/ref-mut-self-async.rs:35:70 | LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | --------- ^^^^ diff --git a/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr b/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr index cee008de6671f..2905a022e5d6e 100644 --- a/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr +++ b/src/test/ui/self/elision/ref-mut-struct-async.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-struct-async.rs:15:56 + --> $DIR/ref-mut-struct-async.rs:13:56 | LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 { | ^^^^ @@ -7,7 +7,7 @@ LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-struct-async.rs:15:61 + --> $DIR/ref-mut-struct-async.rs:13:61 | LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 { | _______________________________-_____________________________^ @@ -19,7 +19,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-struct-async.rs:19:65 + --> $DIR/ref-mut-struct-async.rs:17:65 | LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 { | ^^^^ @@ -27,7 +27,7 @@ LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-struct-async.rs:19:70 + --> $DIR/ref-mut-struct-async.rs:17:70 | LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 { | _______________________________________-______________________________^ @@ -39,7 +39,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-struct-async.rs:23:65 + --> $DIR/ref-mut-struct-async.rs:21:65 | LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 { | ^^^^ @@ -47,7 +47,7 @@ LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-struct-async.rs:23:70 + --> $DIR/ref-mut-struct-async.rs:21:70 | LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 { | _______________________________________-______________________________^ @@ -59,7 +59,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-struct-async.rs:27:74 + --> $DIR/ref-mut-struct-async.rs:25:74 | LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -67,7 +67,7 @@ LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-struct-async.rs:27:79 + --> $DIR/ref-mut-struct-async.rs:25:79 | LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | _______________________________________________-_______________________________^ @@ -79,7 +79,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-mut-struct-async.rs:31:74 + --> $DIR/ref-mut-struct-async.rs:29:74 | LL | async fn box_pin_ref_Struct(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -87,7 +87,7 @@ LL | async fn box_pin_ref_Struct(self: Box>, f: &u32) -> &u = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-mut-struct-async.rs:31:79 + --> $DIR/ref-mut-struct-async.rs:29:79 | LL | async fn box_pin_ref_Struct(self: Box>, f: &u32) -> &u32 { | _______________________________________________-_______________________________^ diff --git a/src/test/ui/self/elision/ref-mut-struct-async.stderr b/src/test/ui/self/elision/ref-mut-struct-async.stderr index 4c983872942c1..fe4a636ada668 100644 --- a/src/test/ui/self/elision/ref-mut-struct-async.stderr +++ b/src/test/ui/self/elision/ref-mut-struct-async.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ref-mut-struct-async.rs:15:56 + --> $DIR/ref-mut-struct-async.rs:13:56 | LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 { | ----------- ^^^^ @@ -8,7 +8,7 @@ LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-struct-async.rs:19:65 + --> $DIR/ref-mut-struct-async.rs:17:65 | LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 { | ----------- ^^^^ @@ -17,7 +17,7 @@ LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-struct-async.rs:23:65 + --> $DIR/ref-mut-struct-async.rs:21:65 | LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 { | ----------- ^^^^ @@ -26,7 +26,7 @@ LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-struct-async.rs:27:74 + --> $DIR/ref-mut-struct-async.rs:25:74 | LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | ----------- ^^^^ @@ -35,7 +35,7 @@ LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-mut-struct-async.rs:31:74 + --> $DIR/ref-mut-struct-async.rs:29:74 | LL | async fn box_pin_ref_Struct(self: Box>, f: &u32) -> &u32 { | ----------- ^^^^ diff --git a/src/test/ui/self/elision/ref-self-async.nll.stderr b/src/test/ui/self/elision/ref-self-async.nll.stderr index c3c15485b229c..0eee56654f7d1 100644 --- a/src/test/ui/self/elision/ref-self-async.nll.stderr +++ b/src/test/ui/self/elision/ref-self-async.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:24:42 + --> $DIR/ref-self-async.rs:22:42 | LL | async fn ref_self(&self, f: &u32) -> &u32 { | ^^^^ @@ -7,7 +7,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:24:47 + --> $DIR/ref-self-async.rs:22:47 | LL | async fn ref_self(&self, f: &u32) -> &u32 { | _______________________-_______________________^ @@ -19,7 +19,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:30:48 + --> $DIR/ref-self-async.rs:28:48 | LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | ^^^^ @@ -27,7 +27,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:30:53 + --> $DIR/ref-self-async.rs:28:53 | LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | _____________________________-_______________________^ @@ -39,7 +39,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:34:57 + --> $DIR/ref-self-async.rs:32:57 | LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | ^^^^ @@ -47,7 +47,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:34:62 + --> $DIR/ref-self-async.rs:32:62 | LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | _____________________________________-________________________^ @@ -59,7 +59,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:38:57 + --> $DIR/ref-self-async.rs:36:57 | LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | ^^^^ @@ -67,7 +67,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:38:62 + --> $DIR/ref-self-async.rs:36:62 | LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | _____________________________________-________________________^ @@ -79,7 +79,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:42:66 + --> $DIR/ref-self-async.rs:40:66 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -87,7 +87,7 @@ LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:42:71 + --> $DIR/ref-self-async.rs:40:71 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | _____________________________________________-_________________________^ @@ -99,7 +99,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:46:66 + --> $DIR/ref-self-async.rs:44:66 | LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -107,7 +107,7 @@ LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:46:71 + --> $DIR/ref-self-async.rs:44:71 | LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | _____________________________________________-_________________________^ @@ -119,7 +119,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-self-async.rs:50:69 + --> $DIR/ref-self-async.rs:48:69 | LL | async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 { | ^^^ @@ -127,7 +127,7 @@ LL | async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-self-async.rs:50:73 + --> $DIR/ref-self-async.rs:48:73 | LL | async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 { | ____________________________________________-____________________________^ diff --git a/src/test/ui/self/elision/ref-self-async.stderr b/src/test/ui/self/elision/ref-self-async.stderr index eb796a07a86d5..2f9e2a01e347c 100644 --- a/src/test/ui/self/elision/ref-self-async.stderr +++ b/src/test/ui/self/elision/ref-self-async.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:24:42 + --> $DIR/ref-self-async.rs:22:42 | LL | async fn ref_self(&self, f: &u32) -> &u32 { | ----- ^^^^ @@ -8,7 +8,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:30:48 + --> $DIR/ref-self-async.rs:28:48 | LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | ----- ^^^^ @@ -17,7 +17,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:34:57 + --> $DIR/ref-self-async.rs:32:57 | LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | ----- ^^^^ @@ -26,7 +26,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:38:57 + --> $DIR/ref-self-async.rs:36:57 | LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | ----- ^^^^ @@ -35,7 +35,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:42:66 + --> $DIR/ref-self-async.rs:40:66 | LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | ----- ^^^^ @@ -44,7 +44,7 @@ LL | async fn box_box_ref_Self(self: Box>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:46:66 + --> $DIR/ref-self-async.rs:44:66 | LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | ----- ^^^^ @@ -53,7 +53,7 @@ LL | async fn box_pin_ref_Self(self: Box>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-self-async.rs:50:69 + --> $DIR/ref-self-async.rs:48:69 | LL | async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 { | ----- ^^^ diff --git a/src/test/ui/self/elision/ref-struct-async.nll.stderr b/src/test/ui/self/elision/ref-struct-async.nll.stderr index ff50f6825bc6b..8508e42264b4a 100644 --- a/src/test/ui/self/elision/ref-struct-async.nll.stderr +++ b/src/test/ui/self/elision/ref-struct-async.nll.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-struct-async.rs:15:52 + --> $DIR/ref-struct-async.rs:13:52 | LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 { | ^^^^ @@ -7,7 +7,7 @@ LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-struct-async.rs:15:57 + --> $DIR/ref-struct-async.rs:13:57 | LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 { | _______________________________-_________________________^ @@ -19,7 +19,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-struct-async.rs:19:61 + --> $DIR/ref-struct-async.rs:17:61 | LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 { | ^^^^ @@ -27,7 +27,7 @@ LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-struct-async.rs:19:66 + --> $DIR/ref-struct-async.rs:17:66 | LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 { | _______________________________________-__________________________^ @@ -39,7 +39,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-struct-async.rs:23:61 + --> $DIR/ref-struct-async.rs:21:61 | LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 { | ^^^^ @@ -47,7 +47,7 @@ LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-struct-async.rs:23:66 + --> $DIR/ref-struct-async.rs:21:66 | LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 { | _______________________________________-__________________________^ @@ -59,7 +59,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-struct-async.rs:27:70 + --> $DIR/ref-struct-async.rs:25:70 | LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -67,7 +67,7 @@ LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-struct-async.rs:27:75 + --> $DIR/ref-struct-async.rs:25:75 | LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | _______________________________________________-___________________________^ @@ -79,7 +79,7 @@ LL | | } | |_____^ function was supposed to return data with lifetime `'_` but it is returning data with lifetime `'_` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds - --> $DIR/ref-struct-async.rs:31:66 + --> $DIR/ref-struct-async.rs:29:66 | LL | async fn box_pin_Struct(self: Box>, f: &u32) -> &u32 { | ^^^^ @@ -87,7 +87,7 @@ LL | async fn box_pin_Struct(self: Box>, f: &u32) -> &u32 { = note: hidden type `impl std::future::Future` captures lifetime '_#15r error: lifetime may not live long enough - --> $DIR/ref-struct-async.rs:31:71 + --> $DIR/ref-struct-async.rs:29:71 | LL | async fn box_pin_Struct(self: Box>, f: &u32) -> &u32 { | ___________________________________________-___________________________^ diff --git a/src/test/ui/self/elision/ref-struct-async.stderr b/src/test/ui/self/elision/ref-struct-async.stderr index 574b0fddc1eb2..222e27ebf0d97 100644 --- a/src/test/ui/self/elision/ref-struct-async.stderr +++ b/src/test/ui/self/elision/ref-struct-async.stderr @@ -1,5 +1,5 @@ error[E0623]: lifetime mismatch - --> $DIR/ref-struct-async.rs:15:52 + --> $DIR/ref-struct-async.rs:13:52 | LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 { | ------- ^^^^ @@ -8,7 +8,7 @@ LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-struct-async.rs:19:61 + --> $DIR/ref-struct-async.rs:17:61 | LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 { | ------- ^^^^ @@ -17,7 +17,7 @@ LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-struct-async.rs:23:61 + --> $DIR/ref-struct-async.rs:21:61 | LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 { | ------- ^^^^ @@ -26,7 +26,7 @@ LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-struct-async.rs:27:70 + --> $DIR/ref-struct-async.rs:25:70 | LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | ------- ^^^^ @@ -35,7 +35,7 @@ LL | async fn box_box_ref_Struct(self: Box>, f: &u32) -> &u32 { | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch - --> $DIR/ref-struct-async.rs:31:66 + --> $DIR/ref-struct-async.rs:29:66 | LL | async fn box_pin_Struct(self: Box>, f: &u32) -> &u32 { | ------- ^^^^