diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 409aef9185d92..1e22915219f1a 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -120,14 +120,7 @@ impl<'a> PostExpansionVisitor<'a> { impl Visitor<'_> for ImplTraitVisitor<'_> { fn visit_ty(&mut self, ty: &ast::Ty) { if let ast::TyKind::ImplTrait(..) = ty.kind { - if self.in_associated_ty { - gate!( - &self.vis, - impl_trait_in_assoc_type, - ty.span, - "`impl Trait` in associated types is unstable" - ); - } else { + if !self.in_associated_ty { gate!( &self.vis, type_alias_impl_trait, diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index f4f29078190a1..c603f057c44c3 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -5,6 +5,7 @@ //! This API is completely unstable and subject to change. #![allow(internal_features)] +#![allow(stable_features)] #![feature(rustdoc_internals)] #![doc(rust_logo)] #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 1155366db85e3..eacaa95680b96 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -197,6 +197,8 @@ declare_features! ( /// + `impl Iterator for &mut Iterator` /// + `impl Debug for Foo<'_>` (accepted, impl_header_lifetime_elision, "1.31.0", Some(15872)), + /// Allows `impl Trait` to be used inside associated types (RFC 2515). + (accepted, impl_trait_in_assoc_type, "CURRENT_RUSTC_VERSION", Some(63063)), /// Allows referencing `Self` and projections in impl-trait. (accepted, impl_trait_projections, "1.74.0", Some(103532)), /// Allows using `a..=b` and `..=b` as inclusive range syntaxes. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index d00621d8254c3..0de9be13a6e63 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -485,8 +485,6 @@ declare_features! ( (unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)), /// Allows `if let` guard in match arms. (unstable, if_let_guard, "1.47.0", Some(51114)), - /// Allows `impl Trait` to be used inside associated types (RFC 2515). - (unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)), /// Allows `impl Trait` as output type in `Fn` traits in return position of functions. (unstable, impl_trait_in_fn_trait_return, "1.64.0", Some(99697)), /// Allows using imported `main` function diff --git a/tests/ui/associated-types/issue-63591.rs b/tests/ui/associated-types/issue-63591.rs index d07c123499892..b148487953f9a 100644 --- a/tests/ui/associated-types/issue-63591.rs +++ b/tests/ui/associated-types/issue-63591.rs @@ -1,7 +1,6 @@ // check-pass #![feature(associated_type_bounds)] -#![feature(impl_trait_in_assoc_type)] fn main() {} diff --git a/tests/ui/coroutine/issue-87142.rs b/tests/ui/coroutine/issue-87142.rs index b5708c4b385d0..1b8c181e7dc56 100644 --- a/tests/ui/coroutine/issue-87142.rs +++ b/tests/ui/coroutine/issue-87142.rs @@ -4,7 +4,7 @@ // Regression test for #87142 // This test needs the above flags and the "lib" crate type. -#![feature(impl_trait_in_assoc_type, coroutine_trait, coroutines)] +#![feature(coroutine_trait, coroutines)] #![crate_type = "lib"] use std::ops::Coroutine; diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs deleted file mode 100644 index 2c130664e9a1f..0000000000000 --- a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.rs +++ /dev/null @@ -1,20 +0,0 @@ -trait Foo { - type Bar; -} - -impl Foo for () { - type Bar = impl std::fmt::Debug; - //~^ ERROR: `impl Trait` in associated types is unstable - //~| ERROR: unconstrained opaque type -} - -struct Mop; - -impl Mop { - type Bop = impl std::fmt::Debug; - //~^ ERROR: `impl Trait` in associated types is unstable - //~| ERROR: inherent associated types are unstable - //~| ERROR: unconstrained opaque type -} - -fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr b/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr deleted file mode 100644 index 7dfd79c728641..0000000000000 --- a/tests/ui/feature-gates/feature-gate-impl_trait_in_assoc_type.stderr +++ /dev/null @@ -1,49 +0,0 @@ -error[E0658]: `impl Trait` in associated types is unstable - --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:6:16 - | -LL | type Bar = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: `impl Trait` in associated types is unstable - --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:16 - | -LL | type Bop = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: inherent associated types are unstable - --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:5 - | -LL | type Bop = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #8995 for more information - = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: unconstrained opaque type - --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:6:16 - | -LL | type Bar = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: `Bar` must be used in combination with a concrete type within the same impl - -error: unconstrained opaque type - --> $DIR/feature-gate-impl_trait_in_assoc_type.rs:14:16 - | -LL | type Bop = impl std::fmt::Debug; - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: `Bop` must be used in combination with a concrete type within the same impl - -error: aborting due to 5 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/generic-associated-types/issue-86218-2.rs b/tests/ui/generic-associated-types/issue-86218-2.rs index 8a5e4a0f3cc39..d67b973aa5b2f 100644 --- a/tests/ui/generic-associated-types/issue-86218-2.rs +++ b/tests/ui/generic-associated-types/issue-86218-2.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] - pub trait Stream { type Item; } diff --git a/tests/ui/generic-associated-types/issue-86218.rs b/tests/ui/generic-associated-types/issue-86218.rs index 397a0f2c64903..77cfd6b169a5c 100644 --- a/tests/ui/generic-associated-types/issue-86218.rs +++ b/tests/ui/generic-associated-types/issue-86218.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] - pub trait Stream { type Item; } diff --git a/tests/ui/generic-associated-types/issue-87258_a.rs b/tests/ui/generic-associated-types/issue-87258_a.rs index 6f737b21f53cd..ce878f1d1278c 100644 --- a/tests/ui/generic-associated-types/issue-87258_a.rs +++ b/tests/ui/generic-associated-types/issue-87258_a.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - // See https://github.com/rust-lang/rust/issues/87258#issuecomment-883293367 trait Trait1 {} diff --git a/tests/ui/generic-associated-types/issue-87258_a.stderr b/tests/ui/generic-associated-types/issue-87258_a.stderr index 01f2a92f94a6b..7debb36950428 100644 --- a/tests/ui/generic-associated-types/issue-87258_a.stderr +++ b/tests/ui/generic-associated-types/issue-87258_a.stderr @@ -1,5 +1,5 @@ error: unconstrained opaque type - --> $DIR/issue-87258_a.rs:17:26 + --> $DIR/issue-87258_a.rs:15:26 | LL | type FooFuture<'a> = impl Trait1; | ^^^^^^^^^^^ diff --git a/tests/ui/generic-associated-types/issue-88595.rs b/tests/ui/generic-associated-types/issue-88595.rs index 5a40a61297233..3af5fb33077cc 100644 --- a/tests/ui/generic-associated-types/issue-88595.rs +++ b/tests/ui/generic-associated-types/issue-88595.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - fn main() {} #[rustfmt::skip] diff --git a/tests/ui/generic-associated-types/issue-88595.stderr b/tests/ui/generic-associated-types/issue-88595.stderr index ab75a92400601..099161e73c289 100644 --- a/tests/ui/generic-associated-types/issue-88595.stderr +++ b/tests/ui/generic-associated-types/issue-88595.stderr @@ -1,11 +1,11 @@ error: non-defining opaque type use in defining scope - --> $DIR/issue-88595.rs:21:23 + --> $DIR/issue-88595.rs:19:23 | LL | fn a(&'a self) -> Self::B<'a> {} | ^^^^^^^^^^^ generic argument `'a` used twice | note: for this opaque type - --> $DIR/issue-88595.rs:19:18 + --> $DIR/issue-88595.rs:17:18 | LL | type B<'b> = impl Clone; | ^^^^^^^^^^ diff --git a/tests/ui/generic-associated-types/issue-89008.rs b/tests/ui/generic-associated-types/issue-89008.rs index 94b07e674e824..d3708005545c2 100644 --- a/tests/ui/generic-associated-types/issue-89008.rs +++ b/tests/ui/generic-associated-types/issue-89008.rs @@ -1,8 +1,6 @@ // check-pass // edition:2021 -#![feature(impl_trait_in_assoc_type)] - use std::future::Future; use std::marker::PhantomData; diff --git a/tests/ui/generic-associated-types/issue-90014-tait.rs b/tests/ui/generic-associated-types/issue-90014-tait.rs index 1ce5cd3198767..2534dc9dcc658 100644 --- a/tests/ui/generic-associated-types/issue-90014-tait.rs +++ b/tests/ui/generic-associated-types/issue-90014-tait.rs @@ -4,7 +4,7 @@ // known-bug: unknown // edition:2018 -#![feature(impl_trait_in_assoc_type, inherent_associated_types)] +#![feature(inherent_associated_types)] #![allow(incomplete_features)] use std::future::Future; diff --git a/tests/ui/generic-associated-types/issue-90014.rs b/tests/ui/generic-associated-types/issue-90014.rs index c4d762796e2de..0b972bfc47652 100644 --- a/tests/ui/generic-associated-types/issue-90014.rs +++ b/tests/ui/generic-associated-types/issue-90014.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(impl_trait_in_assoc_type)] - use std::future::Future; trait MakeFut { diff --git a/tests/ui/generic-associated-types/issue-90014.stderr b/tests/ui/generic-associated-types/issue-90014.stderr index 2bb9d0c7ba609..b0097ff9a90c0 100644 --- a/tests/ui/generic-associated-types/issue-90014.stderr +++ b/tests/ui/generic-associated-types/issue-90014.stderr @@ -1,5 +1,5 @@ error[E0477]: the type `&mut ()` does not fulfill the required lifetime - --> $DIR/issue-90014.rs:15:20 + --> $DIR/issue-90014.rs:13:20 | LL | type Fut<'a> | ------------ definition of `Fut` from trait @@ -8,7 +8,7 @@ LL | type Fut<'a> = impl Future; | ^^^^^^^^^^^^^^^^^^^^^^^^ | note: type must outlive the lifetime `'a` as defined here - --> $DIR/issue-90014.rs:15:14 + --> $DIR/issue-90014.rs:13:14 | LL | type Fut<'a> = impl Future; | ^^ diff --git a/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs b/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs index 0908a0bf39df9..bb31efb9d380f 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-generic-trait.rs @@ -1,4 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs b/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs index 8173f8df11b0c..5585cbf3b56d4 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-issue-114325.rs @@ -4,8 +4,6 @@ // edition: 2021 // build-pass: ICEd during codegen. -#![feature(impl_trait_in_assoc_type)] - use std::future::Future; fn main() { diff --git a/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs b/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs index b5ea90bb0c7c6..95b54df6872f3 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type-trivial.rs @@ -1,4 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/tests/ui/impl-trait/associated-impl-trait-type.rs b/tests/ui/impl-trait/associated-impl-trait-type.rs index f5981261c3838..4817d93651593 100644 --- a/tests/ui/impl-trait/associated-impl-trait-type.rs +++ b/tests/ui/impl-trait/associated-impl-trait-type.rs @@ -1,4 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] // build-pass (FIXME(62277): could be check-pass?) trait Bar {} diff --git a/tests/ui/impl-trait/in-assoc-type-unconstrained.rs b/tests/ui/impl-trait/in-assoc-type-unconstrained.rs index c395b4195a05f..75d04ccf49199 100644 --- a/tests/ui/impl-trait/in-assoc-type-unconstrained.rs +++ b/tests/ui/impl-trait/in-assoc-type-unconstrained.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - mod compare_ty { trait Trait { type Ty: IntoIterator; diff --git a/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr b/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr index 8e61a65abe4be..dd4bb7893eb6c 100644 --- a/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr +++ b/tests/ui/impl-trait/in-assoc-type-unconstrained.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving `::Ty::{opaque#0}> as IntoIterator>::Item == ()` - --> $DIR/in-assoc-type-unconstrained.rs:8:19 + --> $DIR/in-assoc-type-unconstrained.rs:6:19 | LL | type Ty = Option; | ^^^^^^^^^^^^^^^^^^ expected `()`, found opaque type @@ -7,13 +7,13 @@ LL | type Ty = Option; = note: expected unit type `()` found opaque type `<() as compare_ty::Trait>::Ty::{opaque#0}` note: required by a bound in `compare_ty::Trait::Ty` - --> $DIR/in-assoc-type-unconstrained.rs:5:31 + --> $DIR/in-assoc-type-unconstrained.rs:3:31 | LL | type Ty: IntoIterator; | ^^^^^^^^^ required by this bound in `Trait::Ty` error: unconstrained opaque type - --> $DIR/in-assoc-type-unconstrained.rs:8:26 + --> $DIR/in-assoc-type-unconstrained.rs:6:26 | LL | type Ty = Option; | ^^^^^^^^^^ @@ -21,7 +21,7 @@ LL | type Ty = Option; = note: `Ty` must be used in combination with a concrete type within the same impl error[E0053]: method `method` has an incompatible type for trait - --> $DIR/in-assoc-type-unconstrained.rs:22:24 + --> $DIR/in-assoc-type-unconstrained.rs:20:24 | LL | type Ty = impl Sized; | ---------- the expected opaque type @@ -33,20 +33,20 @@ LL | fn method() -> () {} | help: change the output type to match the trait: `<() as compare_method::Trait>::Ty` | note: type in trait - --> $DIR/in-assoc-type-unconstrained.rs:17:24 + --> $DIR/in-assoc-type-unconstrained.rs:15:24 | LL | fn method() -> Self::Ty; | ^^^^^^^^ = note: expected signature `fn() -> <() as compare_method::Trait>::Ty` found signature `fn()` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/in-assoc-type-unconstrained.rs:22:12 + --> $DIR/in-assoc-type-unconstrained.rs:20:12 | LL | fn method() -> () {} | ^^^^^^ error: unconstrained opaque type - --> $DIR/in-assoc-type-unconstrained.rs:20:19 + --> $DIR/in-assoc-type-unconstrained.rs:18:19 | LL | type Ty = impl Sized; | ^^^^^^^^^^ diff --git a/tests/ui/impl-trait/in-assoc-type.rs b/tests/ui/impl-trait/in-assoc-type.rs index 38ad2fa6f02ee..366b63838f909 100644 --- a/tests/ui/impl-trait/in-assoc-type.rs +++ b/tests/ui/impl-trait/in-assoc-type.rs @@ -1,8 +1,6 @@ //! This test checks that we don't allow registering hidden types for //! opaque types from other impls. -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Bar; fn foo(&self) -> >::Bar diff --git a/tests/ui/impl-trait/in-assoc-type.stderr b/tests/ui/impl-trait/in-assoc-type.stderr index d5b543ea953df..b2c8a88dca8d0 100644 --- a/tests/ui/impl-trait/in-assoc-type.stderr +++ b/tests/ui/impl-trait/in-assoc-type.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/in-assoc-type.rs:20:22 + --> $DIR/in-assoc-type.rs:18:22 | LL | type Bar = impl std::fmt::Debug; | -------------------- the expected opaque type @@ -12,7 +12,7 @@ LL | fn foo(&self) -> >::Bar {} = note: expected opaque type `<() as Foo<()>>::Bar` found unit type `()` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/in-assoc-type.rs:20:8 + --> $DIR/in-assoc-type.rs:18:8 | LL | fn foo(&self) -> >::Bar {} | ^^^ diff --git a/tests/ui/impl-trait/issue-55872-1.rs b/tests/ui/impl-trait/issue-55872-1.rs index f36a310ddf310..31734ba8d9ae3 100644 --- a/tests/ui/impl-trait/issue-55872-1.rs +++ b/tests/ui/impl-trait/issue-55872-1.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - pub trait Bar { type E: Copy; diff --git a/tests/ui/impl-trait/issue-55872-1.stderr b/tests/ui/impl-trait/issue-55872-1.stderr index 0c86824e62217..80d034e5990d6 100644 --- a/tests/ui/impl-trait/issue-55872-1.stderr +++ b/tests/ui/impl-trait/issue-55872-1.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-55872-1.rs:12:15 + --> $DIR/issue-55872-1.rs:10:15 | LL | fn foo() -> Self::E; | ----------------------- definition of `foo` from trait @@ -8,7 +8,7 @@ LL | fn foo() -> Self::E { | ^^^^^^^ impl has extra requirement `T: Default` error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:12:29 + --> $DIR/issue-55872-1.rs:10:29 | LL | fn foo() -> Self::E { | ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`, which is required by `(S, T): Copy` @@ -20,7 +20,7 @@ LL | impl Bar for S { | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)` - --> $DIR/issue-55872-1.rs:12:29 + --> $DIR/issue-55872-1.rs:10:29 | LL | fn foo() -> Self::E { | ^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`, which is required by `(S, T): Copy` diff --git a/tests/ui/impl-trait/issue-55872-2.rs b/tests/ui/impl-trait/issue-55872-2.rs index 8a96fdc5c63d1..3eee3988d3478 100644 --- a/tests/ui/impl-trait/issue-55872-2.rs +++ b/tests/ui/impl-trait/issue-55872-2.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(impl_trait_in_assoc_type)] - pub trait Bar { type E: Send; diff --git a/tests/ui/impl-trait/issue-55872-2.stderr b/tests/ui/impl-trait/issue-55872-2.stderr index b5b7f293a40b2..9ec5ab2675b70 100644 --- a/tests/ui/impl-trait/issue-55872-2.stderr +++ b/tests/ui/impl-trait/issue-55872-2.stderr @@ -1,11 +1,11 @@ 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:9 + --> $DIR/issue-55872-2.rs:12:9 | LL | async {} | ^^^^^^^^ 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:9 + --> $DIR/issue-55872-2.rs:12:9 | LL | async {} | ^^^^^^^^ diff --git a/tests/ui/impl-trait/issue-55872-3.rs b/tests/ui/impl-trait/issue-55872-3.rs index 7490a1308006b..475a2b010c4f6 100644 --- a/tests/ui/impl-trait/issue-55872-3.rs +++ b/tests/ui/impl-trait/issue-55872-3.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(impl_trait_in_assoc_type)] - pub trait Bar { type E: Copy; diff --git a/tests/ui/impl-trait/issue-55872-3.stderr b/tests/ui/impl-trait/issue-55872-3.stderr index 9af0fad9cdb94..bdf4244d04558 100644 --- a/tests/ui/impl-trait/issue-55872-3.stderr +++ b/tests/ui/impl-trait/issue-55872-3.stderr @@ -1,8 +1,8 @@ -error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}: Copy` is not satisfied - --> $DIR/issue-55872-3.rs:13:20 +error[E0277]: the trait bound `{async block@$DIR/issue-55872-3.rs:13:9: 13:17}: Copy` is not satisfied + --> $DIR/issue-55872-3.rs:11:20 | LL | fn foo() -> Self::E { - | ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:15:9: 15:17}` + | ^^^^^^^ the trait `Copy` is not implemented for `{async block@$DIR/issue-55872-3.rs:13:9: 13:17}` error: aborting due to 1 previous error diff --git a/tests/ui/impl-trait/issue-55872.rs b/tests/ui/impl-trait/issue-55872.rs index 10850f0a9335e..09b2e67570597 100644 --- a/tests/ui/impl-trait/issue-55872.rs +++ b/tests/ui/impl-trait/issue-55872.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - pub trait Bar { type E: Copy; diff --git a/tests/ui/impl-trait/issue-55872.stderr b/tests/ui/impl-trait/issue-55872.stderr index 4ff8527bbe9d1..1bfedc11d779e 100644 --- a/tests/ui/impl-trait/issue-55872.stderr +++ b/tests/ui/impl-trait/issue-55872.stderr @@ -1,5 +1,5 @@ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-55872.rs:13:9 + --> $DIR/issue-55872.rs:11:9 | LL | || () | ^^^^^ diff --git a/tests/ui/impl-trait/issues/issue-82139.rs b/tests/ui/impl-trait/issues/issue-82139.rs index 3f0b0f1a8dee0..7d331c95f782a 100644 --- a/tests/ui/impl-trait/issues/issue-82139.rs +++ b/tests/ui/impl-trait/issues/issue-82139.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Trait { type Associated; fn func() -> Self::Associated; diff --git a/tests/ui/impl-trait/issues/issue-82139.stderr b/tests/ui/impl-trait/issues/issue-82139.stderr index b87084433120b..841c277d57a1f 100644 --- a/tests/ui/impl-trait/issues/issue-82139.stderr +++ b/tests/ui/impl-trait/issues/issue-82139.stderr @@ -1,5 +1,5 @@ error[E0425]: cannot find value `j` in this scope - --> $DIR/issue-82139.rs:15:26 + --> $DIR/issue-82139.rs:13:26 | LL | Some(42).map(|_| j) | ^ not found in this scope diff --git a/tests/ui/impl-trait/issues/issue-83919.rs b/tests/ui/impl-trait/issues/issue-83919.rs index 4e699e7f30260..7a264e51bf2e0 100644 --- a/tests/ui/impl-trait/issues/issue-83919.rs +++ b/tests/ui/impl-trait/issues/issue-83919.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - // edition:2021 use std::future::Future; diff --git a/tests/ui/impl-trait/issues/issue-83919.stderr b/tests/ui/impl-trait/issues/issue-83919.stderr index 200257235feae..9690bc140e0e3 100644 --- a/tests/ui/impl-trait/issues/issue-83919.stderr +++ b/tests/ui/impl-trait/issues/issue-83919.stderr @@ -1,5 +1,5 @@ error[E0277]: `{integer}` is not a future - --> $DIR/issue-83919.rs:21:26 + --> $DIR/issue-83919.rs:19:26 | LL | fn get_fut(&self) -> Self::Fut { | ^^^^^^^^^ `{integer}` is not a future diff --git a/tests/ui/impl-trait/issues/issue-86719.rs b/tests/ui/impl-trait/issues/issue-86719.rs index 7abab5bfb75d5..099a01ec3ab26 100644 --- a/tests/ui/impl-trait/issues/issue-86719.rs +++ b/tests/ui/impl-trait/issues/issue-86719.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Bar { type E; } diff --git a/tests/ui/impl-trait/issues/issue-86719.stderr b/tests/ui/impl-trait/issues/issue-86719.stderr index 15893df5f9458..3c82ab73e92de 100644 --- a/tests/ui/impl-trait/issues/issue-86719.stderr +++ b/tests/ui/impl-trait/issues/issue-86719.stderr @@ -1,11 +1,11 @@ error: at least one trait must be specified - --> $DIR/issue-86719.rs:7:14 + --> $DIR/issue-86719.rs:5:14 | LL | type E = impl ; | ^^^^ error[E0407]: method `foo` is not a member of trait `Bar` - --> $DIR/issue-86719.rs:8:5 + --> $DIR/issue-86719.rs:6:5 | LL | / fn foo() -> Self::E { LL | | @@ -14,7 +14,7 @@ LL | | } | |_____^ not a member of trait `Bar` error[E0282]: type annotations needed - --> $DIR/issue-86719.rs:10:10 + --> $DIR/issue-86719.rs:8:10 | LL | |_| true | ^ diff --git a/tests/ui/impl-trait/issues/issue-87340.rs b/tests/ui/impl-trait/issues/issue-87340.rs index 705a4addcb704..abedb0009f5b9 100644 --- a/tests/ui/impl-trait/issues/issue-87340.rs +++ b/tests/ui/impl-trait/issues/issue-87340.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait X { type I; fn f() -> Self::I; diff --git a/tests/ui/impl-trait/issues/issue-87340.stderr b/tests/ui/impl-trait/issues/issue-87340.stderr index 8513cb2881e1f..77f5863a85f43 100644 --- a/tests/ui/impl-trait/issues/issue-87340.stderr +++ b/tests/ui/impl-trait/issues/issue-87340.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-87340.rs:8:6 + --> $DIR/issue-87340.rs:6:6 | LL | impl X for () { | ^ unconstrained type parameter diff --git a/tests/ui/impl-trait/type-alias-generic-param.rs b/tests/ui/impl-trait/type-alias-generic-param.rs index 1211625dac9cc..6357e6fcb8ad5 100644 --- a/tests/ui/impl-trait/type-alias-generic-param.rs +++ b/tests/ui/impl-trait/type-alias-generic-param.rs @@ -3,7 +3,6 @@ // types in 'item' position when generic parameters are involved // // run-pass -#![feature(impl_trait_in_assoc_type)] trait Meow { type MeowType; diff --git a/tests/ui/impl-trait/where-allowed.rs b/tests/ui/impl-trait/where-allowed.rs index 5ce63db684f3e..5cf938bc27949 100644 --- a/tests/ui/impl-trait/where-allowed.rs +++ b/tests/ui/impl-trait/where-allowed.rs @@ -117,7 +117,7 @@ trait DummyTrait { } impl DummyTrait for () { type Out = impl Debug; - //~^ ERROR `impl Trait` in associated types is unstable + // Allowed fn in_trait_impl_parameter(_: impl Debug) { } // Allowed diff --git a/tests/ui/impl-trait/where-allowed.stderr b/tests/ui/impl-trait/where-allowed.stderr index 3e1d4e22272d5..bb59fafb76b4d 100644 --- a/tests/ui/impl-trait/where-allowed.stderr +++ b/tests/ui/impl-trait/where-allowed.stderr @@ -16,16 +16,6 @@ LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic | | nested `impl Trait` here | outer `impl Trait` -error[E0658]: `impl Trait` in associated types is unstable - --> $DIR/where-allowed.rs:119:16 - | -LL | type Out = impl Debug; - | ^^^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - error[E0658]: `impl Trait` in type aliases is unstable --> $DIR/where-allowed.rs:154:23 | @@ -369,7 +359,7 @@ LL | impl T {} | = note: either implement a trait on it or create a newtype to wrap it instead -error: aborting due to 45 previous errors +error: aborting due to 44 previous errors Some errors have detailed explanations: E0118, E0562, E0658, E0666. For more information about an error, try `rustc --explain E0118`. diff --git a/tests/ui/lint/inline-trait-and-foreign-items.rs b/tests/ui/lint/inline-trait-and-foreign-items.rs index 39bc01f71b5a0..978ac617bab9e 100644 --- a/tests/ui/lint/inline-trait-and-foreign-items.rs +++ b/tests/ui/lint/inline-trait-and-foreign-items.rs @@ -1,5 +1,4 @@ #![feature(extern_types)] -#![feature(impl_trait_in_assoc_type)] #![warn(unused_attributes)] diff --git a/tests/ui/lint/inline-trait-and-foreign-items.stderr b/tests/ui/lint/inline-trait-and-foreign-items.stderr index 2f1fb4c46c08b..6b418466fc5b7 100644 --- a/tests/ui/lint/inline-trait-and-foreign-items.stderr +++ b/tests/ui/lint/inline-trait-and-foreign-items.stderr @@ -1,5 +1,5 @@ warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:7:5 + --> $DIR/inline-trait-and-foreign-items.rs:6:5 | LL | #[inline] | ^^^^^^^^^ @@ -7,13 +7,13 @@ LL | #[inline] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: see issue #65833 for more information note: the lint level is defined here - --> $DIR/inline-trait-and-foreign-items.rs:4:9 + --> $DIR/inline-trait-and-foreign-items.rs:3:9 | LL | #![warn(unused_attributes)] | ^^^^^^^^^^^^^^^^^ error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:11:5 + --> $DIR/inline-trait-and-foreign-items.rs:10:5 | LL | #[inline] | ^^^^^^^^^ @@ -21,7 +21,7 @@ LL | type T; | ------- not a function or closure warning: `#[inline]` is ignored on constants - --> $DIR/inline-trait-and-foreign-items.rs:18:5 + --> $DIR/inline-trait-and-foreign-items.rs:17:5 | LL | #[inline] | ^^^^^^^^^ @@ -30,7 +30,7 @@ LL | #[inline] = note: see issue #65833 for more information error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:22:5 + --> $DIR/inline-trait-and-foreign-items.rs:21:5 | LL | #[inline] | ^^^^^^^^^ @@ -38,7 +38,7 @@ LL | type T = Self; | -------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:25:5 + --> $DIR/inline-trait-and-foreign-items.rs:24:5 | LL | #[inline] | ^^^^^^^^^ @@ -46,7 +46,7 @@ LL | type U = impl Trait; | -------------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:30:5 + --> $DIR/inline-trait-and-foreign-items.rs:29:5 | LL | #[inline] | ^^^^^^^^^ @@ -54,7 +54,7 @@ LL | static X: u32; | -------------- not a function or closure error[E0518]: attribute should be applied to function or closure - --> $DIR/inline-trait-and-foreign-items.rs:33:5 + --> $DIR/inline-trait-and-foreign-items.rs:32:5 | LL | #[inline] | ^^^^^^^^^ @@ -62,7 +62,7 @@ LL | type T; | ------- not a function or closure error: unconstrained opaque type - --> $DIR/inline-trait-and-foreign-items.rs:26:14 + --> $DIR/inline-trait-and-foreign-items.rs:25:14 | LL | type U = impl Trait; | ^^^^^^^^^^ diff --git a/tests/ui/lint/no-coverage.rs b/tests/ui/lint/no-coverage.rs index 907d25d333e20..a8f827f5cbbf2 100644 --- a/tests/ui/lint/no-coverage.rs +++ b/tests/ui/lint/no-coverage.rs @@ -1,6 +1,5 @@ #![feature(extern_types)] #![feature(coverage_attribute)] -#![feature(impl_trait_in_assoc_type)] #![warn(unused_attributes)] #![coverage(off)] //~^ WARN: `#[coverage]` does not propagate into items and must be applied to the contained functions directly diff --git a/tests/ui/lint/no-coverage.stderr b/tests/ui/lint/no-coverage.stderr index a87b0fb49f00e..e1061803e1b33 100644 --- a/tests/ui/lint/no-coverage.stderr +++ b/tests/ui/lint/no-coverage.stderr @@ -1,41 +1,41 @@ warning: `#[coverage]` does not propagate into items and must be applied to the contained functions directly - --> $DIR/no-coverage.rs:8:1 + --> $DIR/no-coverage.rs:7:1 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ | note: the lint level is defined here - --> $DIR/no-coverage.rs:4:9 + --> $DIR/no-coverage.rs:3:9 | LL | #![warn(unused_attributes)] | ^^^^^^^^^^^^^^^^^ warning: `#[coverage]` does not propagate into items and must be applied to the contained functions directly - --> $DIR/no-coverage.rs:20:1 + --> $DIR/no-coverage.rs:19:1 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ warning: `#[coverage]` may only be applied to function definitions - --> $DIR/no-coverage.rs:42:5 + --> $DIR/no-coverage.rs:41:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ warning: `#[coverage]` may only be applied to function definitions - --> $DIR/no-coverage.rs:47:9 + --> $DIR/no-coverage.rs:46:9 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ warning: `#[coverage]` may only be applied to function definitions - --> $DIR/no-coverage.rs:52:5 + --> $DIR/no-coverage.rs:51:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ error[E0788]: `#[coverage]` must be applied to coverable code - --> $DIR/no-coverage.rs:11:5 + --> $DIR/no-coverage.rs:10:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -43,7 +43,7 @@ LL | const X: u32; | ------------- not coverable code error[E0788]: `#[coverage]` must be applied to coverable code - --> $DIR/no-coverage.rs:14:5 + --> $DIR/no-coverage.rs:13:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -51,7 +51,7 @@ LL | type T; | ------- not coverable code error[E0788]: `#[coverage]` must be applied to coverable code - --> $DIR/no-coverage.rs:25:5 + --> $DIR/no-coverage.rs:24:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -59,7 +59,7 @@ LL | type T = Self; | -------------- not coverable code error[E0788]: `#[coverage]` must be applied to coverable code - --> $DIR/no-coverage.rs:28:5 + --> $DIR/no-coverage.rs:27:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -67,7 +67,7 @@ LL | type U = impl Trait; | -------------------- not coverable code error[E0788]: `#[coverage]` must be applied to coverable code - --> $DIR/no-coverage.rs:33:5 + --> $DIR/no-coverage.rs:32:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -75,7 +75,7 @@ LL | static X: u32; | -------------- not coverable code error[E0788]: `#[coverage]` must be applied to coverable code - --> $DIR/no-coverage.rs:36:5 + --> $DIR/no-coverage.rs:35:5 | LL | #[coverage(off)] | ^^^^^^^^^^^^^^^^ @@ -83,13 +83,13 @@ LL | type T; | ------- not coverable code warning: `#[coverage]` does not propagate into items and must be applied to the contained functions directly - --> $DIR/no-coverage.rs:5:1 + --> $DIR/no-coverage.rs:4:1 | LL | #![coverage(off)] | ^^^^^^^^^^^^^^^^^ error: unconstrained opaque type - --> $DIR/no-coverage.rs:29:14 + --> $DIR/no-coverage.rs:28:14 | LL | type U = impl Trait; | ^^^^^^^^^^ diff --git a/tests/ui/nll/issue-78561.rs b/tests/ui/nll/issue-78561.rs index 1a2a3ca56c8d4..aa559d35a2d15 100644 --- a/tests/ui/nll/issue-78561.rs +++ b/tests/ui/nll/issue-78561.rs @@ -1,5 +1,4 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] pub trait Trait { type A; diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr index 6f9b330316378..63932da692938 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `call` - --> $DIR/location-insensitive-scopes-issue-116657.rs:18:1 + --> $DIR/location-insensitive-scopes-issue-116657.rs:16:1 | LL | fn call(x: Self) -> Self::Output; | --------------------------------- `call` from trait @@ -8,7 +8,7 @@ LL | impl Callable for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation error: unconstrained opaque type - --> $DIR/location-insensitive-scopes-issue-116657.rs:22:19 + --> $DIR/location-insensitive-scopes-issue-116657.rs:20:19 | LL | type Output = impl PlusOne; | ^^^^^^^^^^^^ @@ -16,7 +16,7 @@ LL | type Output = impl PlusOne; = note: `Output` must be used in combination with a concrete type within the same impl error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds - --> $DIR/location-insensitive-scopes-issue-116657.rs:28:5 + --> $DIR/location-insensitive-scopes-issue-116657.rs:26:5 | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne { | -- ------------ opaque type defined here diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr index 6f9b330316378..63932da692938 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr @@ -1,5 +1,5 @@ error[E0046]: not all trait items implemented, missing: `call` - --> $DIR/location-insensitive-scopes-issue-116657.rs:18:1 + --> $DIR/location-insensitive-scopes-issue-116657.rs:16:1 | LL | fn call(x: Self) -> Self::Output; | --------------------------------- `call` from trait @@ -8,7 +8,7 @@ LL | impl Callable for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation error: unconstrained opaque type - --> $DIR/location-insensitive-scopes-issue-116657.rs:22:19 + --> $DIR/location-insensitive-scopes-issue-116657.rs:20:19 | LL | type Output = impl PlusOne; | ^^^^^^^^^^^^ @@ -16,7 +16,7 @@ LL | type Output = impl PlusOne; = note: `Output` must be used in combination with a concrete type within the same impl error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds - --> $DIR/location-insensitive-scopes-issue-116657.rs:28:5 + --> $DIR/location-insensitive-scopes-issue-116657.rs:26:5 | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne { | -- ------------ opaque type defined here diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs index ec17e0b093b38..7699df0c8b0d1 100644 --- a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs +++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs @@ -4,8 +4,6 @@ // revisions: nll polonius // [polonius] compile-flags: -Zpolonius=next -#![feature(impl_trait_in_assoc_type)] - trait Callable { type Output; fn call(x: Self) -> Self::Output; diff --git a/tests/ui/privacy/private-in-public-assoc-ty.rs b/tests/ui/privacy/private-in-public-assoc-ty.rs index 5f7c4bcf2656a..adf2486b83534 100644 --- a/tests/ui/privacy/private-in-public-assoc-ty.rs +++ b/tests/ui/privacy/private-in-public-assoc-ty.rs @@ -2,7 +2,6 @@ // This test also ensures that the checks are performed even inside private modules. #![feature(associated_type_defaults)] -#![feature(impl_trait_in_assoc_type)] mod m { struct Priv; diff --git a/tests/ui/privacy/private-in-public-assoc-ty.stderr b/tests/ui/privacy/private-in-public-assoc-ty.stderr index 0931e6d9971ea..85d09f1c780b0 100644 --- a/tests/ui/privacy/private-in-public-assoc-ty.stderr +++ b/tests/ui/privacy/private-in-public-assoc-ty.stderr @@ -1,5 +1,5 @@ error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:17:9 + --> $DIR/private-in-public-assoc-ty.rs:16:9 | LL | struct Priv; | ----------- `Priv` declared as private @@ -8,44 +8,44 @@ LL | type A = Priv; | ^^^^^^ can't leak private type warning: trait `PrivTr` is more private than the item `PubTr::Alias1` - --> $DIR/private-in-public-assoc-ty.rs:24:9 + --> $DIR/private-in-public-assoc-ty.rs:23:9 | LL | type Alias1: PrivTr; | ^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias1` is reachable at visibility `pub(crate)` | note: but trait `PrivTr` is only usable at visibility `pub(self)` - --> $DIR/private-in-public-assoc-ty.rs:9:5 + --> $DIR/private-in-public-assoc-ty.rs:8:5 | LL | trait PrivTr {} | ^^^^^^^^^^^^ = note: `#[warn(private_bounds)]` on by default warning: type `Priv` is more private than the item `PubTr::Alias2` - --> $DIR/private-in-public-assoc-ty.rs:26:9 + --> $DIR/private-in-public-assoc-ty.rs:25:9 | LL | type Alias2: PubTrAux1 = u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias2` is reachable at visibility `pub(crate)` | note: but type `Priv` is only usable at visibility `pub(self)` - --> $DIR/private-in-public-assoc-ty.rs:8:5 + --> $DIR/private-in-public-assoc-ty.rs:7:5 | LL | struct Priv; | ^^^^^^^^^^^ warning: type `Priv` is more private than the item `PubTr::Alias3` - --> $DIR/private-in-public-assoc-ty.rs:28:9 + --> $DIR/private-in-public-assoc-ty.rs:27:9 | LL | type Alias3: PubTrAux2 = u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias3` is reachable at visibility `pub(crate)` | note: but type `Priv` is only usable at visibility `pub(self)` - --> $DIR/private-in-public-assoc-ty.rs:8:5 + --> $DIR/private-in-public-assoc-ty.rs:7:5 | LL | struct Priv; | ^^^^^^^^^^^ error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:31:9 + --> $DIR/private-in-public-assoc-ty.rs:30:9 | LL | struct Priv; | ----------- `Priv` declared as private @@ -54,7 +54,7 @@ LL | type Alias4 = Priv; | ^^^^^^^^^^^ can't leak private type error[E0446]: private type `Priv` in public interface - --> $DIR/private-in-public-assoc-ty.rs:38:9 + --> $DIR/private-in-public-assoc-ty.rs:37:9 | LL | struct Priv; | ----------- `Priv` declared as private @@ -63,7 +63,7 @@ LL | type Alias1 = Priv; | ^^^^^^^^^^^ can't leak private type error[E0446]: private trait `PrivTr` in public interface - --> $DIR/private-in-public-assoc-ty.rs:41:9 + --> $DIR/private-in-public-assoc-ty.rs:40:9 | LL | trait PrivTr {} | ------------ `PrivTr` declared as private diff --git a/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs b/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs index 3fb543e962411..273a6d96a9375 100644 --- a/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs +++ b/tests/ui/privacy/private-in-public-type-alias-impl-trait.rs @@ -1,5 +1,4 @@ // build-pass (FIXME(62277): could be check-pass?) -#![feature(impl_trait_in_assoc_type)] #![feature(type_alias_impl_trait)] #![deny(private_interfaces, private_bounds)] diff --git a/tests/ui/type-alias-impl-trait/assoc-type-const.rs b/tests/ui/type-alias-impl-trait/assoc-type-const.rs index e385fe045fc90..6fc18ee121436 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-const.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-const.rs @@ -4,7 +4,6 @@ // check-pass // revisions: current next //[next] compile-flags: -Znext-solver -#![feature(impl_trait_in_assoc_type)] trait UnwrapItemsExt<'a, const C: usize> { type Iter; diff --git a/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs b/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs index 7c7c68ad60afe..e69f911ce3b65 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.rs @@ -1,8 +1,6 @@ // Tests that we don't allow unconstrained lifetime parameters in impls when // the lifetime is used in an associated opaque type. -#![feature(impl_trait_in_assoc_type)] - trait UnwrapItemsExt { type Iter; fn unwrap_items(self) -> Self::Iter; diff --git a/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr b/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr index 089c3e4fd8ab2..51e07ede3ee24 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr +++ b/tests/ui/type-alias-impl-trait/assoc-type-lifetime-unconstrained.stderr @@ -1,5 +1,5 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/assoc-type-lifetime-unconstrained.rs:17:6 + --> $DIR/assoc-type-lifetime-unconstrained.rs:15:6 | LL | impl<'a, I> UnwrapItemsExt for I { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs b/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs index 81dacbcfb7ecc..edecda162a4cb 100644 --- a/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/assoc-type-lifetime.rs @@ -2,8 +2,6 @@ // lifetimes are used in an associated opaque type // check-pass -#![feature(impl_trait_in_assoc_type)] - trait UnwrapItemsExt<'a> { type Iter; fn unwrap_items(self) -> Self::Iter; diff --git a/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs b/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs index 58eaa9c2c4263..84b77be982eb3 100644 --- a/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/associated-type-impl-trait-lifetime.rs @@ -1,7 +1,5 @@ //check-pass -#![feature(impl_trait_in_assoc_type)] - trait Trait { type Opaque1; type Opaque2; diff --git a/tests/ui/type-alias-impl-trait/closure_infer.rs b/tests/ui/type-alias-impl-trait/closure_infer.rs index 04e2323ec4ae9..589ef03bc0db1 100644 --- a/tests/ui/type-alias-impl-trait/closure_infer.rs +++ b/tests/ui/type-alias-impl-trait/closure_infer.rs @@ -2,7 +2,6 @@ // Regression test for an ICE: https://github.com/rust-lang/rust/issues/119916 -#![feature(impl_trait_in_assoc_type)] #![feature(type_alias_impl_trait)] // `impl_trait_in_assoc_type` example from the bug report. diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.rs b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.rs index eb19b49c7e213..786bf18fb8763 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.rs +++ b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.rs @@ -4,8 +4,6 @@ //! degenerate into looking at an exponential number of types depending on the complexity //! of a program. -#![feature(impl_trait_in_assoc_type)] - struct Bar; trait Trait: Sized { diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr index 00aedfae46375..bf8a667d1134d 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr +++ b/tests/ui/type-alias-impl-trait/hidden_behind_projection_behind_struct_field.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/hidden_behind_projection_behind_struct_field.rs:19:22 + --> $DIR/hidden_behind_projection_behind_struct_field.rs:17:22 | LL | type Assoc = impl std::fmt::Debug; | -------------------- the expected opaque type @@ -10,7 +10,7 @@ LL | Foo { field: () } = note: expected opaque type `::Assoc` found unit type `()` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/hidden_behind_projection_behind_struct_field.rs:18:8 + --> $DIR/hidden_behind_projection_behind_struct_field.rs:16:8 | LL | fn foo() -> Foo { | ^^^ diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs index 58778702de666..10d275ebb52c8 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs +++ b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field.rs @@ -3,7 +3,6 @@ //! for making the function a defining use. It doesn't matter //! if the opaque type is actually used in the field. -#![feature(impl_trait_in_assoc_type)] // check-pass use std::marker::PhantomData; diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.rs b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.rs index 4c881dd133086..5b1f3bd6f4fb4 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.rs +++ b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.rs @@ -2,8 +2,6 @@ //! as defined by a method if the opaque type is //! only indirectly mentioned in a struct field. -#![feature(impl_trait_in_assoc_type)] - struct Bar; trait Trait: Sized { diff --git a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.stderr b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.stderr index 5c53dfa3a7500..51c7cd962ad72 100644 --- a/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.stderr +++ b/tests/ui/type-alias-impl-trait/hidden_behind_struct_field2.stderr @@ -1,12 +1,12 @@ error: item constrains opaque type that is not in its signature - --> $DIR/hidden_behind_struct_field2.rs:17:22 + --> $DIR/hidden_behind_struct_field2.rs:15:22 | LL | Foo { field: () } | ^^ | = note: this item must mention the opaque type in its signature in order to be able to register hidden types note: this item must mention the opaque type in its signature in order to be able to register hidden types - --> $DIR/hidden_behind_struct_field2.rs:16:8 + --> $DIR/hidden_behind_struct_field2.rs:14:8 | LL | fn foo() -> Foo { | ^^^ diff --git a/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.rs b/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.rs index a3f65146f75fb..1c2e0e67b6d28 100644 --- a/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.rs +++ b/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - // We weren't checking that the trait and impl generics line up in the // normalization-shortcut code in `OpaqueTypeCollector`. diff --git a/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.stderr b/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.stderr index 13f5d8b8ea6e2..85b6edad30473 100644 --- a/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.stderr +++ b/tests/ui/type-alias-impl-trait/impl-trait-in-type-alias-with-bad-substs.stderr @@ -1,5 +1,5 @@ error[E0049]: type `Baz` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/impl-trait-in-type-alias-with-bad-substs.rs:19:14 + --> $DIR/impl-trait-in-type-alias-with-bad-substs.rs:17:14 | LL | type Baz<'a>; | -- expected 0 type parameters @@ -8,7 +8,7 @@ LL | type Baz = impl Sized; | ^ found 1 type parameter error: unconstrained opaque type - --> $DIR/impl-trait-in-type-alias-with-bad-substs.rs:19:19 + --> $DIR/impl-trait-in-type-alias-with-bad-substs.rs:17:19 | LL | type Baz = impl Sized; | ^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs b/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs index 1824ff5e2fb82..7cb3900526af4 100644 --- a/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs +++ b/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.rs @@ -1,8 +1,6 @@ // Ensure that we don't ICE if associated type impl trait is used in an impl // with an unconstrained type parameter. -#![feature(impl_trait_in_assoc_type)] - trait X { type I; fn f() -> Self::I; diff --git a/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr b/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr index 137a4db81b563..d2bcb8531d797 100644 --- a/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr +++ b/tests/ui/type-alias-impl-trait/impl-with-unconstrained-param.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates - --> $DIR/impl-with-unconstrained-param.rs:11:6 + --> $DIR/impl-with-unconstrained-param.rs:9:6 | LL | impl X for () { | ^ unconstrained type parameter diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.rs b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.rs index a788563ab779e..c2a7355ad1bfb 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.rs @@ -1,8 +1,6 @@ //! Check that we cannot instantiate a hidden type in the body //! of an assoc fn or const unless mentioned in the signature. -#![feature(impl_trait_in_assoc_type)] - trait Trait: Sized { type Assoc; fn foo(); diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.stderr b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.stderr index 1d7a97c536713..1185594e0aa80 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.stderr +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:15:30 + --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:13:30 | LL | type Assoc = impl std::fmt::Debug; | -------------------- the expected opaque type @@ -12,13 +12,13 @@ LL | let x: Self::Assoc = 42; = note: expected opaque type `<() as Trait>::Assoc` found type `{integer}` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:14:8 + --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:12:8 | LL | fn foo() { | ^^^ error[E0308]: mismatched types - --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:31:30 + --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:29:30 | LL | type Assoc = impl std::fmt::Debug; | -------------------- the expected opaque type @@ -31,7 +31,7 @@ LL | let x: Self::Assoc = 42; = note: expected opaque type `<() as Trait2>::Assoc` found type `{integer}` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:30:11 + --> $DIR/impl_trait_in_trait_defined_outside_trait.rs:28:11 | LL | const FOO: () = { | ^^^ diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.rs b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.rs index 77cdca198daea..0773117c32f51 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.rs @@ -1,7 +1,5 @@ //! Check that we cannot instantiate a hidden type from another assoc type. -#![feature(impl_trait_in_assoc_type)] - trait Trait: Sized { type Assoc; type Foo; diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.stderr b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.stderr index 708c3f28d2d2e..13ae4c888257e 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.stderr +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait2.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/impl_trait_in_trait_defined_outside_trait2.rs:14:30 + --> $DIR/impl_trait_in_trait_defined_outside_trait2.rs:12:30 | LL | type Assoc = impl std::fmt::Debug; | -------------------- the expected opaque type diff --git a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs index dfcf733653376..c4c7ee3eb1932 100644 --- a/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs +++ b/tests/ui/type-alias-impl-trait/impl_trait_in_trait_defined_outside_trait3.rs @@ -3,8 +3,6 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] - trait Trait: Sized { type Assoc; fn foo(); diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs index 06c119287d745..38a01c2722b87 100644 --- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs +++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds.rs @@ -1,6 +1,6 @@ // check-pass -#![feature(impl_trait_in_assoc_type, type_alias_impl_trait)] +#![feature(type_alias_impl_trait)] mod foo { pub trait Callable { diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs index 5d5645077c2a4..f9ed8474ae95e 100644 --- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs +++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Callable { type Output; fn call(x: Self) -> Self::Output; diff --git a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr index 9bffa94fda165..91a643015d1d6 100644 --- a/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr +++ b/tests/ui/type-alias-impl-trait/imply_bounds_from_bounds_param.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds - --> $DIR/imply_bounds_from_bounds_param.rs:26:5 + --> $DIR/imply_bounds_from_bounds_param.rs:24:5 | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne { | -- ------------ opaque type defined here diff --git a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.rs b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.rs index baeba1d3de635..4f0418582bded 100644 --- a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.rs +++ b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Assoc<'a, 'b>; fn bar<'a: 'a, 'b: 'b>(_: &'a ()) -> Self::Assoc<'a, 'b>; diff --git a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.stderr b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.stderr index a7d3e7f0be403..2edef2e040140 100644 --- a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.stderr +++ b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `<() as Foo>::Assoc<'b, 'a>` captures lifetime that does not appear in bounds - --> $DIR/in-assoc-ty-early-bound.rs:11:60 + --> $DIR/in-assoc-ty-early-bound.rs:9:60 | LL | type Assoc<'a, 'b> = impl Sized; | ---------- opaque type defined here diff --git a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.rs b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.rs index 7452000b65dc8..2cc6e3b9ee86a 100644 --- a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.rs +++ b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Assoc<'a>; fn bar<'a: 'a>(); diff --git a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.stderr b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.stderr index 1274a8b60dea0..ed8e21126b538 100644 --- a/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.stderr +++ b/tests/ui/type-alias-impl-trait/in-assoc-ty-early-bound2.stderr @@ -1,5 +1,5 @@ error[E0700]: hidden type for `<() as Foo>::Assoc<'a>` captures lifetime that does not appear in bounds - --> $DIR/in-assoc-ty-early-bound2.rs:15:20 + --> $DIR/in-assoc-ty-early-bound2.rs:13:20 | LL | type Assoc<'a> = impl Sized; | ---------- opaque type defined here @@ -10,7 +10,7 @@ LL | let _: Self::Assoc<'a> = x; | ^^^^^^^^^^^^^^^ error: unconstrained opaque type - --> $DIR/in-assoc-ty-early-bound2.rs:9:22 + --> $DIR/in-assoc-ty-early-bound2.rs:7:22 | LL | type Assoc<'a> = impl Sized; | ^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs b/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs index 8df59c68fefc2..06ea8889844a3 100644 --- a/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs +++ b/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.rs @@ -1,7 +1,6 @@ // Regression test for issue 67856 #![feature(unboxed_closures)] -#![feature(impl_trait_in_assoc_type)] #![feature(fn_traits)] trait MyTrait {} diff --git a/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr b/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr index f0cf681d8bb72..1122c60731c18 100644 --- a/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr +++ b/tests/ui/type-alias-impl-trait/incoherent-assoc-imp-trait.stderr @@ -1,5 +1,5 @@ error[E0210]: type parameter `F` must be used as the type parameter for some local type (e.g., `MyStruct`) - --> $DIR/incoherent-assoc-imp-trait.rs:10:6 + --> $DIR/incoherent-assoc-imp-trait.rs:9:6 | LL | impl FnOnce<()> for &F { | ^ type parameter `F` must be used as the type parameter for some local type diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs index e7b23d5f8a1c9..d7e631e26cd05 100644 --- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs +++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.rs @@ -1,8 +1,6 @@ // edition: 2021 // build-fail -#![feature(impl_trait_in_assoc_type)] - use core::future::Future; trait Recur { diff --git a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr index b62186103c7cb..d7fa75806ca93 100644 --- a/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr +++ b/tests/ui/type-alias-impl-trait/indirect-recursion-issue-112047.stderr @@ -1,5 +1,5 @@ error[E0733]: recursion in an async block requires boxing - --> $DIR/indirect-recursion-issue-112047.rs:22:9 + --> $DIR/indirect-recursion-issue-112047.rs:20:9 | LL | async move { recur(self).await; } | ^^^^^^^^^^^^^-----------------^^^ @@ -7,7 +7,7 @@ LL | async move { recur(self).await; } | recursive call here | note: which leads to this async fn - --> $DIR/indirect-recursion-issue-112047.rs:14:1 + --> $DIR/indirect-recursion-issue-112047.rs:12:1 | LL | async fn recur(t: impl Recur) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.rs b/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.rs index 93c52126d69b0..e6fee572ed55b 100644 --- a/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.rs +++ b/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Foo; fn bar(); diff --git a/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr b/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr index 169d8e41d20d7..17802e2aae33c 100644 --- a/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr +++ b/tests/ui/type-alias-impl-trait/invalid_impl_trait_in_assoc_ty.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/invalid_impl_trait_in_assoc_ty.rs:11:28 + --> $DIR/invalid_impl_trait_in_assoc_ty.rs:9:28 | LL | type Foo = impl std::fmt::Debug; | -------------------- the expected opaque type @@ -12,7 +12,7 @@ LL | let x: Self::Foo = (); = note: expected opaque type `<() as Foo>::Foo` found unit type `()` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/invalid_impl_trait_in_assoc_ty.rs:10:8 + --> $DIR/invalid_impl_trait_in_assoc_ty.rs:8:8 | LL | fn bar() { | ^^^ diff --git a/tests/ui/type-alias-impl-trait/issue-53598.rs b/tests/ui/type-alias-impl-trait/issue-53598.rs index e3e2787b66bb4..6e1c90d02808d 100644 --- a/tests/ui/type-alias-impl-trait/issue-53598.rs +++ b/tests/ui/type-alias-impl-trait/issue-53598.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - use std::fmt::Debug; pub trait Foo { diff --git a/tests/ui/type-alias-impl-trait/issue-53598.stderr b/tests/ui/type-alias-impl-trait/issue-53598.stderr index a31aabedba542..9692f88d43d2a 100644 --- a/tests/ui/type-alias-impl-trait/issue-53598.stderr +++ b/tests/ui/type-alias-impl-trait/issue-53598.stderr @@ -1,5 +1,5 @@ error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-53598.rs:20:9 + --> $DIR/issue-53598.rs:18:9 | LL | S::(Default::default()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs b/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs index 3bdb3bf1d5305..b0d7640ce3e88 100644 --- a/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs +++ b/tests/ui/type-alias-impl-trait/issue-57188-associate-impl-capture.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] - struct Baz<'a> { source: &'a str, } diff --git a/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs b/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs index 3917bb3b6cfbf..515f191819ec1 100644 --- a/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs +++ b/tests/ui/type-alias-impl-trait/issue-57611-trait-alias.rs @@ -3,7 +3,6 @@ // Ensures that we don't ICE #![feature(trait_alias)] -#![feature(impl_trait_in_assoc_type)] trait Foo { type Bar: Baz; diff --git a/tests/ui/type-alias-impl-trait/issue-57700.rs b/tests/ui/type-alias-impl-trait/issue-57700.rs index 8746545ecc9ef..1368170e4c31b 100644 --- a/tests/ui/type-alias-impl-trait/issue-57700.rs +++ b/tests/ui/type-alias-impl-trait/issue-57700.rs @@ -1,5 +1,4 @@ #![feature(arbitrary_self_types)] -#![feature(impl_trait_in_assoc_type)] use std::ops::Deref; diff --git a/tests/ui/type-alias-impl-trait/issue-57700.stderr b/tests/ui/type-alias-impl-trait/issue-57700.stderr index 7efb05f40b079..3fea6c112ee4f 100644 --- a/tests/ui/type-alias-impl-trait/issue-57700.stderr +++ b/tests/ui/type-alias-impl-trait/issue-57700.stderr @@ -1,5 +1,5 @@ error: type parameter `impl Deref` is part of concrete type but not used in parameter list for the `impl Trait` type alias - --> $DIR/issue-57700.rs:16:9 + --> $DIR/issue-57700.rs:15:9 | LL | self | ^^^^ diff --git a/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs b/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs index 841bac5f6a0f4..0a92056461eb6 100644 --- a/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs +++ b/tests/ui/type-alias-impl-trait/issue-57807-associated-type.rs @@ -2,7 +2,6 @@ // that we properly unify associated types within // a type alias impl trait // check-pass -#![feature(impl_trait_in_assoc_type)] trait Bar { type A; diff --git a/tests/ui/type-alias-impl-trait/issue-58887.rs b/tests/ui/type-alias-impl-trait/issue-58887.rs index 9675867656a96..c5970bc7a8154 100644 --- a/tests/ui/type-alias-impl-trait/issue-58887.rs +++ b/tests/ui/type-alias-impl-trait/issue-58887.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(impl_trait_in_assoc_type)] - trait UnwrapItemsExt { type Iter; fn unwrap_items(self) -> Self::Iter; diff --git a/tests/ui/type-alias-impl-trait/issue-60371.rs b/tests/ui/type-alias-impl-trait/issue-60371.rs index a6173967333c0..69bc8b38b04b1 100644 --- a/tests/ui/type-alias-impl-trait/issue-60371.rs +++ b/tests/ui/type-alias-impl-trait/issue-60371.rs @@ -5,7 +5,7 @@ trait Bug { } impl Bug for &() { - type Item = impl Bug; //~ ERROR `impl Trait` in associated types is unstable + type Item = impl Bug; const FUN: fn() -> Self::Item = || (); //~^ ERROR the trait bound `(): Bug` is not satisfied diff --git a/tests/ui/type-alias-impl-trait/issue-60371.stderr b/tests/ui/type-alias-impl-trait/issue-60371.stderr index 1c83b0655f5ee..0b1427b75dfce 100644 --- a/tests/ui/type-alias-impl-trait/issue-60371.stderr +++ b/tests/ui/type-alias-impl-trait/issue-60371.stderr @@ -1,13 +1,3 @@ -error[E0658]: `impl Trait` in associated types is unstable - --> $DIR/issue-60371.rs:8:17 - | -LL | type Item = impl Bug; - | ^^^^^^^^ - | - = note: see issue #63063 for more information - = help: add `#![feature(impl_trait_in_assoc_type)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - error[E0277]: the trait bound `(): Bug` is not satisfied --> $DIR/issue-60371.rs:10:40 | @@ -16,7 +6,6 @@ LL | const FUN: fn() -> Self::Item = || (); | = help: the trait `Bug` is implemented for `&()` -error: aborting due to 2 previous errors +error: aborting due to 1 previous error -Some errors have detailed explanations: E0277, E0658. -For more information about an error, try `rustc --explain E0277`. +For more information about this error, try `rustc --explain E0277`. diff --git a/tests/ui/type-alias-impl-trait/issue-60564-working.rs b/tests/ui/type-alias-impl-trait/issue-60564-working.rs index c4687c29de8e1..fb2698e57a582 100644 --- a/tests/ui/type-alias-impl-trait/issue-60564-working.rs +++ b/tests/ui/type-alias-impl-trait/issue-60564-working.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - // check-pass trait IterBits { diff --git a/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs b/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs index 0245eab796948..1687da3a23e2c 100644 --- a/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs +++ b/tests/ui/type-alias-impl-trait/issue-62000-associate-impl-trait-lifetimes.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] - trait MyTrait { type AssocType: Send; fn ret(&self) -> Self::AssocType; diff --git a/tests/ui/type-alias-impl-trait/issue-74761-2.rs b/tests/ui/type-alias-impl-trait/issue-74761-2.rs index f582592e9bcc8..af2d2e4ca02c6 100644 --- a/tests/ui/type-alias-impl-trait/issue-74761-2.rs +++ b/tests/ui/type-alias-impl-trait/issue-74761-2.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - pub trait A { type B; fn f(&self) -> Self::B; diff --git a/tests/ui/type-alias-impl-trait/issue-74761-2.stderr b/tests/ui/type-alias-impl-trait/issue-74761-2.stderr index f15d0a069ca8a..ab0b3e8ac64d4 100644 --- a/tests/ui/type-alias-impl-trait/issue-74761-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-74761-2.stderr @@ -1,11 +1,11 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761-2.rs:7:6 + --> $DIR/issue-74761-2.rs:5:6 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761-2.rs:7:10 + --> $DIR/issue-74761-2.rs:5:10 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/type-alias-impl-trait/issue-74761.rs b/tests/ui/type-alias-impl-trait/issue-74761.rs index f582592e9bcc8..af2d2e4ca02c6 100644 --- a/tests/ui/type-alias-impl-trait/issue-74761.rs +++ b/tests/ui/type-alias-impl-trait/issue-74761.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - pub trait A { type B; fn f(&self) -> Self::B; diff --git a/tests/ui/type-alias-impl-trait/issue-74761.stderr b/tests/ui/type-alias-impl-trait/issue-74761.stderr index 1d016fe070f9c..0d283cf3d1e75 100644 --- a/tests/ui/type-alias-impl-trait/issue-74761.stderr +++ b/tests/ui/type-alias-impl-trait/issue-74761.stderr @@ -1,11 +1,11 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:7:6 + --> $DIR/issue-74761.rs:5:6 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter error[E0207]: the lifetime parameter `'b` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-74761.rs:7:10 + --> $DIR/issue-74761.rs:5:10 | LL | impl<'a, 'b> A for () { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/type-alias-impl-trait/issue-78450.rs b/tests/ui/type-alias-impl-trait/issue-78450.rs index c51dfb6782b7a..7a7ad1f2648a6 100644 --- a/tests/ui/type-alias-impl-trait/issue-78450.rs +++ b/tests/ui/type-alias-impl-trait/issue-78450.rs @@ -2,8 +2,6 @@ // revisions: current next //[next] compile-flags: -Znext-solver -#![feature(impl_trait_in_assoc_type)] - pub trait AssociatedImpl { type ImplTrait; diff --git a/tests/ui/type-alias-impl-trait/issue-89952.rs b/tests/ui/type-alias-impl-trait/issue-89952.rs index f0ba9fa7cec29..7953231ebe4ae 100644 --- a/tests/ui/type-alias-impl-trait/issue-89952.rs +++ b/tests/ui/type-alias-impl-trait/issue-89952.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(impl_trait_in_assoc_type)] - trait SomeTrait {} impl SomeTrait for () {} diff --git a/tests/ui/type-alias-impl-trait/issue-90400-1.rs b/tests/ui/type-alias-impl-trait/issue-90400-1.rs index 50207605748c8..4d46bfbe7398a 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-1.rs +++ b/tests/ui/type-alias-impl-trait/issue-90400-1.rs @@ -1,8 +1,6 @@ // Regression test for #90400, // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836 -#![feature(impl_trait_in_assoc_type)] - trait Bar { fn bar(&self); } diff --git a/tests/ui/type-alias-impl-trait/issue-90400-1.stderr b/tests/ui/type-alias-impl-trait/issue-90400-1.stderr index bc233a5321437..ff953f2284ae7 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-1.stderr +++ b/tests/ui/type-alias-impl-trait/issue-90400-1.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `B: Bar` is not satisfied - --> $DIR/issue-90400-1.rs:22:9 + --> $DIR/issue-90400-1.rs:20:9 | LL | move || bar.bar() | ^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `B` | note: required by a bound in `::foo` - --> $DIR/issue-90400-1.rs:21:15 + --> $DIR/issue-90400-1.rs:19:15 | LL | fn foo(&self, bar: B) -> Self::FooFn { | ^^^ required by this bound in `::foo` diff --git a/tests/ui/type-alias-impl-trait/issue-90400-2.rs b/tests/ui/type-alias-impl-trait/issue-90400-2.rs index 60ff962ea2e30..14cbe160cf2f2 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-2.rs +++ b/tests/ui/type-alias-impl-trait/issue-90400-2.rs @@ -1,8 +1,6 @@ // Regression test for #90400, // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836 -#![feature(impl_trait_in_assoc_type)] - trait Bar { fn bar(&self); } diff --git a/tests/ui/type-alias-impl-trait/issue-90400-2.stderr b/tests/ui/type-alias-impl-trait/issue-90400-2.stderr index 5e978e97d6b50..83e611f3eeb38 100644 --- a/tests/ui/type-alias-impl-trait/issue-90400-2.stderr +++ b/tests/ui/type-alias-impl-trait/issue-90400-2.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `B: Bar` is not satisfied - --> $DIR/issue-90400-2.rs:25:9 + --> $DIR/issue-90400-2.rs:23:9 | LL | MyBaz(bar) | ^^^^^^^^^^ the trait `Bar` is not implemented for `B`, which is required by `MyBaz: Baz` | note: required for `MyBaz` to implement `Baz` - --> $DIR/issue-90400-2.rs:30:14 + --> $DIR/issue-90400-2.rs:28:14 | LL | impl Baz for MyBaz { | --- ^^^ ^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/issue-94429.rs b/tests/ui/type-alias-impl-trait/issue-94429.rs index 306e73003fa98..9217bbce1f145 100644 --- a/tests/ui/type-alias-impl-trait/issue-94429.rs +++ b/tests/ui/type-alias-impl-trait/issue-94429.rs @@ -1,4 +1,4 @@ -#![feature(impl_trait_in_assoc_type, coroutine_trait, coroutines)] +#![feature(coroutine_trait, coroutines)] use std::ops::Coroutine; trait Runnable { diff --git a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr index 4acc47eaef220..65225951867cf 100644 --- a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr +++ b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.bad.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/itiat-allow-nested-closures.rs:21:22 + --> $DIR/itiat-allow-nested-closures.rs:19:22 | LL | type Assoc = impl Sized; | ---------- the found opaque type @@ -10,7 +10,7 @@ LL | let _: i32 = closure(); | expected due to this error[E0308]: mismatched types - --> $DIR/itiat-allow-nested-closures.rs:22:9 + --> $DIR/itiat-allow-nested-closures.rs:20:9 | LL | fn bar() -> Self::Assoc { | ----------- expected `()` because of return type diff --git a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs index 55994d6a3259d..0f46e016e1535 100644 --- a/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs +++ b/tests/ui/type-alias-impl-trait/itiat-allow-nested-closures.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - // revisions: ok bad // [ok] check-pass diff --git a/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.rs b/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.rs index 8c9d780c1119d..9a3cca69bd2ee 100644 --- a/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.rs +++ b/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Assoc; fn bar() -> Self::Assoc; diff --git a/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.stderr b/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.stderr index c177201431a61..670c79249bbe5 100644 --- a/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.stderr +++ b/tests/ui/type-alias-impl-trait/itiat-forbid-nested-items.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/itiat-forbid-nested-items.rs:12:41 + --> $DIR/itiat-forbid-nested-items.rs:10:41 | LL | type Assoc = impl Sized; | ---------- the expected opaque type @@ -12,7 +12,7 @@ LL | let x: <() as Foo>::Assoc = 42_i32; = note: expected opaque type `<() as Foo>::Assoc` found type `i32` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/itiat-forbid-nested-items.rs:11:12 + --> $DIR/itiat-forbid-nested-items.rs:9:12 | LL | fn foo() -> <() as Foo>::Assoc { | ^^^ diff --git a/tests/ui/type-alias-impl-trait/multi-error.rs b/tests/ui/type-alias-impl-trait/multi-error.rs index b5ff06572d06e..ed6cbd3b4d89d 100644 --- a/tests/ui/type-alias-impl-trait/multi-error.rs +++ b/tests/ui/type-alias-impl-trait/multi-error.rs @@ -3,8 +3,6 @@ //! with their hidden types if we failed the //! defining scope check at the signature level. -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Bar; type Baz; diff --git a/tests/ui/type-alias-impl-trait/multi-error.stderr b/tests/ui/type-alias-impl-trait/multi-error.stderr index b0e6d13b0e1f0..2af69c8198637 100644 --- a/tests/ui/type-alias-impl-trait/multi-error.stderr +++ b/tests/ui/type-alias-impl-trait/multi-error.stderr @@ -1,11 +1,11 @@ error[E0792]: non-defining opaque type use in defining scope - --> $DIR/multi-error.rs:17:17 + --> $DIR/multi-error.rs:15:17 | LL | fn foo() -> (Self::Bar, Self::Baz) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument `u32` is not a generic parameter | note: for this opaque type - --> $DIR/multi-error.rs:15:19 + --> $DIR/multi-error.rs:13:19 | LL | type Bar = impl Sized; | ^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs index 1ccd1b0cbad4b..edc686a1ac8e6 100644 --- a/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs +++ b/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs @@ -3,7 +3,6 @@ //~^^ ERROR overflow evaluating the requirement `<() as B>::Assoc == _` #![feature(rustc_attrs)] -#![feature(impl_trait_in_assoc_type)] #[rustc_coinductive] trait A { diff --git a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs index 5f3dbaa179891..3cdd669d67c47 100644 --- a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs +++ b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs @@ -7,8 +7,6 @@ // edition: 2021 // check-pass -#![feature(impl_trait_in_assoc_type)] - use std::future::Future; pub struct MemtableLocalStateStore { diff --git a/tests/ui/type-alias-impl-trait/non-defining-method.rs b/tests/ui/type-alias-impl-trait/non-defining-method.rs index 2f4a7052f7221..096b097677588 100644 --- a/tests/ui/type-alias-impl-trait/non-defining-method.rs +++ b/tests/ui/type-alias-impl-trait/non-defining-method.rs @@ -3,8 +3,6 @@ //! with their hidden types if we failed the //! defining scope check at the signature level. -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Bar; fn foo() -> Self::Bar; diff --git a/tests/ui/type-alias-impl-trait/non-defining-method.stderr b/tests/ui/type-alias-impl-trait/non-defining-method.stderr index 2ba4c90a1c431..aca26d416b4a2 100644 --- a/tests/ui/type-alias-impl-trait/non-defining-method.stderr +++ b/tests/ui/type-alias-impl-trait/non-defining-method.stderr @@ -1,11 +1,11 @@ error[E0792]: non-defining opaque type use in defining scope - --> $DIR/non-defining-method.rs:16:17 + --> $DIR/non-defining-method.rs:14:17 | LL | fn foo() -> Self::Bar {} | ^^^^^^^^^^^^^^ argument `u32` is not a generic parameter | note: for this opaque type - --> $DIR/non-defining-method.rs:15:19 + --> $DIR/non-defining-method.rs:13:19 | LL | type Bar = impl Sized; | ^^^^^^^^^^ diff --git a/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.rs b/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.rs index 131f8d999d878..c2cc3dff5d55d 100644 --- a/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.rs +++ b/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.rs @@ -1,5 +1,3 @@ -#![feature(impl_trait_in_assoc_type)] - trait Foo { type Assoc; diff --git a/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr b/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr index d4528fb76fed9..674c94391fbd4 100644 --- a/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr +++ b/tests/ui/type-alias-impl-trait/not-matching-trait-refs-isnt-defining.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/not-matching-trait-refs-isnt-defining.rs:17:54 + --> $DIR/not-matching-trait-refs-isnt-defining.rs:15:54 | LL | type Assoc = impl Sized; | ---------- the expected opaque type @@ -12,7 +12,7 @@ LL | let _: >::Assoc = ""; = note: expected opaque type `<() as Foo>::Assoc` found reference `&'static str` note: this item must have the opaque type in its signature in order to be able to register hidden types - --> $DIR/not-matching-trait-refs-isnt-defining.rs:16:8 + --> $DIR/not-matching-trait-refs-isnt-defining.rs:14:8 | LL | fn test() -> <() as Foo>::Assoc { | ^^^^ diff --git a/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs b/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs index 39f0b9a02eeae..f58a895544be1 100644 --- a/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs +++ b/tests/ui/type-alias-impl-trait/struct-assignment-validity.rs @@ -4,8 +4,6 @@ // Check that we don't cause cycle errors when validating pre-`Reveal::All` MIR // that assigns opaques through normalized projections. -#![feature(impl_trait_in_assoc_type)] - struct Bar; trait Trait { diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs index 296a3f3e30072..dd56c82e2aa19 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.rs @@ -1,7 +1,5 @@ // regression test for #74018 -#![feature(impl_trait_in_assoc_type)] - trait Trait { type Associated; fn into(self) -> Self::Associated; diff --git a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr index cff2695304ae2..86402128be965 100644 --- a/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr +++ b/tests/ui/type-alias-impl-trait/type-alias-impl-trait-unconstrained-lifetime.stderr @@ -1,5 +1,5 @@ error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates - --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:10:6 + --> $DIR/type-alias-impl-trait-unconstrained-lifetime.rs:8:6 | LL | impl<'a, I: Iterator> Trait for (i32, I) { | ^^ unconstrained lifetime parameter diff --git a/tests/ui/type-alias-impl-trait/variance.rs b/tests/ui/type-alias-impl-trait/variance.rs index e92cf2513e731..8e48b4ac583c0 100644 --- a/tests/ui/type-alias-impl-trait/variance.rs +++ b/tests/ui/type-alias-impl-trait/variance.rs @@ -1,4 +1,4 @@ -#![feature(rustc_attrs, type_alias_impl_trait, impl_trait_in_assoc_type)] +#![feature(rustc_attrs, type_alias_impl_trait)] #![allow(internal_features)] #![rustc_variance_of_opaques] diff --git a/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr b/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr index c4ad8434ed147..7d72c9f811af4 100644 --- a/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr +++ b/tests/ui/type-alias-impl-trait/wf-in-associated-type.fail.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/wf-in-associated-type.rs:38:23 + --> $DIR/wf-in-associated-type.rs:36:23 | LL | impl<'a, T> Trait<'a, T> for () { | -- the parameter type `T` must be valid for the lifetime `'a` as defined here... @@ -12,7 +12,7 @@ LL | impl<'a, T: 'a> Trait<'a, T> for () { | ++++ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/wf-in-associated-type.rs:38:23 + --> $DIR/wf-in-associated-type.rs:36:23 | LL | impl<'a, T> Trait<'a, T> for () { | -- the parameter type `T` must be valid for the lifetime `'a` as defined here... diff --git a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs index 22e2b0efd1f34..7f9e285ff7602 100644 --- a/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs +++ b/tests/ui/type-alias-impl-trait/wf-in-associated-type.rs @@ -6,8 +6,6 @@ // [pass_next] check-pass // [fail] check-fail -#![feature(impl_trait_in_assoc_type)] - // The hidden type here (`&'a T`) requires proving `T: 'a`. // We know it holds because of implied bounds from the impl header. #[cfg(any(pass, pass_next))]