From 3cf0e98dc9a67086f4e738edb9d61b2fee1a38b0 Mon Sep 17 00:00:00 2001 From: Jack Huey <31162821+jackh726@users.noreply.github.com> Date: Wed, 4 May 2022 10:22:19 -0400 Subject: [PATCH] Stabilize GATs --- compiler/rustc_ast_passes/src/feature_gate.rs | 22 +----- compiler/rustc_feature/src/accepted.rs | 2 + compiler/rustc_feature/src/active.rs | 2 - compiler/rustc_lint_defs/src/builtin.rs | 2 - compiler/rustc_metadata/src/lib.rs | 2 +- compiler/rustc_middle/src/lib.rs | 2 +- .../src/traits/project.rs | 2 - src/librustdoc/lib.rs | 2 +- src/test/pretty/gat-bounds.rs | 2 - .../generic-associated-types/gats.rs | 2 +- .../rustdoc/generic-associated-types/gats.rs | 1 - .../generic-associated-types/issue-94683.rs | 1 - src/test/rustdoc/where.rs | 1 - .../associated-type-bounds/binder-on-bound.rs | 2 - .../binder-on-bound.stderr | 2 +- .../ui/associated-type-bounds/issue-79949.rs | 1 - src/test/ui/deriving/issue-89188-gat-hrtb.rs | 2 - .../feature-gate-generic_associated_types.rs | 31 -------- ...ature-gate-generic_associated_types.stderr | 78 ------------------- ...-gate-generic_associated_types_extended.rs | 2 - ...e-generic_associated_types_extended.stderr | 2 +- .../anonymize-bound-vars.rs | 1 - .../auxiliary/foo_defn.rs | 2 - .../bugs/issue-80626.rs | 2 - .../bugs/issue-80626.stderr | 4 +- .../bugs/issue-86218.rs | 1 - .../bugs/issue-86218.stderr | 6 +- .../bugs/issue-87735.rs | 2 - .../bugs/issue-87735.stderr | 2 +- .../bugs/issue-87755.rs | 2 - .../bugs/issue-87755.stderr | 2 +- .../bugs/issue-87803.rs | 2 - .../bugs/issue-87803.stderr | 2 +- .../bugs/issue-88382.rs | 2 - .../bugs/issue-88382.stderr | 4 +- .../bugs/issue-88460.rs | 2 - .../bugs/issue-88460.stderr | 4 +- .../bugs/issue-88526.rs | 2 - .../bugs/issue-88526.stderr | 2 +- .../bugs/issue-89008.rs | 1 - .../bugs/issue-89008.stderr | 4 +- .../{ => bugs}/issue-91762.rs | 5 +- .../{ => bugs}/issue-91762.stderr | 2 +- .../collections-project-default.rs | 1 - .../collections-project-default.stderr | 2 +- .../generic-associated-types/collections.rs | 1 - .../collectivity-regression.rs | 2 - .../collectivity-regression.stderr | 2 +- ...nst-generics-gat-in-trait-return-type-1.rs | 1 - ...nst-generics-gat-in-trait-return-type-2.rs | 1 - ...nst-generics-gat-in-trait-return-type-3.rs | 1 - .../const_params_have_right_type.rs | 2 - .../const_params_have_right_type.stderr | 2 +- .../constraint-assoc-type-suggestion.rs | 2 - .../constraint-assoc-type-suggestion.stderr | 2 +- .../construct_with_other_type.rs | 2 - .../cross-crate-bounds.stderr | 2 +- .../elided-in-expr-position.rs | 1 - .../elided-in-expr-position.stderr | 8 +- .../empty_generics.rs | 2 - .../empty_generics.stderr | 2 +- .../extended/lending_iterator.base.stderr | 2 +- .../extended/lending_iterator.rs | 1 - .../extended/lending_iterator_2.base.stderr | 2 +- .../extended/lending_iterator_2.rs | 1 - .../gat-dont-ice-on-absent-feature-2.rs | 16 ---- .../gat-dont-ice-on-absent-feature-2.stderr | 21 ----- .../gat-dont-ice-on-absent-feature.rs | 16 ---- .../gat-dont-ice-on-absent-feature.stderr | 19 ----- .../gat-in-trait-path-undeclared-lifetime.rs | 2 - ...t-in-trait-path-undeclared-lifetime.stderr | 4 +- .../gat-in-trait-path.base.stderr | 4 +- .../gat-in-trait-path.rs | 1 - .../gat-incomplete-warning.rs | 5 -- .../gat-trait-path-generic-type-arg.rs | 2 - .../gat-trait-path-generic-type-arg.stderr | 6 +- .../gat-trait-path-missing-lifetime.rs | 2 - .../gat-trait-path-missing-lifetime.stderr | 8 +- .../gat-trait-path-parenthesised-args.rs | 2 - .../gat-trait-path-parenthesised-args.stderr | 18 ++--- .../generic-associated-type-bounds.rs | 2 - .../generic-associated-types-where.rs | 2 - .../generic-associated-types-where.stderr | 4 +- ...ic_associated_type_undeclared_lifetimes.rs | 2 - ...ssociated_type_undeclared_lifetimes.stderr | 4 +- .../generic-associated-types/impl_bounds.rs | 1 - .../impl_bounds.stderr | 22 +++--- .../impl_bounds_ok.rs | 1 - .../generic-associated-types/issue-101020.rs | 2 - .../issue-101020.stderr | 6 +- .../issue-47206-where-clause.rs | 2 - .../issue-47206-where-clause.stderr | 2 +- .../issue-58694-parameter-out-of-range.rs | 2 - .../issue-62326-parameter-out-of-range.rs | 2 - .../generic-associated-types/issue-67424.rs | 2 +- .../issue-67424.stderr | 12 --- .../issue-67510-pass.base.stderr | 4 +- .../issue-67510-pass.rs | 1 - .../generic-associated-types/issue-67510.rs | 2 - .../issue-67510.stderr | 8 +- .../issue-68641-check-gat-bounds.rs | 2 - .../issue-68641-check-gat-bounds.stderr | 4 +- .../issue-68642-broken-llvm-ir.rs | 2 - .../issue-68642-broken-llvm-ir.stderr | 4 +- .../issue-68643-broken-mir.rs | 2 - .../issue-68643-broken-mir.stderr | 4 +- .../issue-68644-codegen-selection.rs | 2 - .../issue-68644-codegen-selection.stderr | 4 +- .../issue-68645-codegen-fulfillment.rs | 2 - .../issue-68645-codegen-fulfillment.stderr | 4 +- .../generic-associated-types/issue-68648-1.rs | 3 - .../generic-associated-types/issue-68648-2.rs | 2 - .../issue-68648-2.stderr | 4 +- .../issue-68649-pass.rs | 2 - .../generic-associated-types/issue-68653.rs | 2 - .../issue-68656-unsized-values.rs | 2 - .../issue-68656-unsized-values.stderr | 4 +- .../generic-associated-types/issue-70303.rs | 2 - .../generic-associated-types/issue-70304.rs | 2 - .../issue-70304.stderr | 6 +- .../generic-associated-types/issue-71176.rs | 2 - .../issue-71176.stderr | 4 +- .../generic-associated-types/issue-74684-1.rs | 2 - .../issue-74684-1.stderr | 2 +- .../generic-associated-types/issue-74684-2.rs | 2 - .../issue-74684-2.stderr | 6 +- .../generic-associated-types/issue-74816.rs | 1 - .../issue-74816.stderr | 8 +- .../generic-associated-types/issue-74824.rs | 1 - .../issue-74824.stderr | 8 +- .../generic-associated-types/issue-76407.rs | 2 - .../issue-76535.base.stderr | 12 +-- .../issue-76535.extended.stderr | 4 +- .../generic-associated-types/issue-76535.rs | 1 - .../generic-associated-types/issue-76826.rs | 2 - ...e-78113-lifetime-mismatch-dyn-trait-box.rs | 2 - ...113-lifetime-mismatch-dyn-trait-box.stderr | 26 +++---- .../issue-78671.base.stderr | 8 +- .../issue-78671.extended.stderr | 4 +- .../generic-associated-types/issue-78671.rs | 1 - .../issue-79422.base.stderr | 12 +-- .../issue-79422.extended.stderr | 8 +- .../generic-associated-types/issue-79422.rs | 1 - .../generic-associated-types/issue-79636-1.rs | 2 - .../issue-79636-1.stderr | 4 +- .../generic-associated-types/issue-79636-2.rs | 2 - .../issue-79636-2.stderr | 4 +- .../issue-80433-reduced.rs | 2 - .../generic-associated-types/issue-80433.rs | 2 - .../issue-80433.stderr | 4 +- .../generic-associated-types/issue-81487.rs | 2 - .../issue-81712-cyclic-traits.rs | 2 - .../issue-81712-cyclic-traits.stderr | 4 +- .../generic-associated-types/issue-81862.rs | 2 - .../issue-81862.stderr | 4 +- .../generic-associated-types/issue-84931.rs | 1 - .../issue-84931.stderr | 2 +- .../generic-associated-types/issue-85921.rs | 2 - .../generic-associated-types/issue-86483.rs | 2 - .../generic-associated-types/issue-86787.rs | 1 - .../issue-86787.stderr | 2 +- .../generic-associated-types/issue-87258_a.rs | 1 - .../issue-87258_a.stderr | 2 +- .../generic-associated-types/issue-87258_b.rs | 1 - .../issue-87258_b.stderr | 2 +- .../generic-associated-types/issue-87429-2.rs | 2 - .../issue-87429-associated-type-default.rs | 1 - ...issue-87429-associated-type-default.stderr | 4 +- .../issue-87429-specialization.rs | 1 - .../issue-87429-specialization.stderr | 4 +- .../generic-associated-types/issue-87429.rs | 2 - .../generic-associated-types/issue-87748.rs | 2 - .../generic-associated-types/issue-87750.rs | 2 - .../issue-87750.stderr | 2 +- .../generic-associated-types/issue-88287.rs | 1 - .../issue-88287.stderr | 4 +- .../generic-associated-types/issue-88360.rs | 2 - .../issue-88360.stderr | 2 +- .../generic-associated-types/issue-88405.rs | 2 - .../generic-associated-types/issue-88459.rs | 2 - .../generic-associated-types/issue-88595.rs | 1 - .../issue-88595.stderr | 4 +- .../generic-associated-types/issue-89352.rs | 2 - .../generic-associated-types/issue-90014.rs | 1 - .../issue-90014.stderr | 4 +- .../generic-associated-types/issue-90729.rs | 2 - .../issue-91139.migrate.stderr | 13 +--- .../generic-associated-types/issue-91139.rs | 2 - .../issue-91139.stderr | 18 ++--- .../generic-associated-types/issue-91883.rs | 2 - .../issue-91883.stderr | 6 +- .../generic-associated-types/issue-92033.rs | 2 - .../issue-92033.stderr | 4 +- .../issue-92096.migrate.stderr | 4 +- .../generic-associated-types/issue-92096.rs | 2 - .../issue-92096.stderr | 2 +- .../generic-associated-types/issue-92280.rs | 1 - .../generic-associated-types/issue-92954.rs | 2 - .../generic-associated-types/issue-93141.rs | 2 - .../generic-associated-types/issue-93262.rs | 2 - .../generic-associated-types/issue-93340.rs | 2 - .../generic-associated-types/issue-93341.rs | 1 - .../generic-associated-types/issue-93342.rs | 2 - .../generic-associated-types/issue-93874.rs | 2 - .../generic-associated-types/issue-95305.rs | 1 - .../issue-95305.stderr | 2 +- .../ui/generic-associated-types/iterable.rs | 2 - .../method-unsatified-assoc-type-predicate.rs | 2 - ...hod-unsatified-assoc-type-predicate.stderr | 4 +- .../missing-where-clause-on-trait.rs | 2 - .../missing-where-clause-on-trait.stderr | 2 +- .../missing_lifetime_args.rs | 2 - .../missing_lifetime_args.stderr | 12 +-- .../missing_lifetime_const.rs | 2 - .../missing_lifetime_const.stderr | 4 +- .../parameter_number_and_kind.rs | 1 - .../parameter_number_and_kind.stderr | 12 +-- .../parameter_number_and_kind_impl.rs | 1 - .../parameter_number_and_kind_impl.stderr | 12 +-- .../parse/in-trait-impl.rs | 2 - .../parse/in-trait.rs | 2 - .../parse/trait-path-expected-token.rs | 2 - .../parse/trait-path-expected-token.stderr | 2 +- .../parse/trait-path-expressions.rs | 2 - .../parse/trait-path-expressions.stderr | 4 +- .../parse/trait-path-missing-gen_arg.rs | 2 - .../parse/trait-path-missing-gen_arg.stderr | 10 +-- .../parse/trait-path-segments.rs | 2 - .../parse/trait-path-segments.stderr | 6 +- .../trait-path-type-error-once-implemented.rs | 2 - ...it-path-type-error-once-implemented.stderr | 8 +- .../parse/trait-path-types.rs | 2 - .../parse/trait-path-types.stderr | 6 +- .../pointer_family.rs | 2 - .../projection-bound-cycle-generic.rs | 2 - .../projection-bound-cycle-generic.stderr | 4 +- .../projection-bound-cycle.rs | 1 - .../projection-bound-cycle.stderr | 4 +- .../projection-type-lifetime-mismatch.rs | 2 - .../projection-type-lifetime-mismatch.stderr | 6 +- .../self-outlives-lint.rs | 2 - .../self-outlives-lint.stderr | 32 ++++---- .../ui/generic-associated-types/shadowing.rs | 2 - .../generic-associated-types/shadowing.stderr | 8 +- .../streaming_iterator.rs | 2 - .../trait-objects.base.stderr | 4 +- .../trait-objects.extended.stderr | 2 +- .../generic-associated-types/trait-objects.rs | 1 - .../unsatified-item-lifetime-bound.rs | 2 - .../unsatified-item-lifetime-bound.stderr | 14 ++-- .../unsatisfied-outlives-bound.rs | 2 - .../unsatisfied-outlives-bound.stderr | 8 +- .../variance_constraints.rs | 1 - .../normalize-under-binder/issue-90612.rs | 2 - .../normalize-under-binder/issue-90638.rs | 2 - .../expr-struct-type-relative-gat.rs | 2 - .../expr-struct-type-relative-gat.stderr | 2 +- .../ui/lifetimes/missing-lifetime-in-alias.rs | 2 - .../missing-lifetime-in-alias.stderr | 10 +-- .../impl-item-type-no-body-semantic-fail.rs | 2 - ...mpl-item-type-no-body-semantic-fail.stderr | 20 ++--- .../ui/parser/type-alias-where-fixable.fixed | 2 - .../ui/parser/type-alias-where-fixable.rs | 2 - .../ui/parser/type-alias-where-fixable.stderr | 6 +- src/test/ui/parser/type-alias-where.rs | 2 - src/test/ui/parser/type-alias-where.stderr | 4 +- .../default-generic-associated-type-bound.rs | 3 +- ...fault-generic-associated-type-bound.stderr | 4 +- src/test/ui/suggestions/issue-85347.rs | 2 - src/test/ui/suggestions/issue-85347.stderr | 4 +- .../ui/type-alias-impl-trait/issue-90400-1.rs | 1 - .../issue-90400-1.stderr | 4 +- .../ui/type-alias-impl-trait/issue-90400-2.rs | 1 - .../issue-90400-2.stderr | 4 +- src/tools/rustfmt/tests/source/issue_4257.rs | 3 - src/tools/rustfmt/tests/source/issue_4911.rs | 1 - src/tools/rustfmt/tests/source/issue_4943.rs | 2 - src/tools/rustfmt/tests/target/issue_4257.rs | 3 - src/tools/rustfmt/tests/target/issue_4911.rs | 1 - src/tools/rustfmt/tests/target/issue_4943.rs | 2 - 280 files changed, 313 insertions(+), 808 deletions(-) delete mode 100644 src/test/ui/feature-gates/feature-gate-generic_associated_types.rs delete mode 100644 src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr rename src/test/ui/generic-associated-types/{ => bugs}/issue-91762.rs (86%) rename src/test/ui/generic-associated-types/{ => bugs}/issue-91762.stderr (94%) delete mode 100644 src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.rs delete mode 100644 src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.stderr delete mode 100644 src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs delete mode 100644 src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.stderr delete mode 100644 src/test/ui/generic-associated-types/gat-incomplete-warning.rs delete mode 100644 src/test/ui/generic-associated-types/issue-67424.stderr diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 6f7e88eb86f19..ec3d03861a003 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -342,25 +342,6 @@ impl<'a> PostExpansionVisitor<'a> { } } - fn check_gat(&self, generics: &ast::Generics, span: Span) { - if !generics.params.is_empty() { - gate_feature_post!( - &self, - generic_associated_types, - span, - "generic associated types are unstable" - ); - } - if !generics.where_clause.predicates.is_empty() { - gate_feature_post!( - &self, - generic_associated_types, - span, - "where clauses on associated types are unstable" - ); - } - } - /// Feature gate `impl Trait` inside `type Alias = $type_expr;`. fn check_impl_trait(&self, ty: &ast::Ty) { struct ImplTraitVisitor<'a> { @@ -719,7 +700,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { fn visit_assoc_item(&mut self, i: &'a ast::AssocItem, ctxt: AssocCtxt) { let is_fn = match i.kind { ast::AssocItemKind::Fn(_) => true, - ast::AssocItemKind::TyAlias(box ast::TyAlias { ref generics, ref ty, .. }) => { + ast::AssocItemKind::TyAlias(box ast::TyAlias { ref ty, .. }) => { if let (Some(_), AssocCtxt::Trait) = (ty, ctxt) { gate_feature_post!( &self, @@ -731,7 +712,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { if let Some(ty) = ty { self.check_impl_trait(ty); } - self.check_gat(generics, i.span); false } _ => false, diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index c22adf77a27f6..100000f4cd629 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -161,6 +161,8 @@ declare_features! ( (accepted, fn_must_use, "1.27.0", Some(43302), None), /// Allows capturing variables in scope using format_args! (accepted, format_args_capture, "1.58.0", Some(67984), None), + /// Allows associated types to be generic, e.g., `type Foo;` (RFC 1598). + (accepted, generic_associated_types, "CURRENT_RUSTC_VERSION", Some(44265), None), /// Allows attributes on lifetime/type formal parameters in generics (RFC 1327). (accepted, generic_param_attrs, "1.27.0", Some(48848), None), /// Allows the `#[global_allocator]` attribute. diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index e09c3ccbc75ab..4f628cee6303d 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -398,8 +398,6 @@ declare_features! ( (active, generators, "1.21.0", Some(43122), None), /// Infer generic args for both consts and types. (active, generic_arg_infer, "1.55.0", Some(85077), None), - /// Allows associated types to be generic, e.g., `type Foo;` (RFC 1598). - (active, generic_associated_types, "1.23.0", Some(44265), None), /// An extension to the `generic_associated_types` feature, allowing incomplete features. (incomplete, generic_associated_types_extended, "1.61.0", Some(95451), None), /// Allows non-trivial generic constants which have to have wfness manually propagated to callers diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index 2dca6acdd6d6f..dec81c0d912ec 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -3989,8 +3989,6 @@ declare_lint! { /// ### Example /// /// ```rust - /// #![feature(generic_associated_types)] - /// /// trait Trait { /// type Assoc<'a> where Self: 'a; /// } diff --git a/compiler/rustc_metadata/src/lib.rs b/compiler/rustc_metadata/src/lib.rs index 6440f3e390cf1..062d25da2e5bd 100644 --- a/compiler/rustc_metadata/src/lib.rs +++ b/compiler/rustc_metadata/src/lib.rs @@ -2,7 +2,7 @@ #![feature(decl_macro)] #![feature(drain_filter)] #![feature(generators)] -#![feature(generic_associated_types)] +#![cfg_attr(bootstrap, feature(generic_associated_types))] #![feature(iter_from_generator)] #![feature(let_chains)] #![feature(let_else)] diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index be9e5865e541c..b8b3ff06fb285 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -31,7 +31,7 @@ #![feature(discriminant_kind)] #![feature(exhaustive_patterns)] #![feature(get_mut_unchecked)] -#![feature(generic_associated_types)] +#![cfg_attr(bootstrap, feature(generic_associated_types))] #![feature(if_let_guard)] #![feature(map_first_last)] #![feature(negative_impls)] diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 444ca6471e2e4..99efe51b107bd 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -2064,8 +2064,6 @@ fn confirm_impl_candidate<'cx, 'tcx>( // Get obligations corresponding to the predicates from the where-clause of the // associated type itself. -// Note: `feature(generic_associated_types)` is required to write such -// predicates, even for non-generic associated types. fn assoc_ty_own_obligations<'cx, 'tcx>( selcx: &mut SelectionContext<'cx, 'tcx>, obligation: &ProjectionTyObligation<'tcx>, diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 92380d124292d..f6c648140b856 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -16,7 +16,7 @@ #![feature(type_ascription)] #![feature(iter_intersperse)] #![feature(type_alias_impl_trait)] -#![feature(generic_associated_types)] +#![cfg_attr(bootstrap, feature(generic_associated_types))] #![recursion_limit = "256"] #![warn(rustc::internal)] #![allow(clippy::collapsible_if, clippy::collapsible_else_if)] diff --git a/src/test/pretty/gat-bounds.rs b/src/test/pretty/gat-bounds.rs index 8877c6cc9927b..0a361a3835f7f 100644 --- a/src/test/pretty/gat-bounds.rs +++ b/src/test/pretty/gat-bounds.rs @@ -3,8 +3,6 @@ // pretty-compare-only -#![feature(generic_associated_types)] - trait X { type Y: Trait where Self: Sized; } diff --git a/src/test/rustdoc-json/generic-associated-types/gats.rs b/src/test/rustdoc-json/generic-associated-types/gats.rs index cbaa0621dc2bb..e5809783aecac 100644 --- a/src/test/rustdoc-json/generic-associated-types/gats.rs +++ b/src/test/rustdoc-json/generic-associated-types/gats.rs @@ -1,7 +1,7 @@ // ignore-tidy-linelength #![no_core] -#![feature(generic_associated_types, lang_items, no_core)] +#![feature(lang_items, no_core)] #[lang = "sized"] pub trait Sized {} diff --git a/src/test/rustdoc/generic-associated-types/gats.rs b/src/test/rustdoc/generic-associated-types/gats.rs index ae981b9499a67..7ab82bb582965 100644 --- a/src/test/rustdoc/generic-associated-types/gats.rs +++ b/src/test/rustdoc/generic-associated-types/gats.rs @@ -1,5 +1,4 @@ #![crate_name = "foo"] -#![feature(generic_associated_types)] // @has foo/trait.LendingIterator.html pub trait LendingIterator { diff --git a/src/test/rustdoc/generic-associated-types/issue-94683.rs b/src/test/rustdoc/generic-associated-types/issue-94683.rs index 91499100ec687..985c7e983aa0e 100644 --- a/src/test/rustdoc/generic-associated-types/issue-94683.rs +++ b/src/test/rustdoc/generic-associated-types/issue-94683.rs @@ -1,5 +1,4 @@ #![crate_name = "foo"] -#![feature(generic_associated_types)] pub trait Trait { type Gat<'a>; diff --git a/src/test/rustdoc/where.rs b/src/test/rustdoc/where.rs index 50a5722fbaff6..33440b17cf9dd 100644 --- a/src/test/rustdoc/where.rs +++ b/src/test/rustdoc/where.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![crate_name = "foo"] pub trait MyTrait { fn dummy(&self) { } } diff --git a/src/test/ui/associated-type-bounds/binder-on-bound.rs b/src/test/ui/associated-type-bounds/binder-on-bound.rs index 0b4b24b9820b9..6cba45129e49b 100644 --- a/src/test/ui/associated-type-bounds/binder-on-bound.rs +++ b/src/test/ui/associated-type-bounds/binder-on-bound.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Trait { type Bound<'a>; } diff --git a/src/test/ui/associated-type-bounds/binder-on-bound.stderr b/src/test/ui/associated-type-bounds/binder-on-bound.stderr index 3432672e03c4f..f71f72bfb94f3 100644 --- a/src/test/ui/associated-type-bounds/binder-on-bound.stderr +++ b/src/test/ui/associated-type-bounds/binder-on-bound.stderr @@ -1,5 +1,5 @@ error: `for<...>` is not allowed on associated type bounds - --> $DIR/binder-on-bound.rs:7:22 + --> $DIR/binder-on-bound.rs:5:22 | LL | fn foo() where Trait Bound<'a> = &'a ()> { | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/associated-type-bounds/issue-79949.rs b/src/test/ui/associated-type-bounds/issue-79949.rs index 9f924f1fd81d8..9dd37f98150b6 100644 --- a/src/test/ui/associated-type-bounds/issue-79949.rs +++ b/src/test/ui/associated-type-bounds/issue-79949.rs @@ -2,7 +2,6 @@ #![allow(incomplete_features)] #![feature(associated_type_bounds)] -#![feature(generic_associated_types)] trait MP { type T<'a>; diff --git a/src/test/ui/deriving/issue-89188-gat-hrtb.rs b/src/test/ui/deriving/issue-89188-gat-hrtb.rs index abd85a616a4ad..e8118f0c6e40e 100644 --- a/src/test/ui/deriving/issue-89188-gat-hrtb.rs +++ b/src/test/ui/deriving/issue-89188-gat-hrtb.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait CallWithShim: Sized { type Shim<'s> where diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs b/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs deleted file mode 100644 index c5c1345148891..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-generic_associated_types.rs +++ /dev/null @@ -1,31 +0,0 @@ -use std::ops::Deref; - -trait PointerFamily { - type Pointer: Deref; - //~^ ERROR generic associated types are unstable - type Pointer2: Deref where T: Clone, U: Clone; - //~^ ERROR generic associated types are unstable - //~| ERROR where clauses on associated types are unstable -} - -struct Foo; - -impl PointerFamily for Foo { - type Pointer = Box; - //~^ ERROR generic associated types are unstable - type Pointer2 = Box; - //~^ ERROR generic associated types are unstable - //~| ERROR the trait bound `U32: Clone` is not satisfied -} - -trait Bar { - type Assoc where Self: Sized; - //~^ ERROR where clauses on associated types are unstable -} - -impl Bar for Foo { - type Assoc = Foo where Self: Sized; - //~^ ERROR where clauses on associated types are unstable -} - -fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr deleted file mode 100644 index 12a40ff0a12f5..0000000000000 --- a/src/test/ui/feature-gates/feature-gate-generic_associated_types.stderr +++ /dev/null @@ -1,78 +0,0 @@ -error[E0658]: generic associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:4:5 - | -LL | type Pointer: Deref; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: generic associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:6:5 - | -LL | type Pointer2: Deref where T: Clone, U: Clone; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: where clauses on associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:6:5 - | -LL | type Pointer2: Deref where T: Clone, U: Clone; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: generic associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:14:5 - | -LL | type Pointer = Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: generic associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:16:5 - | -LL | type Pointer2 = Box; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: where clauses on associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:22:5 - | -LL | type Assoc where Self: Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: where clauses on associated types are unstable - --> $DIR/feature-gate-generic_associated_types.rs:27:5 - | -LL | type Assoc = Foo where Self: Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0277]: the trait bound `U32: Clone` is not satisfied - --> $DIR/feature-gate-generic_associated_types.rs:16:26 - | -LL | type Pointer2 = Box; - | ^^^^^^^^ the trait `Clone` is not implemented for `U32` - | -help: consider restricting type parameter `U32` - | -LL | type Pointer2 = Box; - | +++++++++++++++++++ - -error: aborting due to 8 previous errors - -Some errors have detailed explanations: E0277, E0658. -For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.rs b/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.rs index 258b8cd35c777..7842d44ac4f0f 100644 --- a/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.rs +++ b/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // This feature doesn't *currently* fire on any specific code; it's just a // behavior change. Future changes might. #[rustc_error] //~ the diff --git a/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr b/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr index 6a5eba38cacc6..bb1622628dc1f 100644 --- a/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr +++ b/src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr @@ -1,5 +1,5 @@ error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable - --> $DIR/feature-gate-generic_associated_types_extended.rs:5:1 + --> $DIR/feature-gate-generic_associated_types_extended.rs:3:1 | LL | #[rustc_error] | ^^^^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/anonymize-bound-vars.rs b/src/test/ui/generic-associated-types/anonymize-bound-vars.rs index 1ec9c69989a7f..eb7a12412c6ba 100644 --- a/src/test/ui/generic-associated-types/anonymize-bound-vars.rs +++ b/src/test/ui/generic-associated-types/anonymize-bound-vars.rs @@ -1,7 +1,6 @@ // check-pass // // regression test for #98702 -#![feature(generic_associated_types)] trait Foo { type Assoc; diff --git a/src/test/ui/generic-associated-types/auxiliary/foo_defn.rs b/src/test/ui/generic-associated-types/auxiliary/foo_defn.rs index 0e8e14852d9db..21a9b3b89a8dc 100644 --- a/src/test/ui/generic-associated-types/auxiliary/foo_defn.rs +++ b/src/test/ui/generic-associated-types/auxiliary/foo_defn.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - use std::{future::Future, pin::Pin}; pub trait Foo { diff --git a/src/test/ui/generic-associated-types/bugs/issue-80626.rs b/src/test/ui/generic-associated-types/bugs/issue-80626.rs index 14f27aff1ccd8..f6aa6b36e13dc 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-80626.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-80626.rs @@ -3,8 +3,6 @@ // This should pass, but it requires `Sized` to be coinductive. -#![feature(generic_associated_types)] - trait Allocator { type Allocated; } diff --git a/src/test/ui/generic-associated-types/bugs/issue-80626.stderr b/src/test/ui/generic-associated-types/bugs/issue-80626.stderr index 487b83dfa3fcc..9a0f332ed4736 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-80626.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-80626.stderr @@ -1,11 +1,11 @@ error[E0275]: overflow evaluating the requirement `LinkedList: Sized` - --> $DIR/issue-80626.rs:14:10 + --> $DIR/issue-80626.rs:12:10 | LL | Next(A::Allocated) | ^^^^^^^^^^^^^^^^^^ | note: required by a bound in `Allocator::Allocated` - --> $DIR/issue-80626.rs:9:20 + --> $DIR/issue-80626.rs:7:20 | LL | type Allocated; | ^ required by this bound in `Allocator::Allocated` diff --git a/src/test/ui/generic-associated-types/bugs/issue-86218.rs b/src/test/ui/generic-associated-types/bugs/issue-86218.rs index fb62c10a9e389..3a2d758e7d6fe 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-86218.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-86218.rs @@ -3,7 +3,6 @@ // This should pass, but seems to run into a TAIT issue. -#![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] pub trait Stream { diff --git a/src/test/ui/generic-associated-types/bugs/issue-86218.stderr b/src/test/ui/generic-associated-types/bugs/issue-86218.stderr index fbf1c8f95feca..de1b464a41dbe 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-86218.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-86218.stderr @@ -1,17 +1,17 @@ error[E0477]: the type `<() as Yay<&'a ()>>::InnerStream<'s>` does not fulfill the required lifetime - --> $DIR/issue-86218.rs:23:28 + --> $DIR/issue-86218.rs:22:28 | LL | type InnerStream<'s> = impl Stream + 's; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: type must outlive the lifetime `'s` as defined here as required by this binding - --> $DIR/issue-86218.rs:23:22 + --> $DIR/issue-86218.rs:22:22 | LL | type InnerStream<'s> = impl Stream + 's; | ^^ error: unconstrained opaque type - --> $DIR/issue-86218.rs:23:28 + --> $DIR/issue-86218.rs:22:28 | LL | type InnerStream<'s> = impl Stream + 's; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/bugs/issue-87735.rs b/src/test/ui/generic-associated-types/bugs/issue-87735.rs index 0844d84c34fd3..80737a79899b4 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87735.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-87735.rs @@ -3,8 +3,6 @@ // This should pass, but we need an extension of implied bounds (probably). -#![feature(generic_associated_types)] - pub trait AsRef2 { type Output<'a> where Self: 'a; diff --git a/src/test/ui/generic-associated-types/bugs/issue-87735.stderr b/src/test/ui/generic-associated-types/bugs/issue-87735.stderr index 0a18b5f0cbdaa..ebe2054ce5efc 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87735.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87735.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-87735.rs:27:13 + --> $DIR/issue-87735.rs:25:13 | LL | impl<'b, T, U> AsRef2 for Foo | ^ unconstrained type parameter diff --git a/src/test/ui/generic-associated-types/bugs/issue-87755.rs b/src/test/ui/generic-associated-types/bugs/issue-87755.rs index efa487d624fd9..cda722d2f0c72 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87755.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-87755.rs @@ -3,8 +3,6 @@ // This should pass. -#![feature(generic_associated_types)] - use std::fmt::Debug; trait Foo { diff --git a/src/test/ui/generic-associated-types/bugs/issue-87755.stderr b/src/test/ui/generic-associated-types/bugs/issue-87755.stderr index 5d1aff0117c13..5e94db9b0c00f 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87755.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87755.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `::Ass == _` - --> $DIR/issue-87755.rs:18:16 + --> $DIR/issue-87755.rs:16:16 | LL | type Ass = Bar; | ^^^ diff --git a/src/test/ui/generic-associated-types/bugs/issue-87803.rs b/src/test/ui/generic-associated-types/bugs/issue-87803.rs index a8a111c99ef7f..56237e387ef30 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87803.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-87803.rs @@ -4,8 +4,6 @@ // This should pass, but using a type alias vs a reference directly // changes late-bound -> early-bound. -#![feature(generic_associated_types)] - trait Scanner { type Input<'a>; type Token<'a>; diff --git a/src/test/ui/generic-associated-types/bugs/issue-87803.stderr b/src/test/ui/generic-associated-types/bugs/issue-87803.stderr index c81c051d32a89..fe2abdedbf37c 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87803.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87803.stderr @@ -1,5 +1,5 @@ error[E0195]: lifetime parameters or bounds on method `scan` do not match the trait declaration - --> $DIR/issue-87803.rs:22:12 + --> $DIR/issue-87803.rs:20:12 | LL | fn scan<'a>(&mut self, i : Self::Input<'a>) -> Self::Token<'a>; | ---- lifetimes in impl do not match this method in trait diff --git a/src/test/ui/generic-associated-types/bugs/issue-88382.rs b/src/test/ui/generic-associated-types/bugs/issue-88382.rs index 5493b9b939135..8f8cc4523a202 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88382.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-88382.rs @@ -3,8 +3,6 @@ // This should pass, but has a missed normalization due to HRTB. -#![feature(generic_associated_types)] - trait Iterable { type Iterator<'a> where Self: 'a; fn iter(&self) -> Self::Iterator<'_>; diff --git a/src/test/ui/generic-associated-types/bugs/issue-88382.stderr b/src/test/ui/generic-associated-types/bugs/issue-88382.stderr index 7210895b79bc3..c5fd58096b7fd 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88382.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-88382.stderr @@ -1,5 +1,5 @@ error[E0631]: type mismatch in function arguments - --> $DIR/issue-88382.rs:28:40 + --> $DIR/issue-88382.rs:26:40 | LL | do_something(SomeImplementation(), test); | ------------ ^^^^ expected due to this @@ -12,7 +12,7 @@ LL | fn test<'a, I: Iterable>(_: &mut I::Iterator<'a>) {} = note: expected function signature `for<'r> fn(&'r mut std::iter::Empty) -> _` found function signature `for<'a, 'r> fn(&'r mut <_ as Iterable>::Iterator<'a>) -> _` note: required by a bound in `do_something` - --> $DIR/issue-88382.rs:22:48 + --> $DIR/issue-88382.rs:20:48 | LL | fn do_something(i: I, mut f: impl for<'a> Fn(&mut I::Iterator<'a>)) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `do_something` diff --git a/src/test/ui/generic-associated-types/bugs/issue-88460.rs b/src/test/ui/generic-associated-types/bugs/issue-88460.rs index f1c3b2269158a..224e696ad2c9c 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88460.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-88460.rs @@ -3,8 +3,6 @@ // This should pass, but has a missed normalization due to HRTB. -#![feature(generic_associated_types)] - pub trait Marker {} pub trait Trait { diff --git a/src/test/ui/generic-associated-types/bugs/issue-88460.stderr b/src/test/ui/generic-associated-types/bugs/issue-88460.stderr index 8193f491e69ed..6612c4b49446f 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88460.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-88460.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `for<'a> <_ as Trait>::Assoc<'a>: Marker` is not satisfied - --> $DIR/issue-88460.rs:30:10 + --> $DIR/issue-88460.rs:28:10 | LL | test(Foo); | ---- ^^^ the trait `for<'a> Marker` is not implemented for `<_ as Trait>::Assoc<'a>` @@ -8,7 +8,7 @@ LL | test(Foo); | = help: the trait `Marker` is implemented for `()` note: required by a bound in `test` - --> $DIR/issue-88460.rs:17:27 + --> $DIR/issue-88460.rs:15:27 | LL | fn test(value: T) | ---- required by a bound in this diff --git a/src/test/ui/generic-associated-types/bugs/issue-88526.rs b/src/test/ui/generic-associated-types/bugs/issue-88526.rs index 15363ad04bfe7..99397744fa655 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88526.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-88526.rs @@ -3,8 +3,6 @@ // This should pass, but requires more logic. -#![feature(generic_associated_types)] - trait A { type I<'a>; } diff --git a/src/test/ui/generic-associated-types/bugs/issue-88526.stderr b/src/test/ui/generic-associated-types/bugs/issue-88526.stderr index 127c889bf715e..56857c6550bdc 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-88526.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-88526.stderr @@ -1,5 +1,5 @@ error[E0207]: the type parameter `I` is not constrained by the impl trait, self type, or predicates - --> $DIR/issue-88526.rs:27:13 + --> $DIR/issue-88526.rs:25:13 | LL | impl<'q, Q, I, F> A for TestB | ^ unconstrained type parameter diff --git a/src/test/ui/generic-associated-types/bugs/issue-89008.rs b/src/test/ui/generic-associated-types/bugs/issue-89008.rs index 79c28b0d22172..012aa8df2fc3f 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-89008.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-89008.rs @@ -5,7 +5,6 @@ // This should pass, but seems to run into a TAIT bug. #![feature(type_alias_impl_trait)] -#![feature(generic_associated_types)] use std::future::Future; diff --git a/src/test/ui/generic-associated-types/bugs/issue-89008.stderr b/src/test/ui/generic-associated-types/bugs/issue-89008.stderr index 50844fdc14d94..3f72734efa1dc 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-89008.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-89008.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving ` as Stream>::Item == Repr` - --> $DIR/issue-89008.rs:39:43 + --> $DIR/issue-89008.rs:38:43 | LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving ` as Stream>::Item == Repr` @@ -7,7 +7,7 @@ LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> { | this type parameter | note: expected this to be `()` - --> $DIR/issue-89008.rs:18:17 + --> $DIR/issue-89008.rs:17:17 | LL | type Item = (); | ^^ diff --git a/src/test/ui/generic-associated-types/issue-91762.rs b/src/test/ui/generic-associated-types/bugs/issue-91762.rs similarity index 86% rename from src/test/ui/generic-associated-types/issue-91762.rs rename to src/test/ui/generic-associated-types/bugs/issue-91762.rs index b259a3c6e06bc..796935cc06f5b 100644 --- a/src/test/ui/generic-associated-types/issue-91762.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-91762.rs @@ -1,13 +1,12 @@ // check-fail +// known-bug -// FIXME(generic_associated_types): We almost certaintly want this to pass, but +// We almost certaintly want this to pass, but // it's particularly difficult currently, because we need a way of specifying // that `::With = Self` without using that when we have // a `U`. See `https://github.com/rust-lang/rust/pull/92728` for a (hacky) // solution. This might be better to just wait for Chalk. -#![feature(generic_associated_types)] - pub trait Functor { type With; diff --git a/src/test/ui/generic-associated-types/issue-91762.stderr b/src/test/ui/generic-associated-types/bugs/issue-91762.stderr similarity index 94% rename from src/test/ui/generic-associated-types/issue-91762.stderr rename to src/test/ui/generic-associated-types/bugs/issue-91762.stderr index c2785fee387fa..1272c8b8ae27d 100644 --- a/src/test/ui/generic-associated-types/issue-91762.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-91762.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/issue-91762.rs:25:15 + --> $DIR/issue-91762.rs:24:15 | LL | ret = ::fmap(arg); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the associated function `fmap` diff --git a/src/test/ui/generic-associated-types/collections-project-default.rs b/src/test/ui/generic-associated-types/collections-project-default.rs index 157e1b1d29573..e08aa18cf0f17 100644 --- a/src/test/ui/generic-associated-types/collections-project-default.rs +++ b/src/test/ui/generic-associated-types/collections-project-default.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] // A Collection trait and collection families. Based on diff --git a/src/test/ui/generic-associated-types/collections-project-default.stderr b/src/test/ui/generic-associated-types/collections-project-default.stderr index 22fbc0271b481..5701017dc3471 100644 --- a/src/test/ui/generic-associated-types/collections-project-default.stderr +++ b/src/test/ui/generic-associated-types/collections-project-default.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/collections-project-default.rs:59:5 + --> $DIR/collections-project-default.rs:58:5 | LL | fn floatify_sibling(ints: &C) -> >::Sibling | ------------------------------------ expected `>::Sibling` because of return type diff --git a/src/test/ui/generic-associated-types/collections.rs b/src/test/ui/generic-associated-types/collections.rs index 1c00aa73feb9f..15f429afb0274 100644 --- a/src/test/ui/generic-associated-types/collections.rs +++ b/src/test/ui/generic-associated-types/collections.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] // A Collection trait and collection families. Based on diff --git a/src/test/ui/generic-associated-types/collectivity-regression.rs b/src/test/ui/generic-associated-types/collectivity-regression.rs index fb73684390737..54154f9d1fc8d 100644 --- a/src/test/ui/generic-associated-types/collectivity-regression.rs +++ b/src/test/ui/generic-associated-types/collectivity-regression.rs @@ -1,7 +1,5 @@ // Regression test from https://github.com/rust-lang/rust/pull/98109 -#![feature(generic_associated_types)] - pub trait Get { type Value<'a> where diff --git a/src/test/ui/generic-associated-types/collectivity-regression.stderr b/src/test/ui/generic-associated-types/collectivity-regression.stderr index a858dd7fddcd2..1dbe1e2cb2245 100644 --- a/src/test/ui/generic-associated-types/collectivity-regression.stderr +++ b/src/test/ui/generic-associated-types/collectivity-regression.stderr @@ -1,5 +1,5 @@ error: `T` does not live long enough - --> $DIR/collectivity-regression.rs:15:5 + --> $DIR/collectivity-regression.rs:13:5 | LL | / || { LL | | diff --git a/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs b/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs index afde5f37634b1..c5f9a25a6ea9f 100644 --- a/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs +++ b/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-1.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(generic_associated_types)] // This test unsures that with_opt_const_param returns the // def_id of the N param in the Foo::Assoc GAT. diff --git a/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs b/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs index 51046be79b7e5..cd7941ed9af79 100644 --- a/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs +++ b/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-2.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(generic_associated_types)] // This test unsures that with_opt_const_param returns the // def_id of the N param in the Foo::Assoc GAT. diff --git a/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs b/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs index 457fe27b3ff3a..db61fc08005bf 100644 --- a/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs +++ b/src/test/ui/generic-associated-types/const-generics-gat-in-trait-return-type-3.rs @@ -1,5 +1,4 @@ // run-pass -#![feature(generic_associated_types)] // This test unsures that with_opt_const_param returns the // def_id of the N param in the Bar::Assoc GAT. diff --git a/src/test/ui/generic-associated-types/const_params_have_right_type.rs b/src/test/ui/generic-associated-types/const_params_have_right_type.rs index 6bed8e3aff975..d2cb12697e423 100644 --- a/src/test/ui/generic-associated-types/const_params_have_right_type.rs +++ b/src/test/ui/generic-associated-types/const_params_have_right_type.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Trait { type Foo; } diff --git a/src/test/ui/generic-associated-types/const_params_have_right_type.stderr b/src/test/ui/generic-associated-types/const_params_have_right_type.stderr index 89c993dee5e69..fdedd3bf5fbff 100644 --- a/src/test/ui/generic-associated-types/const_params_have_right_type.stderr +++ b/src/test/ui/generic-associated-types/const_params_have_right_type.stderr @@ -1,5 +1,5 @@ error[E0053]: type `Foo` has an incompatible generic parameter for trait `Trait` - --> $DIR/const_params_have_right_type.rs:8:14 + --> $DIR/const_params_have_right_type.rs:6:14 | LL | trait Trait { | ----- diff --git a/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.rs b/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.rs index e315ee842180e..c78a549970d80 100644 --- a/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.rs +++ b/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.rs @@ -1,7 +1,5 @@ // Test that correct syntax is used in suggestion to constrain associated type -#![feature(generic_associated_types)] - trait X { type Y; } diff --git a/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr b/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr index 957ae5d293240..96c4330fec027 100644 --- a/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr +++ b/src/test/ui/generic-associated-types/constraint-assoc-type-suggestion.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/constraint-assoc-type-suggestion.rs:12:23 + --> $DIR/constraint-assoc-type-suggestion.rs:10:23 | LL | let b: Vec = a; | -------- ^ expected struct `Vec`, found associated type diff --git a/src/test/ui/generic-associated-types/construct_with_other_type.rs b/src/test/ui/generic-associated-types/construct_with_other_type.rs index 060804269aa70..5cb07f5588343 100644 --- a/src/test/ui/generic-associated-types/construct_with_other_type.rs +++ b/src/test/ui/generic-associated-types/construct_with_other_type.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // check-pass use std::ops::Deref; diff --git a/src/test/ui/generic-associated-types/cross-crate-bounds.stderr b/src/test/ui/generic-associated-types/cross-crate-bounds.stderr index c4009dd96251f..c81cd7e7718ca 100644 --- a/src/test/ui/generic-associated-types/cross-crate-bounds.stderr +++ b/src/test/ui/generic-associated-types/cross-crate-bounds.stderr @@ -5,7 +5,7 @@ LL | type Bar = (); | ^^ the trait `AsRef<()>` is not implemented for `()` | note: required by a bound in `foo_defn::Foo::Bar` - --> $DIR/auxiliary/foo_defn.rs:6:15 + --> $DIR/auxiliary/foo_defn.rs:4:15 | LL | type Bar: AsRef<()>; | ^^^^^^^^^ required by this bound in `foo_defn::Foo::Bar` diff --git a/src/test/ui/generic-associated-types/elided-in-expr-position.rs b/src/test/ui/generic-associated-types/elided-in-expr-position.rs index 482d0d5c00a63..e40093305c403 100644 --- a/src/test/ui/generic-associated-types/elided-in-expr-position.rs +++ b/src/test/ui/generic-associated-types/elided-in-expr-position.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![allow(unused)] pub trait Trait { diff --git a/src/test/ui/generic-associated-types/elided-in-expr-position.stderr b/src/test/ui/generic-associated-types/elided-in-expr-position.stderr index b395a1cfd8a62..20f35c3c13709 100644 --- a/src/test/ui/generic-associated-types/elided-in-expr-position.stderr +++ b/src/test/ui/generic-associated-types/elided-in-expr-position.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `Trait::Assoc` - --> $DIR/elided-in-expr-position.rs:10:26 + --> $DIR/elided-in-expr-position.rs:9:26 | LL | fn g(&self) -> Self::Assoc; | ^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/elided-in-expr-position.rs:5:10 + --> $DIR/elided-in-expr-position.rs:4:10 | LL | type Assoc<'a> where Self: 'a; | ^^^^^ -- @@ -15,13 +15,13 @@ LL | fn g(&self) -> Self::Assoc<'a>; | ~~~~~~~~~ error[E0107]: missing generics for associated type `Trait::Assoc` - --> $DIR/elided-in-expr-position.rs:32:26 + --> $DIR/elided-in-expr-position.rs:31:26 | LL | fn g(&self) -> Self::Assoc { | ^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/elided-in-expr-position.rs:5:10 + --> $DIR/elided-in-expr-position.rs:4:10 | LL | type Assoc<'a> where Self: 'a; | ^^^^^ -- diff --git a/src/test/ui/generic-associated-types/empty_generics.rs b/src/test/ui/generic-associated-types/empty_generics.rs index 772b7f2b4e301..964c2972d4734 100644 --- a/src/test/ui/generic-associated-types/empty_generics.rs +++ b/src/test/ui/generic-associated-types/empty_generics.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Foo { type Bar<,>; //~^ ERROR expected one of `#`, `>`, `const`, identifier, or lifetime, found `,` diff --git a/src/test/ui/generic-associated-types/empty_generics.stderr b/src/test/ui/generic-associated-types/empty_generics.stderr index ac22bfc0835b9..b753181cf4808 100644 --- a/src/test/ui/generic-associated-types/empty_generics.stderr +++ b/src/test/ui/generic-associated-types/empty_generics.stderr @@ -1,5 +1,5 @@ error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,` - --> $DIR/empty_generics.rs:4:14 + --> $DIR/empty_generics.rs:2:14 | LL | trait Foo { | - while parsing this item list starting here diff --git a/src/test/ui/generic-associated-types/extended/lending_iterator.base.stderr b/src/test/ui/generic-associated-types/extended/lending_iterator.base.stderr index 3da7794b3d2c0..614c4a34c187d 100644 --- a/src/test/ui/generic-associated-types/extended/lending_iterator.base.stderr +++ b/src/test/ui/generic-associated-types/extended/lending_iterator.base.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/lending_iterator.rs:14:45 + --> $DIR/lending_iterator.rs:13:45 | LL | fn from_iter LendingIterator = A>>(iter: T) -> Self; | ------------------------------------------------------------------------ definition of `from_iter` from trait diff --git a/src/test/ui/generic-associated-types/extended/lending_iterator.rs b/src/test/ui/generic-associated-types/extended/lending_iterator.rs index ede164766361e..247761dd04bf4 100644 --- a/src/test/ui/generic-associated-types/extended/lending_iterator.rs +++ b/src/test/ui/generic-associated-types/extended/lending_iterator.rs @@ -2,7 +2,6 @@ //[base] check-fail //[extended] check-pass -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/extended/lending_iterator_2.base.stderr b/src/test/ui/generic-associated-types/extended/lending_iterator_2.base.stderr index 6c2a624ca11d5..f6b0b644e4064 100644 --- a/src/test/ui/generic-associated-types/extended/lending_iterator_2.base.stderr +++ b/src/test/ui/generic-associated-types/extended/lending_iterator_2.base.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/lending_iterator_2.rs:14:45 + --> $DIR/lending_iterator_2.rs:13:45 | LL | fn from_iter LendingIterator = A>>(iter: T) -> Self; | ------------------------------------------------------------------------ definition of `from_iter` from trait diff --git a/src/test/ui/generic-associated-types/extended/lending_iterator_2.rs b/src/test/ui/generic-associated-types/extended/lending_iterator_2.rs index 3c4a2184db90c..eb9c0456a1eed 100644 --- a/src/test/ui/generic-associated-types/extended/lending_iterator_2.rs +++ b/src/test/ui/generic-associated-types/extended/lending_iterator_2.rs @@ -2,7 +2,6 @@ //[base] check-fail //[extended] check-pass -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.rs b/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.rs deleted file mode 100644 index c1d68812e9356..0000000000000 --- a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.rs +++ /dev/null @@ -1,16 +0,0 @@ -// rust-lang/rust#60654: Do not ICE on an attempt to use GATs that is -// missing the feature gate. - -struct Foo; - -trait MyTrait { - type Item; - //~^ ERROR generic associated types are unstable [E0658] -} - -impl MyTrait for Foo { - type Item = T; - //~^ ERROR generic associated types are unstable [E0658] -} - -fn main() { } diff --git a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.stderr b/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.stderr deleted file mode 100644 index 34f536dbe8f64..0000000000000 --- a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature-2.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0658]: generic associated types are unstable - --> $DIR/gat-dont-ice-on-absent-feature-2.rs:7:5 - | -LL | type Item; - | ^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0658]: generic associated types are unstable - --> $DIR/gat-dont-ice-on-absent-feature-2.rs:12:5 - | -LL | type Item = T; - | ^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs b/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs deleted file mode 100644 index e8fc47d2a59f9..0000000000000 --- a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.rs +++ /dev/null @@ -1,16 +0,0 @@ -// rust-lang/rust#60654: Do not ICE on an attempt to use GATs that is -// missing the feature gate. - -struct Foo; - -impl Iterator for Foo { - type Item<'b> = &'b Foo; - //~^ ERROR generic associated types are unstable [E0658] - //~| ERROR lifetime parameters or bounds on type `Item` do not match the trait declaration - - fn next(&mut self) -> Option { - None - } -} - -fn main() { } diff --git a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.stderr b/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.stderr deleted file mode 100644 index ec36886f7b51f..0000000000000 --- a/src/test/ui/generic-associated-types/gat-dont-ice-on-absent-feature.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0658]: generic associated types are unstable - --> $DIR/gat-dont-ice-on-absent-feature.rs:7:5 - | -LL | type Item<'b> = &'b Foo; - | ^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error[E0195]: lifetime parameters or bounds on type `Item` do not match the trait declaration - --> $DIR/gat-dont-ice-on-absent-feature.rs:7:14 - | -LL | type Item<'b> = &'b Foo; - | ^^^^ lifetimes do not match type in trait - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0195, E0658. -For more information about an error, try `rustc --explain E0195`. diff --git a/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs b/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs index f542a7f545e0b..86b164ba7d8a8 100644 --- a/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs +++ b/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'x>; } diff --git a/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr b/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr index 1792d8db292c4..b77f10084c928 100644 --- a/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr +++ b/src/test/ui/generic-associated-types/gat-in-trait-path-undeclared-lifetime.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'x` - --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:8:35 + --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:6:35 | LL | fn _f(arg : Box X = &'a [u32]>>) {} | ^^ undeclared lifetime @@ -15,7 +15,7 @@ LL | fn _f<'x>(arg : Box X = &'a [u32]>>) {} | ++++ error[E0582]: binding for associated type `Y` references lifetime `'a`, which does not appear in the trait input types - --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:8:33 + --> $DIR/gat-in-trait-path-undeclared-lifetime.rs:6:33 | LL | fn _f(arg : Box X = &'a [u32]>>) {} | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/gat-in-trait-path.base.stderr b/src/test/ui/generic-associated-types/gat-in-trait-path.base.stderr index c2054f64e2d6b..fd54faaf37cb7 100644 --- a/src/test/ui/generic-associated-types/gat-in-trait-path.base.stderr +++ b/src/test/ui/generic-associated-types/gat-in-trait-path.base.stderr @@ -1,11 +1,11 @@ error[E0038]: the trait `Foo` cannot be made into an object - --> $DIR/gat-in-trait-path.rs:27:17 + --> $DIR/gat-in-trait-path.rs:26:17 | LL | fn f(_arg : Box Foo = &'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/gat-in-trait-path.rs:11:10 + --> $DIR/gat-in-trait-path.rs:10:10 | LL | trait Foo { | --- this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/gat-in-trait-path.rs b/src/test/ui/generic-associated-types/gat-in-trait-path.rs index c82450ccff149..c55f5a726bdcb 100644 --- a/src/test/ui/generic-associated-types/gat-in-trait-path.rs +++ b/src/test/ui/generic-associated-types/gat-in-trait-path.rs @@ -2,7 +2,6 @@ //[base] check-fail //[extended] check-pass -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/gat-incomplete-warning.rs b/src/test/ui/generic-associated-types/gat-incomplete-warning.rs deleted file mode 100644 index 607ea1759888c..0000000000000 --- a/src/test/ui/generic-associated-types/gat-incomplete-warning.rs +++ /dev/null @@ -1,5 +0,0 @@ -// run-pass - -#![feature(generic_associated_types)] - -fn main() {} diff --git a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs index dbf7e02aeafcc..d00c036fbd550 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs +++ b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Foo { type F<'a>; diff --git a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr index dad0dae6a44bf..cb2b9f32bfe72 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-generic-type-arg.stderr @@ -1,5 +1,5 @@ error[E0403]: the name `T1` is already used for a generic parameter in this item's generic parameters - --> $DIR/gat-trait-path-generic-type-arg.rs:11:12 + --> $DIR/gat-trait-path-generic-type-arg.rs:9:12 | LL | impl Foo for T { | -- first use of `T1` @@ -8,13 +8,13 @@ LL | type F = &[u8]; | ^^ already used error[E0637]: `&` without an explicit lifetime name cannot be used here - --> $DIR/gat-trait-path-generic-type-arg.rs:11:18 + --> $DIR/gat-trait-path-generic-type-arg.rs:9:18 | LL | type F = &[u8]; | ^ explicit lifetime name needed here error[E0207]: the type parameter `T1` is not constrained by the impl trait, self type, or predicates - --> $DIR/gat-trait-path-generic-type-arg.rs:9:10 + --> $DIR/gat-trait-path-generic-type-arg.rs:7:10 | LL | impl Foo for T { | ^^ unconstrained type parameter diff --git a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs index 9864787f0aa2f..83b86f04a957f 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs +++ b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; diff --git a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr index aeb9238de81f4..452dfefd1e3d5 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `X::Y` - --> $DIR/gat-trait-path-missing-lifetime.rs:10:20 + --> $DIR/gat-trait-path-missing-lifetime.rs:8:20 | LL | fn foo<'a, T1: X>(t : T1) -> T1::Y<'a> { | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/gat-trait-path-missing-lifetime.rs:4:8 + --> $DIR/gat-trait-path-missing-lifetime.rs:2:8 | LL | type Y<'a>; | ^ -- @@ -15,13 +15,13 @@ LL | fn foo<'a, T1: X = T1>>(t : T1) -> T1::Y<'a> { | ~~~~~ error[E0107]: missing generics for associated type `X::Y` - --> $DIR/gat-trait-path-missing-lifetime.rs:10:20 + --> $DIR/gat-trait-path-missing-lifetime.rs:8:20 | LL | fn foo<'a, T1: X>(t : T1) -> T1::Y<'a> { | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/gat-trait-path-missing-lifetime.rs:4:8 + --> $DIR/gat-trait-path-missing-lifetime.rs:2:8 | LL | type Y<'a>; | ^ -- diff --git a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs index c55b0530c9da8..9eb069637c685 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs +++ b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; } diff --git a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr index 162214063e7d2..e55a21e19f044 100644 --- a/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr +++ b/src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr @@ -1,11 +1,11 @@ error: lifetime in trait object type must be followed by `+` - --> $DIR/gat-trait-path-parenthesised-args.rs:7:29 + --> $DIR/gat-trait-path-parenthesised-args.rs:5:29 | LL | fn foo<'a>(arg: Box>) {} | ^^ error: parenthesized generic arguments cannot be used in associated type constraints - --> $DIR/gat-trait-path-parenthesised-args.rs:7:27 + --> $DIR/gat-trait-path-parenthesised-args.rs:5:27 | LL | fn foo<'a>(arg: Box>) {} | ^^^^^ @@ -16,7 +16,7 @@ LL | fn foo<'a>(arg: Box = &'a ()>>) {} | ~ ~ error: parenthesized generic arguments cannot be used in associated type constraints - --> $DIR/gat-trait-path-parenthesised-args.rs:14:27 + --> $DIR/gat-trait-path-parenthesised-args.rs:12:27 | LL | fn bar<'a>(arg: Box>) {} | ^-- @@ -24,13 +24,13 @@ LL | fn bar<'a>(arg: Box>) {} | help: remove these parentheses error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied - --> $DIR/gat-trait-path-parenthesised-args.rs:7:27 + --> $DIR/gat-trait-path-parenthesised-args.rs:5:27 | LL | fn foo<'a>(arg: Box>) {} | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/gat-trait-path-parenthesised-args.rs:4:8 + --> $DIR/gat-trait-path-parenthesised-args.rs:2:8 | LL | type Y<'a>; | ^ -- @@ -40,7 +40,7 @@ LL | fn foo<'a>(arg: Box>) {} | +++ error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied - --> $DIR/gat-trait-path-parenthesised-args.rs:7:27 + --> $DIR/gat-trait-path-parenthesised-args.rs:5:27 | LL | fn foo<'a>(arg: Box>) {} | ^---- help: remove these generics @@ -48,19 +48,19 @@ LL | fn foo<'a>(arg: Box>) {} | expected 0 generic arguments | note: associated type defined here, with 0 generic parameters - --> $DIR/gat-trait-path-parenthesised-args.rs:4:8 + --> $DIR/gat-trait-path-parenthesised-args.rs:2:8 | LL | type Y<'a>; | ^ error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied - --> $DIR/gat-trait-path-parenthesised-args.rs:14:27 + --> $DIR/gat-trait-path-parenthesised-args.rs:12:27 | LL | fn bar<'a>(arg: Box>) {} | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/gat-trait-path-parenthesised-args.rs:4:8 + --> $DIR/gat-trait-path-parenthesised-args.rs:2:8 | LL | type Y<'a>; | ^ -- diff --git a/src/test/ui/generic-associated-types/generic-associated-type-bounds.rs b/src/test/ui/generic-associated-types/generic-associated-type-bounds.rs index d7c4dbda2644e..fdc5a72671caa 100644 --- a/src/test/ui/generic-associated-types/generic-associated-type-bounds.rs +++ b/src/test/ui/generic-associated-types/generic-associated-type-bounds.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(generic_associated_types)] - pub trait X { type Y<'a> where Self: 'a; fn m(&self) -> Self::Y<'_>; diff --git a/src/test/ui/generic-associated-types/generic-associated-types-where.rs b/src/test/ui/generic-associated-types/generic-associated-types-where.rs index 2ecbc8c591259..bbdfffafedb73 100644 --- a/src/test/ui/generic-associated-types/generic-associated-types-where.rs +++ b/src/test/ui/generic-associated-types/generic-associated-types-where.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // Checking the interaction with this other feature #![feature(associated_type_defaults)] diff --git a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr index e866b3bab7972..9a745c099c0ed 100644 --- a/src/test/ui/generic-associated-types/generic-associated-types-where.stderr +++ b/src/test/ui/generic-associated-types/generic-associated-types-where.stderr @@ -1,5 +1,5 @@ error[E0277]: `T` doesn't implement `std::fmt::Display` - --> $DIR/generic-associated-types-where.rs:20:22 + --> $DIR/generic-associated-types-where.rs:18:22 | LL | type Assoc2 = Vec; | ^^^^^^ `T` cannot be formatted with the default formatter @@ -11,7 +11,7 @@ LL | type Assoc2 = Vec; | +++++++++++++++++++ error[E0276]: impl has stricter requirements than trait - --> $DIR/generic-associated-types-where.rs:22:38 + --> $DIR/generic-associated-types-where.rs:20:38 | LL | type Assoc3; | -------------- definition of `Assoc3` from trait diff --git a/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.rs b/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.rs index 43058f7eb41bf..2cb218bf8f251 100644 --- a/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.rs +++ b/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - use std::ops::Deref; trait Iterable { diff --git a/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr b/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr index a4bb361900fe1..396ff15ab1a45 100644 --- a/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr +++ b/src/test/ui/generic-associated-types/generic_associated_type_undeclared_lifetimes.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/generic_associated_type_undeclared_lifetimes.rs:8:37 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:6:37 | LL | + Deref>; | ^^ undeclared lifetime @@ -19,7 +19,7 @@ LL | trait Iterable<'b> { | ++++ error[E0261]: use of undeclared lifetime name `'undeclared` - --> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:41 + --> $DIR/generic_associated_type_undeclared_lifetimes.rs:9:41 | LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>; | ^^^^^^^^^^^ undeclared lifetime diff --git a/src/test/ui/generic-associated-types/impl_bounds.rs b/src/test/ui/generic-associated-types/impl_bounds.rs index ec1d171c04470..01165fcebaf77 100644 --- a/src/test/ui/generic-associated-types/impl_bounds.rs +++ b/src/test/ui/generic-associated-types/impl_bounds.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] trait Foo { diff --git a/src/test/ui/generic-associated-types/impl_bounds.stderr b/src/test/ui/generic-associated-types/impl_bounds.stderr index 4f8d673d1cf2a..442d4f33690eb 100644 --- a/src/test/ui/generic-associated-types/impl_bounds.stderr +++ b/src/test/ui/generic-associated-types/impl_bounds.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/impl_bounds.rs:15:39 + --> $DIR/impl_bounds.rs:14:39 | LL | type A<'a> where Self: 'a; | ---------- definition of `A` from trait @@ -8,7 +8,7 @@ LL | type A<'a> = (&'a ()) where Self: 'static; | ^^^^^^^ impl has extra requirement `T: 'static` error[E0276]: impl has stricter requirements than trait - --> $DIR/impl_bounds.rs:17:48 + --> $DIR/impl_bounds.rs:16:48 | LL | type B<'a, 'b> where 'a: 'b; | -------------- definition of `B` from trait @@ -17,7 +17,7 @@ LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a; | ^^ impl has extra requirement `'b: 'a` error[E0478]: lifetime bound not satisfied - --> $DIR/impl_bounds.rs:17:22 + --> $DIR/impl_bounds.rs:16:22 | LL | type B<'a, 'b> where 'a: 'b; | -------------- definition of `B` from trait @@ -26,29 +26,29 @@ LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a; | ^^^^^^^^^^^^^^^ - help: try copying this clause from the trait: `, 'a: 'b` | note: lifetime parameter instantiated with the lifetime `'a` as defined here - --> $DIR/impl_bounds.rs:17:12 + --> $DIR/impl_bounds.rs:16:12 | LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a; | ^^ note: but lifetime parameter must outlive the lifetime `'b` as defined here - --> $DIR/impl_bounds.rs:17:16 + --> $DIR/impl_bounds.rs:16:16 | LL | type B<'a, 'b> = (&'a(), &'b ()) where 'b: 'a; | ^^ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/impl_bounds.rs:20:33 + --> $DIR/impl_bounds.rs:19:33 | LL | type C = String where Self: Copy; | ^^^^ the trait `Copy` is not implemented for `T` | note: required for `Fooy` to implement `Copy` - --> $DIR/impl_bounds.rs:11:10 + --> $DIR/impl_bounds.rs:10:10 | LL | #[derive(Copy, Clone)] | ^^^^ note: the requirement `Fooy: Copy` appears on the `impl`'s associated type `C` but not on the corresponding trait's associated type - --> $DIR/impl_bounds.rs:7:10 + --> $DIR/impl_bounds.rs:6:10 | LL | trait Foo { | --- in this trait @@ -62,18 +62,18 @@ LL | impl Foo for Fooy { | +++++++++++++++++++ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/impl_bounds.rs:22:24 + --> $DIR/impl_bounds.rs:21:24 | LL | fn d() where Self: Copy {} | ^^^^ the trait `Copy` is not implemented for `T` | note: required for `Fooy` to implement `Copy` - --> $DIR/impl_bounds.rs:11:10 + --> $DIR/impl_bounds.rs:10:10 | LL | #[derive(Copy, Clone)] | ^^^^ note: the requirement `Fooy: Copy` appears on the `impl`'s method `d` but not on the corresponding trait's method - --> $DIR/impl_bounds.rs:8:8 + --> $DIR/impl_bounds.rs:7:8 | LL | trait Foo { | --- in this trait diff --git a/src/test/ui/generic-associated-types/impl_bounds_ok.rs b/src/test/ui/generic-associated-types/impl_bounds_ok.rs index 4df8235d95f34..88f829ea25a5e 100644 --- a/src/test/ui/generic-associated-types/impl_bounds_ok.rs +++ b/src/test/ui/generic-associated-types/impl_bounds_ok.rs @@ -1,6 +1,5 @@ // check-pass -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] trait Foo { diff --git a/src/test/ui/generic-associated-types/issue-101020.rs b/src/test/ui/generic-associated-types/issue-101020.rs index 51cabe21e6291..80d0fa5ad34be 100644 --- a/src/test/ui/generic-associated-types/issue-101020.rs +++ b/src/test/ui/generic-associated-types/issue-101020.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - pub trait LendingIterator { type Item<'a> where diff --git a/src/test/ui/generic-associated-types/issue-101020.stderr b/src/test/ui/generic-associated-types/issue-101020.stderr index 7fde89eb75e51..b4e94cb83f738 100644 --- a/src/test/ui/generic-associated-types/issue-101020.stderr +++ b/src/test/ui/generic-associated-types/issue-101020.stderr @@ -1,5 +1,5 @@ error[E0277]: the trait bound `for<'a> &'a mut (): Foo<&'a mut ()>` is not satisfied - --> $DIR/issue-101020.rs:33:5 + --> $DIR/issue-101020.rs:31:5 | LL | (&mut EmptyIter).consume(()); | ^^^^^^^^^^^^^^^^ ------- required by a bound introduced by this call @@ -7,12 +7,12 @@ LL | (&mut EmptyIter).consume(()); | the trait `for<'a> Foo<&'a mut ()>` is not implemented for `&'a mut ()` | note: required for `&'a mut ()` to implement `for<'a> FuncInput<'a, &'a mut ()>` - --> $DIR/issue-101020.rs:29:20 + --> $DIR/issue-101020.rs:27:20 | LL | impl<'a, T, F: 'a> FuncInput<'a, F> for T where F: Foo {} | ^^^^^^^^^^^^^^^^ ^ note: required by a bound in `LendingIterator::consume` - --> $DIR/issue-101020.rs:11:33 + --> $DIR/issue-101020.rs:9:33 | LL | fn consume(self, _f: F) | ------- required by a bound in this diff --git a/src/test/ui/generic-associated-types/issue-47206-where-clause.rs b/src/test/ui/generic-associated-types/issue-47206-where-clause.rs index d352c1948f234..3d1b88ddf299d 100644 --- a/src/test/ui/generic-associated-types/issue-47206-where-clause.rs +++ b/src/test/ui/generic-associated-types/issue-47206-where-clause.rs @@ -1,7 +1,5 @@ // Check that this program doesn't cause the compiler to error without output. -#![feature(generic_associated_types)] - trait Foo { type Assoc3; } diff --git a/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr b/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr index 31948a878edfa..7006744df4987 100644 --- a/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr +++ b/src/test/ui/generic-associated-types/issue-47206-where-clause.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/issue-47206-where-clause.rs:12:38 + --> $DIR/issue-47206-where-clause.rs:10:38 | LL | type Assoc3; | -------------- definition of `Assoc3` from trait diff --git a/src/test/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs b/src/test/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs index e87a76825c37d..625ccfe89e09f 100644 --- a/src/test/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs +++ b/src/test/ui/generic-associated-types/issue-58694-parameter-out-of-range.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Cert { type PublicKey<'a>: From<&'a [u8]>; } diff --git a/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs b/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs index d74d6d056d665..c1140bff82bae 100644 --- a/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs +++ b/src/test/ui/generic-associated-types/issue-62326-parameter-out-of-range.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // check-pass trait Iterator { diff --git a/src/test/ui/generic-associated-types/issue-67424.rs b/src/test/ui/generic-associated-types/issue-67424.rs index fa35a3e8b04d1..b6c7c70cd8318 100644 --- a/src/test/ui/generic-associated-types/issue-67424.rs +++ b/src/test/ui/generic-associated-types/issue-67424.rs @@ -1,3 +1,4 @@ +// check-pass // Fixed by #67160 trait Trait1 { @@ -6,7 +7,6 @@ trait Trait1 { trait Trait2 { type Type1: Trait1; - //~^ ERROR: generic associated types are unstable } fn main() {} diff --git a/src/test/ui/generic-associated-types/issue-67424.stderr b/src/test/ui/generic-associated-types/issue-67424.stderr deleted file mode 100644 index bbb7d56f5928e..0000000000000 --- a/src/test/ui/generic-associated-types/issue-67424.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0658]: generic associated types are unstable - --> $DIR/issue-67424.rs:8:5 - | -LL | type Type1: Trait1; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #44265 for more information - = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/generic-associated-types/issue-67510-pass.base.stderr b/src/test/ui/generic-associated-types/issue-67510-pass.base.stderr index 74a616aaabe3a..4cc68530ee1a6 100644 --- a/src/test/ui/generic-associated-types/issue-67510-pass.base.stderr +++ b/src/test/ui/generic-associated-types/issue-67510-pass.base.stderr @@ -1,11 +1,11 @@ error[E0038]: the trait `X` cannot be made into an object - --> $DIR/issue-67510-pass.rs:13:23 + --> $DIR/issue-67510-pass.rs:12:23 | LL | fn _func1<'a>(_x: Box=&'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-67510-pass.rs:10:10 + --> $DIR/issue-67510-pass.rs:9:10 | LL | trait X { | - this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/issue-67510-pass.rs b/src/test/ui/generic-associated-types/issue-67510-pass.rs index c5b02ff9a6400..66ce3e807a150 100644 --- a/src/test/ui/generic-associated-types/issue-67510-pass.rs +++ b/src/test/ui/generic-associated-types/issue-67510-pass.rs @@ -2,7 +2,6 @@ //[base] check-fail //[extended] check-pass -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/issue-67510.rs b/src/test/ui/generic-associated-types/issue-67510.rs index 5725b660ab234..ab5c25d74da73 100644 --- a/src/test/ui/generic-associated-types/issue-67510.rs +++ b/src/test/ui/generic-associated-types/issue-67510.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; } diff --git a/src/test/ui/generic-associated-types/issue-67510.stderr b/src/test/ui/generic-associated-types/issue-67510.stderr index 8aeda22bad75f..d25c5b0f387ca 100644 --- a/src/test/ui/generic-associated-types/issue-67510.stderr +++ b/src/test/ui/generic-associated-types/issue-67510.stderr @@ -1,5 +1,5 @@ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/issue-67510.rs:7:21 + --> $DIR/issue-67510.rs:5:21 | LL | fn f(x: Box = &'a ()>>) {} | ^^ undeclared lifetime @@ -15,7 +15,7 @@ LL | fn f<'a>(x: Box = &'a ()>>) {} | ++++ error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/issue-67510.rs:7:28 + --> $DIR/issue-67510.rs:5:28 | LL | fn f(x: Box = &'a ()>>) {} | ^^ undeclared lifetime @@ -30,13 +30,13 @@ LL | fn f<'a>(x: Box = &'a ()>>) {} | ++++ error[E0038]: the trait `X` cannot be made into an object - --> $DIR/issue-67510.rs:7:13 + --> $DIR/issue-67510.rs:5:13 | LL | fn f(x: Box = &'a ()>>) {} | ^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-67510.rs:4:10 + --> $DIR/issue-67510.rs:2:10 | LL | trait X { | - this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs index 617d985dce9fe..f1e779fcb0063 100644 --- a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs +++ b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.rs @@ -1,7 +1,5 @@ // Regression test for #68641 -#![feature(generic_associated_types)] - trait UnsafeCopy { type Item<'a>: Copy; diff --git a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr index 2e21b38cb0e92..6bb7492af8114 100644 --- a/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr +++ b/src/test/ui/generic-associated-types/issue-68641-check-gat-bounds.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/issue-68641-check-gat-bounds.rs:14:21 + --> $DIR/issue-68641-check-gat-bounds.rs:12:21 | LL | type Item<'a> = T; | ^ the trait `Copy` is not implemented for `T` | note: required by a bound in `UnsafeCopy::Item` - --> $DIR/issue-68641-check-gat-bounds.rs:6:20 + --> $DIR/issue-68641-check-gat-bounds.rs:4:20 | LL | type Item<'a>: Copy; | ^^^^ required by this bound in `UnsafeCopy::Item` diff --git a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs index def0ad18f2328..f5502adee4263 100644 --- a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs +++ b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs @@ -1,7 +1,5 @@ // Regression test for #68642 -#![feature(generic_associated_types)] - trait Fun { type F<'a>: Fn() -> u32; diff --git a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr index 713cc744f5a22..07452137b5bd6 100644 --- a/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr +++ b/src/test/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr @@ -1,12 +1,12 @@ error[E0277]: expected a `Fn<()>` closure, found `T` - --> $DIR/issue-68642-broken-llvm-ir.rs:14:18 + --> $DIR/issue-68642-broken-llvm-ir.rs:12:18 | LL | type F<'a> = Self; | ^^^^ expected an `Fn<()>` closure, found `T` | = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `Fun::F` - --> $DIR/issue-68642-broken-llvm-ir.rs:6:17 + --> $DIR/issue-68642-broken-llvm-ir.rs:4:17 | LL | type F<'a>: Fn() -> u32; | ^^^^^^^^^^^ required by this bound in `Fun::F` diff --git a/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs b/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs index 9af065b5d26d1..6050a8bf56181 100644 --- a/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs +++ b/src/test/ui/generic-associated-types/issue-68643-broken-mir.rs @@ -1,7 +1,5 @@ // Regression test for #68643 -#![feature(generic_associated_types)] - trait Fun { type F<'a>: Fn() -> u32; diff --git a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr index a7b7f64cdb172..31ded5dab95b6 100644 --- a/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr +++ b/src/test/ui/generic-associated-types/issue-68643-broken-mir.stderr @@ -1,12 +1,12 @@ error[E0277]: expected a `Fn<()>` closure, found `T` - --> $DIR/issue-68643-broken-mir.rs:14:18 + --> $DIR/issue-68643-broken-mir.rs:12:18 | LL | type F<'a> = Self; | ^^^^ expected an `Fn<()>` closure, found `T` | = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `Fun::F` - --> $DIR/issue-68643-broken-mir.rs:6:17 + --> $DIR/issue-68643-broken-mir.rs:4:17 | LL | type F<'a>: Fn() -> u32; | ^^^^^^^^^^^ required by this bound in `Fun::F` diff --git a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs index 1d2636c260d8d..898cfa1e744cf 100644 --- a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs +++ b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.rs @@ -1,7 +1,5 @@ // Regression test for #68644 -#![feature(generic_associated_types)] - trait Fun { type F<'a>: Fn() -> u32; diff --git a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr index 5e921e053bb42..e2f9930cc67fd 100644 --- a/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr +++ b/src/test/ui/generic-associated-types/issue-68644-codegen-selection.stderr @@ -1,12 +1,12 @@ error[E0277]: expected a `Fn<()>` closure, found `T` - --> $DIR/issue-68644-codegen-selection.rs:14:18 + --> $DIR/issue-68644-codegen-selection.rs:12:18 | LL | type F<'a> = Self; | ^^^^ expected an `Fn<()>` closure, found `T` | = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `Fun::F` - --> $DIR/issue-68644-codegen-selection.rs:6:17 + --> $DIR/issue-68644-codegen-selection.rs:4:17 | LL | type F<'a>: Fn() -> u32; | ^^^^^^^^^^^ required by this bound in `Fun::F` diff --git a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs index aa505064f8c51..60b065bfc3171 100644 --- a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs +++ b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs @@ -1,7 +1,5 @@ // Regression test for #68645 -#![feature(generic_associated_types)] - trait Fun { type F<'a>: Fn() -> u32; diff --git a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr index 7edcdce628e6d..0065368ad31d9 100644 --- a/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr +++ b/src/test/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr @@ -1,12 +1,12 @@ error[E0277]: expected a `Fn<()>` closure, found `T` - --> $DIR/issue-68645-codegen-fulfillment.rs:14:18 + --> $DIR/issue-68645-codegen-fulfillment.rs:12:18 | LL | type F<'a> = Self; | ^^^^ expected an `Fn<()>` closure, found `T` | = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `Fun::F` - --> $DIR/issue-68645-codegen-fulfillment.rs:6:17 + --> $DIR/issue-68645-codegen-fulfillment.rs:4:17 | LL | type F<'a>: Fn() -> u32; | ^^^^^^^^^^^ required by this bound in `Fun::F` diff --git a/src/test/ui/generic-associated-types/issue-68648-1.rs b/src/test/ui/generic-associated-types/issue-68648-1.rs index 17bc034b39584..0df41bab32728 100644 --- a/src/test/ui/generic-associated-types/issue-68648-1.rs +++ b/src/test/ui/generic-associated-types/issue-68648-1.rs @@ -1,8 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - - trait Fun { type F<'a>; diff --git a/src/test/ui/generic-associated-types/issue-68648-2.rs b/src/test/ui/generic-associated-types/issue-68648-2.rs index 6c9a0d126a782..0f963d58f5e82 100644 --- a/src/test/ui/generic-associated-types/issue-68648-2.rs +++ b/src/test/ui/generic-associated-types/issue-68648-2.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Fun { type F<'a>; diff --git a/src/test/ui/generic-associated-types/issue-68648-2.stderr b/src/test/ui/generic-associated-types/issue-68648-2.stderr index 06c1efcd80b0d..b2bef19eb5e9c 100644 --- a/src/test/ui/generic-associated-types/issue-68648-2.stderr +++ b/src/test/ui/generic-associated-types/issue-68648-2.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-68648-2.rs:14:17 + --> $DIR/issue-68648-2.rs:12:17 | LL | fn bug<'a, T: Fun = T>>(t: T) -> T::F<'a> { | - this type parameter @@ -11,7 +11,7 @@ LL | T::identity(()) = note: expected type parameter `T` found unit type `()` note: associated function defined here - --> $DIR/issue-68648-2.rs:6:8 + --> $DIR/issue-68648-2.rs:4:8 | LL | fn identity<'a>(t: Self::F<'a>) -> Self::F<'a> { t } | ^^^^^^^^ -------------- diff --git a/src/test/ui/generic-associated-types/issue-68649-pass.rs b/src/test/ui/generic-associated-types/issue-68649-pass.rs index 33f08faff56bd..7727438779549 100644 --- a/src/test/ui/generic-associated-types/issue-68649-pass.rs +++ b/src/test/ui/generic-associated-types/issue-68649-pass.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Fun { type F<'a>; diff --git a/src/test/ui/generic-associated-types/issue-68653.rs b/src/test/ui/generic-associated-types/issue-68653.rs index 1e84717e9259f..170b87cf25281 100644 --- a/src/test/ui/generic-associated-types/issue-68653.rs +++ b/src/test/ui/generic-associated-types/issue-68653.rs @@ -2,8 +2,6 @@ // check-pass -#![feature(generic_associated_types)] - trait Fun { type F<'a: 'a>; } diff --git a/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs b/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs index c0d933362567e..607cfed0bc649 100644 --- a/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs +++ b/src/test/ui/generic-associated-types/issue-68656-unsized-values.rs @@ -1,7 +1,5 @@ // Regression test for #68656 -#![feature(generic_associated_types)] - trait UnsafeCopy { type Item<'a>: std::ops::Deref; diff --git a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr index 8e0f237160196..e8770aedfa1c7 100644 --- a/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr +++ b/src/test/ui/generic-associated-types/issue-68656-unsized-values.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving `::Target == T` - --> $DIR/issue-68656-unsized-values.rs:15:21 + --> $DIR/issue-68656-unsized-values.rs:13:21 | LL | impl UnsafeCopy for T { | - this type parameter @@ -9,7 +9,7 @@ LL | type Item<'a> = T; = note: expected type parameter `T` found associated type `::Target` note: required by a bound in `UnsafeCopy::Item` - --> $DIR/issue-68656-unsized-values.rs:6:36 + --> $DIR/issue-68656-unsized-values.rs:4:36 | LL | type Item<'a>: std::ops::Deref; | ^^^^^^^^^^ required by this bound in `UnsafeCopy::Item` diff --git a/src/test/ui/generic-associated-types/issue-70303.rs b/src/test/ui/generic-associated-types/issue-70303.rs index 568996e1a17aa..0edff5e4e3390 100644 --- a/src/test/ui/generic-associated-types/issue-70303.rs +++ b/src/test/ui/generic-associated-types/issue-70303.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Document { type Cursor<'a>: DocCursor<'a> where Self: 'a; diff --git a/src/test/ui/generic-associated-types/issue-70304.rs b/src/test/ui/generic-associated-types/issue-70304.rs index f778f985cf0d1..8898d4c7d1352 100644 --- a/src/test/ui/generic-associated-types/issue-70304.rs +++ b/src/test/ui/generic-associated-types/issue-70304.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Document { type Cursor<'a>: DocCursor<'a>; //~^ ERROR: missing required bound on `Cursor` diff --git a/src/test/ui/generic-associated-types/issue-70304.stderr b/src/test/ui/generic-associated-types/issue-70304.stderr index bba7cab7093ce..99339e9685959 100644 --- a/src/test/ui/generic-associated-types/issue-70304.stderr +++ b/src/test/ui/generic-associated-types/issue-70304.stderr @@ -1,11 +1,11 @@ error[E0637]: `'_` cannot be used here - --> $DIR/issue-70304.rs:48:41 + --> $DIR/issue-70304.rs:46:41 | LL | fn create_doc() -> impl Document = DocCursorImpl<'_>> { | ^^ `'_` is a reserved lifetime name error[E0106]: missing lifetime specifier - --> $DIR/issue-70304.rs:48:61 + --> $DIR/issue-70304.rs:46:61 | LL | fn create_doc() -> impl Document = DocCursorImpl<'_>> { | ^^ expected named lifetime parameter @@ -17,7 +17,7 @@ LL | fn create_doc() -> impl Document = DocCursorImpl<'static>> { | ~~~~~~~ error: missing required bound on `Cursor` - --> $DIR/issue-70304.rs:4:5 + --> $DIR/issue-70304.rs:2:5 | LL | type Cursor<'a>: DocCursor<'a>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- diff --git a/src/test/ui/generic-associated-types/issue-71176.rs b/src/test/ui/generic-associated-types/issue-71176.rs index c2f0d59f4435f..f0e162d825f9d 100644 --- a/src/test/ui/generic-associated-types/issue-71176.rs +++ b/src/test/ui/generic-associated-types/issue-71176.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Provider { type A<'a>; } diff --git a/src/test/ui/generic-associated-types/issue-71176.stderr b/src/test/ui/generic-associated-types/issue-71176.stderr index 08c8d41624e27..386c97161c8f1 100644 --- a/src/test/ui/generic-associated-types/issue-71176.stderr +++ b/src/test/ui/generic-associated-types/issue-71176.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `Provider::A` - --> $DIR/issue-71176.rs:12:27 + --> $DIR/issue-71176.rs:10:27 | LL | inner: Box>, | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-71176.rs:4:10 + --> $DIR/issue-71176.rs:2:10 | LL | type A<'a>; | ^ -- diff --git a/src/test/ui/generic-associated-types/issue-74684-1.rs b/src/test/ui/generic-associated-types/issue-74684-1.rs index 0e3899a88cc96..e9ec80074f896 100644 --- a/src/test/ui/generic-associated-types/issue-74684-1.rs +++ b/src/test/ui/generic-associated-types/issue-74684-1.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Fun { type F<'a>: ?Sized; diff --git a/src/test/ui/generic-associated-types/issue-74684-1.stderr b/src/test/ui/generic-associated-types/issue-74684-1.stderr index 2cd050ed8be6c..cacc973077ce7 100644 --- a/src/test/ui/generic-associated-types/issue-74684-1.stderr +++ b/src/test/ui/generic-associated-types/issue-74684-1.stderr @@ -1,5 +1,5 @@ error[E0597]: `a` does not live long enough - --> $DIR/issue-74684-1.rs:15:26 + --> $DIR/issue-74684-1.rs:13:26 | LL | fn bug<'a, T: ?Sized + Fun = [u8]>>(_ : Box) -> &'static T::F<'a> { | -- lifetime `'a` defined here diff --git a/src/test/ui/generic-associated-types/issue-74684-2.rs b/src/test/ui/generic-associated-types/issue-74684-2.rs index fca55070b5ba3..ff243af2cb390 100644 --- a/src/test/ui/generic-associated-types/issue-74684-2.rs +++ b/src/test/ui/generic-associated-types/issue-74684-2.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Fun { type F<'a>: ?Sized; diff --git a/src/test/ui/generic-associated-types/issue-74684-2.stderr b/src/test/ui/generic-associated-types/issue-74684-2.stderr index 7c2935d32bfd2..59b85abf5c8ce 100644 --- a/src/test/ui/generic-associated-types/issue-74684-2.stderr +++ b/src/test/ui/generic-associated-types/issue-74684-2.stderr @@ -1,5 +1,5 @@ error[E0271]: type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]` - --> $DIR/issue-74684-2.rs:23:9 + --> $DIR/issue-74684-2.rs:21:9 | LL | bug(Box::new(x)); | --- ^^^^^^^^^^^ type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]` @@ -7,12 +7,12 @@ LL | bug(Box::new(x)); | required by a bound introduced by this call | note: expected this to be `[u8]` - --> $DIR/issue-74684-2.rs:10:18 + --> $DIR/issue-74684-2.rs:8:18 | LL | type F<'a> = i32; | ^^^ note: required by a bound in `bug` - --> $DIR/issue-74684-2.rs:13:28 + --> $DIR/issue-74684-2.rs:11:28 | LL | fn bug<'a, T: ?Sized + Fun = [u8]>>(t: Box) -> &'static T::F<'a> { | ^^^^^^^^^^^^ required by this bound in `bug` diff --git a/src/test/ui/generic-associated-types/issue-74816.rs b/src/test/ui/generic-associated-types/issue-74816.rs index c932025d1178c..344afb87f99cf 100644 --- a/src/test/ui/generic-associated-types/issue-74816.rs +++ b/src/test/ui/generic-associated-types/issue-74816.rs @@ -1,5 +1,4 @@ #![feature(associated_type_defaults)] -#![feature(generic_associated_types)] trait Trait1 { fn foo(); diff --git a/src/test/ui/generic-associated-types/issue-74816.stderr b/src/test/ui/generic-associated-types/issue-74816.stderr index 9eaa74e343e4b..45018e6976cfb 100644 --- a/src/test/ui/generic-associated-types/issue-74816.stderr +++ b/src/test/ui/generic-associated-types/issue-74816.stderr @@ -1,11 +1,11 @@ error[E0277]: the trait bound `Self: Trait1` is not satisfied - --> $DIR/issue-74816.rs:9:31 + --> $DIR/issue-74816.rs:8:31 | LL | type Associated: Trait1 = Self; | ^^^^ the trait `Trait1` is not implemented for `Self` | note: required by a bound in `Trait2::Associated` - --> $DIR/issue-74816.rs:9:22 + --> $DIR/issue-74816.rs:8:22 | LL | type Associated: Trait1 = Self; | ^^^^^^ required by this bound in `Trait2::Associated` @@ -15,13 +15,13 @@ LL | trait Trait2: Trait1 { | ++++++++ error[E0277]: the size for values of type `Self` cannot be known at compilation time - --> $DIR/issue-74816.rs:9:31 + --> $DIR/issue-74816.rs:8:31 | LL | type Associated: Trait1 = Self; | ^^^^ doesn't have a size known at compile-time | note: required by a bound in `Trait2::Associated` - --> $DIR/issue-74816.rs:9:5 + --> $DIR/issue-74816.rs:8:5 | LL | type Associated: Trait1 = Self; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait2::Associated` diff --git a/src/test/ui/generic-associated-types/issue-74824.rs b/src/test/ui/generic-associated-types/issue-74824.rs index 1bbf7aac5cdab..10c45d1336420 100644 --- a/src/test/ui/generic-associated-types/issue-74824.rs +++ b/src/test/ui/generic-associated-types/issue-74824.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] use std::ops::Deref; diff --git a/src/test/ui/generic-associated-types/issue-74824.stderr b/src/test/ui/generic-associated-types/issue-74824.stderr index eabc806c2b7d4..623adb1c2ad1e 100644 --- a/src/test/ui/generic-associated-types/issue-74824.stderr +++ b/src/test/ui/generic-associated-types/issue-74824.stderr @@ -1,24 +1,24 @@ error[E0277]: the trait bound `Box: Copy` is not satisfied - --> $DIR/issue-74824.rs:7:26 + --> $DIR/issue-74824.rs:6:26 | LL | type Copy: Copy = Box; | ^^^^^^ the trait `Copy` is not implemented for `Box` | note: required by a bound in `UnsafeCopy::Copy` - --> $DIR/issue-74824.rs:7:19 + --> $DIR/issue-74824.rs:6:19 | LL | type Copy: Copy = Box; | ^^^^ required by this bound in `UnsafeCopy::Copy` error[E0277]: the trait bound `T: Clone` is not satisfied - --> $DIR/issue-74824.rs:7:26 + --> $DIR/issue-74824.rs:6:26 | LL | type Copy: Copy = Box; | ^^^^^^ the trait `Clone` is not implemented for `T` | = note: required for `Box` to implement `Clone` note: required by a bound in `UnsafeCopy::Copy` - --> $DIR/issue-74824.rs:7:19 + --> $DIR/issue-74824.rs:6:19 | LL | type Copy: Copy = Box; | ^^^^ required by this bound in `UnsafeCopy::Copy` diff --git a/src/test/ui/generic-associated-types/issue-76407.rs b/src/test/ui/generic-associated-types/issue-76407.rs index a8141829ba889..9556ec6da2537 100644 --- a/src/test/ui/generic-associated-types/issue-76407.rs +++ b/src/test/ui/generic-associated-types/issue-76407.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Marker {} impl Marker for u32 {} diff --git a/src/test/ui/generic-associated-types/issue-76535.base.stderr b/src/test/ui/generic-associated-types/issue-76535.base.stderr index fe5fe964e991d..088f69b09f704 100644 --- a/src/test/ui/generic-associated-types/issue-76535.base.stderr +++ b/src/test/ui/generic-associated-types/issue-76535.base.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `SuperTrait::SubType` - --> $DIR/issue-76535.rs:40:33 + --> $DIR/issue-76535.rs:39:33 | LL | let sub: Box> = Box::new(SuperStruct::new(0)); | ^^^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-76535.rs:10:10 + --> $DIR/issue-76535.rs:9:10 | LL | type SubType<'a>: SubTrait where Self: 'a; | ^^^^^^^ -- @@ -15,13 +15,13 @@ LL | let sub: Box = SubStruct>> = Box::new(SuperS | ~~~~~~~~~~~ error[E0038]: the trait `SuperTrait` cannot be made into an object - --> $DIR/issue-76535.rs:40:14 + --> $DIR/issue-76535.rs:39:14 | LL | let sub: Box> = Box::new(SuperStruct::new(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-76535.rs:10:10 + --> $DIR/issue-76535.rs:9:10 | LL | pub trait SuperTrait { | ---------- this trait cannot be made into an object... @@ -30,13 +30,13 @@ LL | type SubType<'a>: SubTrait where Self: 'a; = help: consider moving `SubType` to another trait error[E0038]: the trait `SuperTrait` cannot be made into an object - --> $DIR/issue-76535.rs:40:57 + --> $DIR/issue-76535.rs:39:57 | LL | let sub: Box> = Box::new(SuperStruct::new(0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-76535.rs:10:10 + --> $DIR/issue-76535.rs:9:10 | LL | pub trait SuperTrait { | ---------- this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/issue-76535.extended.stderr b/src/test/ui/generic-associated-types/issue-76535.extended.stderr index 067d0489b486b..e79f0a73f5b50 100644 --- a/src/test/ui/generic-associated-types/issue-76535.extended.stderr +++ b/src/test/ui/generic-associated-types/issue-76535.extended.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `SuperTrait::SubType` - --> $DIR/issue-76535.rs:40:33 + --> $DIR/issue-76535.rs:39:33 | LL | let sub: Box> = Box::new(SuperStruct::new(0)); | ^^^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-76535.rs:10:10 + --> $DIR/issue-76535.rs:9:10 | LL | type SubType<'a>: SubTrait where Self: 'a; | ^^^^^^^ -- diff --git a/src/test/ui/generic-associated-types/issue-76535.rs b/src/test/ui/generic-associated-types/issue-76535.rs index 46f217ba06bc8..2457a05a06729 100644 --- a/src/test/ui/generic-associated-types/issue-76535.rs +++ b/src/test/ui/generic-associated-types/issue-76535.rs @@ -1,6 +1,5 @@ // revisions: base extended -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/issue-76826.rs b/src/test/ui/generic-associated-types/issue-76826.rs index 28eb3b0e750e2..ead78453ecfe3 100644 --- a/src/test/ui/generic-associated-types/issue-76826.rs +++ b/src/test/ui/generic-associated-types/issue-76826.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(generic_associated_types)] - pub trait Iter { type Item<'a> where Self: 'a; diff --git a/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs b/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs index 850d83be6845d..ebf50bf4ace11 100644 --- a/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs +++ b/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs @@ -2,8 +2,6 @@ // check-fail -#![feature(generic_associated_types)] - pub trait A {} impl A for &dyn A {} impl A for Box {} diff --git a/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr b/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr index d487f19ba7490..86e0f57454404 100644 --- a/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr +++ b/src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.stderr @@ -1,22 +1,22 @@ error: incompatible lifetime on type - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:17:18 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:15:18 | LL | type T<'a> = Box; | ^^^^^^^^^^^^^^^ | note: because this has an unmet lifetime requirement - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:12:17 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:10:17 | LL | type T<'a>: A; | ^ introduces a `'static` lifetime requirement note: the lifetime `'a` as defined here... - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:17:12 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:15:12 | LL | type T<'a> = Box; | ^^ = note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl` note: this has an implicit `'static` lifetime requirement - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:9:20 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:7:20 | LL | impl A for Box {} | ^ @@ -26,51 +26,51 @@ LL | impl A for Box {} | ++++ error: incompatible lifetime on type - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:27:18 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:25:18 | LL | type T<'a> = Box; | ^^^^^^^^^^^^^^^ | note: because this has an unmet lifetime requirement - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:23:17 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:21:17 | LL | type T<'a>: C; | ^ introduces a `'static` lifetime requirement note: the lifetime `'a` as defined here... - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:27:12 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:25:12 | LL | type T<'a> = Box; | ^^ note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl` - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:21:1 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:19:1 | LL | impl C for Box {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: incompatible lifetime on type - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:37:18 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:35:18 | LL | type T<'a> = (Box, Box); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: because this has an unmet lifetime requirement - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:33:17 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:31:17 | LL | type T<'a>: E; | ^ introduces a `'static` lifetime requirement note: the lifetime `'a` as defined here... - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:37:12 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:35:12 | LL | type T<'a> = (Box, Box); | ^^ = note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl` note: this has an implicit `'static` lifetime requirement - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:31:21 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:29:21 | LL | impl E for (Box, Box) {} | ^ note: this has an implicit `'static` lifetime requirement - --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:31:33 + --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:29:33 | LL | impl E for (Box, Box) {} | ^ diff --git a/src/test/ui/generic-associated-types/issue-78671.base.stderr b/src/test/ui/generic-associated-types/issue-78671.base.stderr index 6bcd004b1a92e..514f8d45a15f4 100644 --- a/src/test/ui/generic-associated-types/issue-78671.base.stderr +++ b/src/test/ui/generic-associated-types/issue-78671.base.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `CollectionFamily::Member` - --> $DIR/issue-78671.rs:11:47 + --> $DIR/issue-78671.rs:10:47 | LL | Box::new(Family) as &dyn CollectionFamily | ^^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-78671.rs:8:10 + --> $DIR/issue-78671.rs:7:10 | LL | type Member; | ^^^^^^ - @@ -15,13 +15,13 @@ LL | Box::new(Family) as &dyn CollectionFamily=usize> | ~~~~~~~~~ error[E0038]: the trait `CollectionFamily` cannot be made into an object - --> $DIR/issue-78671.rs:11:25 + --> $DIR/issue-78671.rs:10:25 | LL | Box::new(Family) as &dyn CollectionFamily | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-78671.rs:8:10 + --> $DIR/issue-78671.rs:7:10 | LL | trait CollectionFamily { | ---------------- this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/issue-78671.extended.stderr b/src/test/ui/generic-associated-types/issue-78671.extended.stderr index f1b48933516f6..6fa09a4c7e596 100644 --- a/src/test/ui/generic-associated-types/issue-78671.extended.stderr +++ b/src/test/ui/generic-associated-types/issue-78671.extended.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `CollectionFamily::Member` - --> $DIR/issue-78671.rs:11:47 + --> $DIR/issue-78671.rs:10:47 | LL | Box::new(Family) as &dyn CollectionFamily | ^^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-78671.rs:8:10 + --> $DIR/issue-78671.rs:7:10 | LL | type Member; | ^^^^^^ - diff --git a/src/test/ui/generic-associated-types/issue-78671.rs b/src/test/ui/generic-associated-types/issue-78671.rs index c09dac28bda6c..327b0c14ae864 100644 --- a/src/test/ui/generic-associated-types/issue-78671.rs +++ b/src/test/ui/generic-associated-types/issue-78671.rs @@ -1,6 +1,5 @@ // revisions: base extended -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/issue-79422.base.stderr b/src/test/ui/generic-associated-types/issue-79422.base.stderr index 0ed75ba1efc25..3c1a29d48b2fe 100644 --- a/src/test/ui/generic-associated-types/issue-79422.base.stderr +++ b/src/test/ui/generic-associated-types/issue-79422.base.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `MapLike::VRefCont` - --> $DIR/issue-79422.rs:48:36 + --> $DIR/issue-79422.rs:47:36 | LL | as Box>>; | ^^^^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-79422.rs:24:10 + --> $DIR/issue-79422.rs:23:10 | LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a; | ^^^^^^^^ -- @@ -15,13 +15,13 @@ LL | as Box = dyn RefCont<'_, u8>>>; | ~~~~~~~~~~~~ error[E0038]: the trait `MapLike` cannot be made into an object - --> $DIR/issue-79422.rs:48:12 + --> $DIR/issue-79422.rs:47:12 | LL | as Box>>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-79422.rs:24:10 + --> $DIR/issue-79422.rs:23:10 | LL | trait MapLike { | ------- this trait cannot be made into an object... @@ -30,13 +30,13 @@ LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a; = help: consider moving `VRefCont` to another trait error[E0038]: the trait `MapLike` cannot be made into an object - --> $DIR/issue-79422.rs:45:13 + --> $DIR/issue-79422.rs:44:13 | LL | let m = Box::new(std::collections::BTreeMap::::new()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/issue-79422.rs:24:10 + --> $DIR/issue-79422.rs:23:10 | LL | trait MapLike { | ------- this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/issue-79422.extended.stderr b/src/test/ui/generic-associated-types/issue-79422.extended.stderr index 9bcbd74716845..58c921bf09f6d 100644 --- a/src/test/ui/generic-associated-types/issue-79422.extended.stderr +++ b/src/test/ui/generic-associated-types/issue-79422.extended.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `MapLike::VRefCont` - --> $DIR/issue-79422.rs:48:36 + --> $DIR/issue-79422.rs:47:36 | LL | as Box>>; | ^^^^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-79422.rs:24:10 + --> $DIR/issue-79422.rs:23:10 | LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a; | ^^^^^^^^ -- @@ -15,13 +15,13 @@ LL | as Box = dyn RefCont<'_, u8>>>; | ~~~~~~~~~~~~ error[E0271]: type mismatch resolving ` as MapLike>::VRefCont<'_> == (dyn RefCont<'_, u8> + 'static)` - --> $DIR/issue-79422.rs:45:13 + --> $DIR/issue-79422.rs:44:13 | LL | let m = Box::new(std::collections::BTreeMap::::new()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch resolving ` as MapLike>::VRefCont<'_> == (dyn RefCont<'_, u8> + 'static)` | note: expected this to be `(dyn RefCont<'_, u8> + 'static)` - --> $DIR/issue-79422.rs:29:25 + --> $DIR/issue-79422.rs:28:25 | LL | type VRefCont<'a> = &'a V where Self: 'a; | ^^^^^ diff --git a/src/test/ui/generic-associated-types/issue-79422.rs b/src/test/ui/generic-associated-types/issue-79422.rs index 7749975e68727..a52dd792dda26 100644 --- a/src/test/ui/generic-associated-types/issue-79422.rs +++ b/src/test/ui/generic-associated-types/issue-79422.rs @@ -1,6 +1,5 @@ // revisions: base extended -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/issue-79636-1.rs b/src/test/ui/generic-associated-types/issue-79636-1.rs index 6d73fd68dbed1..a89039b5c7203 100644 --- a/src/test/ui/generic-associated-types/issue-79636-1.rs +++ b/src/test/ui/generic-associated-types/issue-79636-1.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Monad { type Unwrapped; type Wrapped; diff --git a/src/test/ui/generic-associated-types/issue-79636-1.stderr b/src/test/ui/generic-associated-types/issue-79636-1.stderr index 1ecb862827fd7..155477048cad9 100644 --- a/src/test/ui/generic-associated-types/issue-79636-1.stderr +++ b/src/test/ui/generic-associated-types/issue-79636-1.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `Monad::Wrapped` - --> $DIR/issue-79636-1.rs:15:34 + --> $DIR/issue-79636-1.rs:13:34 | LL | MInner: Monad>, | ^^^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `B` - --> $DIR/issue-79636-1.rs:5:10 + --> $DIR/issue-79636-1.rs:3:10 | LL | type Wrapped; | ^^^^^^^ - diff --git a/src/test/ui/generic-associated-types/issue-79636-2.rs b/src/test/ui/generic-associated-types/issue-79636-2.rs index cdaf2e483411e..ff5ff38c968d2 100644 --- a/src/test/ui/generic-associated-types/issue-79636-2.rs +++ b/src/test/ui/generic-associated-types/issue-79636-2.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait SomeTrait { type Wrapped: SomeTrait; diff --git a/src/test/ui/generic-associated-types/issue-79636-2.stderr b/src/test/ui/generic-associated-types/issue-79636-2.stderr index ae61b7b104e87..6a36bfc37f247 100644 --- a/src/test/ui/generic-associated-types/issue-79636-2.stderr +++ b/src/test/ui/generic-associated-types/issue-79636-2.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `SomeTrait::Wrapped` - --> $DIR/issue-79636-2.rs:11:18 + --> $DIR/issue-79636-2.rs:9:18 | LL | W: SomeTrait, | ^^^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `A` - --> $DIR/issue-79636-2.rs:4:10 + --> $DIR/issue-79636-2.rs:2:10 | LL | type Wrapped: SomeTrait; | ^^^^^^^ - diff --git a/src/test/ui/generic-associated-types/issue-80433-reduced.rs b/src/test/ui/generic-associated-types/issue-80433-reduced.rs index f15d4d8b1385a..44831a995c66e 100644 --- a/src/test/ui/generic-associated-types/issue-80433-reduced.rs +++ b/src/test/ui/generic-associated-types/issue-80433-reduced.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - struct E {} trait TestMut { diff --git a/src/test/ui/generic-associated-types/issue-80433.rs b/src/test/ui/generic-associated-types/issue-80433.rs index 6a1fe7519a840..05ff82fa7d5de 100644 --- a/src/test/ui/generic-associated-types/issue-80433.rs +++ b/src/test/ui/generic-associated-types/issue-80433.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - #[derive(Default)] struct E { data: T, diff --git a/src/test/ui/generic-associated-types/issue-80433.stderr b/src/test/ui/generic-associated-types/issue-80433.stderr index d8c210dcf7e98..20a407dd4125e 100644 --- a/src/test/ui/generic-associated-types/issue-80433.stderr +++ b/src/test/ui/generic-associated-types/issue-80433.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `TestMut::Output` - --> $DIR/issue-80433.rs:23:47 + --> $DIR/issue-80433.rs:21:47 | LL | fn test_simpler<'a>(dst: &'a mut impl TestMut) | ^^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-80433.rs:9:10 + --> $DIR/issue-80433.rs:7:10 | LL | type Output<'a>; | ^^^^^^ -- diff --git a/src/test/ui/generic-associated-types/issue-81487.rs b/src/test/ui/generic-associated-types/issue-81487.rs index 7f399c4f9a2db..0d19a75bb7ff9 100644 --- a/src/test/ui/generic-associated-types/issue-81487.rs +++ b/src/test/ui/generic-associated-types/issue-81487.rs @@ -1,7 +1,5 @@ // build-pass -#![feature(generic_associated_types)] - trait Trait { type Ref<'a>; } diff --git a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.rs b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.rs index fa2f86242257f..a7cc9a6053e49 100644 --- a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.rs +++ b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.rs @@ -1,7 +1,5 @@ // Regression test for #81712. -#![feature(generic_associated_types)] - trait A { type BType: B; } diff --git a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr index 86c99c32fc1ab..c8961e28ede45 100644 --- a/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr +++ b/src/test/ui/generic-associated-types/issue-81712-cyclic-traits.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `C::DType` - --> $DIR/issue-81712-cyclic-traits.rs:16:19 + --> $DIR/issue-81712-cyclic-traits.rs:14:19 | LL | type CType: C; | ^^^^^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/issue-81712-cyclic-traits.rs:13:10 + --> $DIR/issue-81712-cyclic-traits.rs:11:10 | LL | type DType: D; | ^^^^^ - diff --git a/src/test/ui/generic-associated-types/issue-81862.rs b/src/test/ui/generic-associated-types/issue-81862.rs index e457bca0c0963..bde828b775b57 100644 --- a/src/test/ui/generic-associated-types/issue-81862.rs +++ b/src/test/ui/generic-associated-types/issue-81862.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait StreamingIterator { type Item<'a>; fn next(&mut self) -> Option; diff --git a/src/test/ui/generic-associated-types/issue-81862.stderr b/src/test/ui/generic-associated-types/issue-81862.stderr index c664b3ee6683b..ba798084673cd 100644 --- a/src/test/ui/generic-associated-types/issue-81862.stderr +++ b/src/test/ui/generic-associated-types/issue-81862.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `StreamingIterator::Item` - --> $DIR/issue-81862.rs:5:40 + --> $DIR/issue-81862.rs:3:40 | LL | fn next(&mut self) -> Option; | ^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-81862.rs:4:10 + --> $DIR/issue-81862.rs:2:10 | LL | type Item<'a>; | ^^^^ -- diff --git a/src/test/ui/generic-associated-types/issue-84931.rs b/src/test/ui/generic-associated-types/issue-84931.rs index 9e247de163203..4123ce9d4d94c 100644 --- a/src/test/ui/generic-associated-types/issue-84931.rs +++ b/src/test/ui/generic-associated-types/issue-84931.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] // check-fail trait StreamingIter { diff --git a/src/test/ui/generic-associated-types/issue-84931.stderr b/src/test/ui/generic-associated-types/issue-84931.stderr index 11c3dffde4b38..fffea98a449e2 100644 --- a/src/test/ui/generic-associated-types/issue-84931.stderr +++ b/src/test/ui/generic-associated-types/issue-84931.stderr @@ -1,5 +1,5 @@ error[E0309]: the parameter type `T` may not live long enough - --> $DIR/issue-84931.rs:15:21 + --> $DIR/issue-84931.rs:14:21 | LL | type Item<'a> = &'a mut T; | ^^^^^^^^^- help: consider adding a where clause: `where T: 'a` diff --git a/src/test/ui/generic-associated-types/issue-85921.rs b/src/test/ui/generic-associated-types/issue-85921.rs index df59f497d7841..d281ed9eedbcb 100644 --- a/src/test/ui/generic-associated-types/issue-85921.rs +++ b/src/test/ui/generic-associated-types/issue-85921.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Trait { type Assoc<'a>; diff --git a/src/test/ui/generic-associated-types/issue-86483.rs b/src/test/ui/generic-associated-types/issue-86483.rs index 07dd0bffd4685..70267637ae9d6 100644 --- a/src/test/ui/generic-associated-types/issue-86483.rs +++ b/src/test/ui/generic-associated-types/issue-86483.rs @@ -4,8 +4,6 @@ // // check-pass -#![feature(generic_associated_types)] - pub trait IceIce where for<'a> T: 'a, diff --git a/src/test/ui/generic-associated-types/issue-86787.rs b/src/test/ui/generic-associated-types/issue-86787.rs index 0f8096c8a7c1b..96075ca503dab 100644 --- a/src/test/ui/generic-associated-types/issue-86787.rs +++ b/src/test/ui/generic-associated-types/issue-86787.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] // check-fail enum Either { diff --git a/src/test/ui/generic-associated-types/issue-86787.stderr b/src/test/ui/generic-associated-types/issue-86787.stderr index d4b2267d3ddc7..f34c63cf72e18 100644 --- a/src/test/ui/generic-associated-types/issue-86787.stderr +++ b/src/test/ui/generic-associated-types/issue-86787.stderr @@ -1,5 +1,5 @@ error: missing required bound on `TRef` - --> $DIR/issue-86787.rs:11:5 + --> $DIR/issue-86787.rs:10:5 | LL | type TRef<'a>; | ^^^^^^^^^^^^^- diff --git a/src/test/ui/generic-associated-types/issue-87258_a.rs b/src/test/ui/generic-associated-types/issue-87258_a.rs index c65f3fb2aa0a1..9ab683d3dc9e4 100644 --- a/src/test/ui/generic-associated-types/issue-87258_a.rs +++ b/src/test/ui/generic-associated-types/issue-87258_a.rs @@ -1,5 +1,4 @@ #![feature(type_alias_impl_trait)] -#![feature(generic_associated_types)] // See https://github.com/rust-lang/rust/issues/87258#issuecomment-883293367 diff --git a/src/test/ui/generic-associated-types/issue-87258_a.stderr b/src/test/ui/generic-associated-types/issue-87258_a.stderr index db3a5c819cbf3..fa0748a280b60 100644 --- a/src/test/ui/generic-associated-types/issue-87258_a.stderr +++ b/src/test/ui/generic-associated-types/issue-87258_a.stderr @@ -1,5 +1,5 @@ error: unconstrained opaque type - --> $DIR/issue-87258_a.rs:18:26 + --> $DIR/issue-87258_a.rs:17:26 | LL | type FooFuture<'a> = impl Trait1; | ^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/issue-87258_b.rs b/src/test/ui/generic-associated-types/issue-87258_b.rs index f59e0d7665942..7b7610b21c7dc 100644 --- a/src/test/ui/generic-associated-types/issue-87258_b.rs +++ b/src/test/ui/generic-associated-types/issue-87258_b.rs @@ -1,5 +1,4 @@ #![feature(type_alias_impl_trait)] -#![feature(generic_associated_types)] // See https://github.com/rust-lang/rust/issues/87258#issuecomment-883293367 diff --git a/src/test/ui/generic-associated-types/issue-87258_b.stderr b/src/test/ui/generic-associated-types/issue-87258_b.stderr index 9faccc96124bc..0ee665f38ad08 100644 --- a/src/test/ui/generic-associated-types/issue-87258_b.stderr +++ b/src/test/ui/generic-associated-types/issue-87258_b.stderr @@ -1,5 +1,5 @@ error: unconstrained opaque type - --> $DIR/issue-87258_b.rs:17:49 + --> $DIR/issue-87258_b.rs:16:49 | LL | type Helper<'xenon, 'yttrium, KABOOM: Trait2> = impl Trait1; | ^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/issue-87429-2.rs b/src/test/ui/generic-associated-types/issue-87429-2.rs index d35bb098abdf0..feb43ee5aa4ad 100644 --- a/src/test/ui/generic-associated-types/issue-87429-2.rs +++ b/src/test/ui/generic-associated-types/issue-87429-2.rs @@ -4,8 +4,6 @@ // check-pass -#![feature(generic_associated_types)] - trait Family { type Member<'a, C: Eq>: for<'b> MyBound<'b, C>; } diff --git a/src/test/ui/generic-associated-types/issue-87429-associated-type-default.rs b/src/test/ui/generic-associated-types/issue-87429-associated-type-default.rs index 9ee07c2f1e1cc..2006f9bc74dfe 100644 --- a/src/test/ui/generic-associated-types/issue-87429-associated-type-default.rs +++ b/src/test/ui/generic-associated-types/issue-87429-associated-type-default.rs @@ -1,7 +1,6 @@ // check-fail #![feature(associated_type_defaults)] -#![feature(generic_associated_types)] trait Family { // Fine, i32: PartialEq diff --git a/src/test/ui/generic-associated-types/issue-87429-associated-type-default.stderr b/src/test/ui/generic-associated-types/issue-87429-associated-type-default.stderr index c6fa02cb9a6b4..b1abe012be23d 100644 --- a/src/test/ui/generic-associated-types/issue-87429-associated-type-default.stderr +++ b/src/test/ui/generic-associated-types/issue-87429-associated-type-default.stderr @@ -1,12 +1,12 @@ error[E0277]: can't compare `Foo` with `Foo` - --> $DIR/issue-87429-associated-type-default.rs:14:60 + --> $DIR/issue-87429-associated-type-default.rs:13:60 | LL | type Member<'a>: for<'b> PartialEq> = Foo; | ^^^ no implementation for `Foo == Foo` | = help: the trait `PartialEq` is not implemented for `Foo` note: required by a bound in `Family2::Member` - --> $DIR/issue-87429-associated-type-default.rs:14:22 + --> $DIR/issue-87429-associated-type-default.rs:13:22 | LL | type Member<'a>: for<'b> PartialEq> = Foo; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Family2::Member` diff --git a/src/test/ui/generic-associated-types/issue-87429-specialization.rs b/src/test/ui/generic-associated-types/issue-87429-specialization.rs index b365e07feb28a..6e31f1b21e5c9 100644 --- a/src/test/ui/generic-associated-types/issue-87429-specialization.rs +++ b/src/test/ui/generic-associated-types/issue-87429-specialization.rs @@ -2,7 +2,6 @@ #![feature(specialization)] //~^ WARN incomplete -#![feature(generic_associated_types)] trait Family { type Member<'a>: for<'b> PartialEq>; diff --git a/src/test/ui/generic-associated-types/issue-87429-specialization.stderr b/src/test/ui/generic-associated-types/issue-87429-specialization.stderr index 015e0c7792fec..d8e889aecef71 100644 --- a/src/test/ui/generic-associated-types/issue-87429-specialization.stderr +++ b/src/test/ui/generic-associated-types/issue-87429-specialization.stderr @@ -9,14 +9,14 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete error[E0277]: can't compare `Foo` with `Foo` - --> $DIR/issue-87429-specialization.rs:21:31 + --> $DIR/issue-87429-specialization.rs:20:31 | LL | default type Member<'a> = Foo; | ^^^ no implementation for `Foo == Foo` | = help: the trait `PartialEq` is not implemented for `Foo` note: required by a bound in `Family::Member` - --> $DIR/issue-87429-specialization.rs:8:22 + --> $DIR/issue-87429-specialization.rs:7:22 | LL | type Member<'a>: for<'b> PartialEq>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Family::Member` diff --git a/src/test/ui/generic-associated-types/issue-87429.rs b/src/test/ui/generic-associated-types/issue-87429.rs index f905348ae32a3..56394823cc519 100644 --- a/src/test/ui/generic-associated-types/issue-87429.rs +++ b/src/test/ui/generic-associated-types/issue-87429.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Family { type Member<'a>: for<'b> PartialEq>; } diff --git a/src/test/ui/generic-associated-types/issue-87748.rs b/src/test/ui/generic-associated-types/issue-87748.rs index 1a1ab9bf8a4eb..6cbe3d9022330 100644 --- a/src/test/ui/generic-associated-types/issue-87748.rs +++ b/src/test/ui/generic-associated-types/issue-87748.rs @@ -3,8 +3,6 @@ // check-pass -#![feature(generic_associated_types)] - trait MyTrait { type Assoc<'a, 'b> where 'b: 'a; fn do_sth(arg: Self::Assoc<'_, '_>); diff --git a/src/test/ui/generic-associated-types/issue-87750.rs b/src/test/ui/generic-associated-types/issue-87750.rs index 89bd79ac2991e..0a11a0f3ae0e4 100644 --- a/src/test/ui/generic-associated-types/issue-87750.rs +++ b/src/test/ui/generic-associated-types/issue-87750.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait PointerFamily { type Pointer; } diff --git a/src/test/ui/generic-associated-types/issue-87750.stderr b/src/test/ui/generic-associated-types/issue-87750.stderr index 854541f3d8fda..b358ca273ca79 100644 --- a/src/test/ui/generic-associated-types/issue-87750.stderr +++ b/src/test/ui/generic-associated-types/issue-87750.stderr @@ -1,5 +1,5 @@ error[E0275]: overflow evaluating the requirement `Node: Sized` - --> $DIR/issue-87750.rs:20:16 + --> $DIR/issue-87750.rs:18:16 | LL | let _list: ::Pointer>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/issue-88287.rs b/src/test/ui/generic-associated-types/issue-88287.rs index 4952a082586d0..82188493d52bd 100644 --- a/src/test/ui/generic-associated-types/issue-88287.rs +++ b/src/test/ui/generic-associated-types/issue-88287.rs @@ -1,6 +1,5 @@ // edition:2018 -#![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/src/test/ui/generic-associated-types/issue-88287.stderr b/src/test/ui/generic-associated-types/issue-88287.stderr index 5241d85a5f964..1b84cce622929 100644 --- a/src/test/ui/generic-associated-types/issue-88287.stderr +++ b/src/test/ui/generic-associated-types/issue-88287.stderr @@ -1,5 +1,5 @@ error[E0277]: the size for values of type `A` cannot be known at compilation time - --> $DIR/issue-88287.rs:35:9 + --> $DIR/issue-88287.rs:34:9 | LL | type SearchFutureTy<'f, A, B: 'f> | - this type parameter needs to be `std::marker::Sized` @@ -8,7 +8,7 @@ LL | async move { todo!() } | ^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | note: required by a bound in `>` - --> $DIR/issue-88287.rs:25:6 + --> $DIR/issue-88287.rs:24:6 | LL | impl SearchableResourceExt for T | ^ required by this bound in `>` diff --git a/src/test/ui/generic-associated-types/issue-88360.rs b/src/test/ui/generic-associated-types/issue-88360.rs index 8ee98201aba7a..c02690618d0ee 100644 --- a/src/test/ui/generic-associated-types/issue-88360.rs +++ b/src/test/ui/generic-associated-types/issue-88360.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait GatTrait { type Gat<'a> where Self: 'a; diff --git a/src/test/ui/generic-associated-types/issue-88360.stderr b/src/test/ui/generic-associated-types/issue-88360.stderr index 5f769d799faa1..cd3750344dda1 100644 --- a/src/test/ui/generic-associated-types/issue-88360.stderr +++ b/src/test/ui/generic-associated-types/issue-88360.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-88360.rs:15:9 + --> $DIR/issue-88360.rs:13:9 | LL | trait SuperTrait | - this type parameter diff --git a/src/test/ui/generic-associated-types/issue-88405.rs b/src/test/ui/generic-associated-types/issue-88405.rs index 4a405bd3625c1..8dad6a89fd05d 100644 --- a/src/test/ui/generic-associated-types/issue-88405.rs +++ b/src/test/ui/generic-associated-types/issue-88405.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait SomeTrait {} trait OtherTrait { type Item; diff --git a/src/test/ui/generic-associated-types/issue-88459.rs b/src/test/ui/generic-associated-types/issue-88459.rs index 3b26a180152cb..07d7bc06d08ef 100644 --- a/src/test/ui/generic-associated-types/issue-88459.rs +++ b/src/test/ui/generic-associated-types/issue-88459.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - trait Trait { type Assoc<'a>; } diff --git a/src/test/ui/generic-associated-types/issue-88595.rs b/src/test/ui/generic-associated-types/issue-88595.rs index e0796dfecbbcc..24641ee1f7812 100644 --- a/src/test/ui/generic-associated-types/issue-88595.rs +++ b/src/test/ui/generic-associated-types/issue-88595.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] fn main() {} diff --git a/src/test/ui/generic-associated-types/issue-88595.stderr b/src/test/ui/generic-associated-types/issue-88595.stderr index 79d3479af8c8f..bcefc80668514 100644 --- a/src/test/ui/generic-associated-types/issue-88595.stderr +++ b/src/test/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:35 + --> $DIR/issue-88595.rs:20:35 | LL | fn a(&'a self) -> Self::B<'a> {} | ^^ | note: lifetime used multiple times - --> $DIR/issue-88595.rs:18:6 + --> $DIR/issue-88595.rs:17:6 | LL | impl<'a> A<'a> for C { | ^^ diff --git a/src/test/ui/generic-associated-types/issue-89352.rs b/src/test/ui/generic-associated-types/issue-89352.rs index d9c656d5f58a9..1896d0c87f4ce 100644 --- a/src/test/ui/generic-associated-types/issue-89352.rs +++ b/src/test/ui/generic-associated-types/issue-89352.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - use std::marker::PhantomData; pub trait GenAssoc { diff --git a/src/test/ui/generic-associated-types/issue-90014.rs b/src/test/ui/generic-associated-types/issue-90014.rs index f110b069383d3..55db95a6d8196 100644 --- a/src/test/ui/generic-associated-types/issue-90014.rs +++ b/src/test/ui/generic-associated-types/issue-90014.rs @@ -1,6 +1,5 @@ // edition:2018 -#![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] use std::future::Future; diff --git a/src/test/ui/generic-associated-types/issue-90014.stderr b/src/test/ui/generic-associated-types/issue-90014.stderr index 457c582e8c8d8..2d3f4a6af7e0b 100644 --- a/src/test/ui/generic-associated-types/issue-90014.stderr +++ b/src/test/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:14:20 + --> $DIR/issue-90014.rs:13:20 | LL | type Fut<'a> where Self: 'a; | ------------ definition of `Fut` from trait @@ -8,7 +8,7 @@ LL | type Fut<'a> = impl Future; | ^^^^^^^^^^^^^^^^^^^^^^^^- help: try copying this clause from the trait: `where Self: 'a` | note: type must outlive the lifetime `'a` as defined here - --> $DIR/issue-90014.rs:14:14 + --> $DIR/issue-90014.rs:13:14 | LL | type Fut<'a> = impl Future; | ^^ diff --git a/src/test/ui/generic-associated-types/issue-90729.rs b/src/test/ui/generic-associated-types/issue-90729.rs index 98295cce8d587..bcec2e32121d1 100644 --- a/src/test/ui/generic-associated-types/issue-90729.rs +++ b/src/test/ui/generic-associated-types/issue-90729.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - use std::marker::PhantomData; pub trait Type { diff --git a/src/test/ui/generic-associated-types/issue-91139.migrate.stderr b/src/test/ui/generic-associated-types/issue-91139.migrate.stderr index b424d9a2fdb0c..690160577cd9c 100644 --- a/src/test/ui/generic-associated-types/issue-91139.migrate.stderr +++ b/src/test/ui/generic-associated-types/issue-91139.migrate.stderr @@ -1,13 +1,8 @@ -error[E0311]: the parameter type `T` may not live long enough - --> $DIR/issue-91139.rs:27:12 +error: expected identifier, found `<<` + --> $DIR/issue-91139.rs:1:1 | -LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds - | -help: consider adding an explicit lifetime bound... - | -LL | fn foo() { - | ++++ +LL | <<<<<<< HEAD + | ^^ expected identifier error: aborting due to previous error diff --git a/src/test/ui/generic-associated-types/issue-91139.rs b/src/test/ui/generic-associated-types/issue-91139.rs index 40eef11f058e1..5fc6071c93966 100644 --- a/src/test/ui/generic-associated-types/issue-91139.rs +++ b/src/test/ui/generic-associated-types/issue-91139.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Foo { type Type<'a> where diff --git a/src/test/ui/generic-associated-types/issue-91139.stderr b/src/test/ui/generic-associated-types/issue-91139.stderr index b789b3a42f330..8bbe98fa1e501 100644 --- a/src/test/ui/generic-associated-types/issue-91139.stderr +++ b/src/test/ui/generic-associated-types/issue-91139.stderr @@ -1,41 +1,41 @@ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:12 + --> $DIR/issue-91139.rs:14:12 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:12 + --> $DIR/issue-91139.rs:14:12 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:12 + --> $DIR/issue-91139.rs:14:12 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:12 + --> $DIR/issue-91139.rs:14:12 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:58 + --> $DIR/issue-91139.rs:14:58 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:58 + --> $DIR/issue-91139.rs:14:58 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^ error[E0310]: the parameter type `T` may not live long enough - --> $DIR/issue-91139.rs:16:58 + --> $DIR/issue-91139.rs:14:58 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds @@ -46,13 +46,13 @@ LL | fn foo() { | +++++++++ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:58 + --> $DIR/issue-91139.rs:14:58 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^ error: `T` does not live long enough - --> $DIR/issue-91139.rs:16:58 + --> $DIR/issue-91139.rs:14:58 | LL | let _: for<'a> fn(<() as Foo>::Type<'a>, &'a T) = |_, _| (); | ^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/issue-91883.rs b/src/test/ui/generic-associated-types/issue-91883.rs index 3d4585a44df80..e870e08a3a2b0 100644 --- a/src/test/ui/generic-associated-types/issue-91883.rs +++ b/src/test/ui/generic-associated-types/issue-91883.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - use std::fmt::Debug; use std::marker::PhantomData; diff --git a/src/test/ui/generic-associated-types/issue-91883.stderr b/src/test/ui/generic-associated-types/issue-91883.stderr index baf4889cc1dd5..1cfc2aaf1613f 100644 --- a/src/test/ui/generic-associated-types/issue-91883.stderr +++ b/src/test/ui/generic-associated-types/issue-91883.stderr @@ -1,5 +1,5 @@ error[E0478]: lifetime bound not satisfied - --> $DIR/issue-91883.rs:32:24 + --> $DIR/issue-91883.rs:30:24 | LL | type Cursor<'tx>: Cursor<'tx> | ----------------------------- definition of `Cursor` from trait @@ -8,12 +8,12 @@ LL | type Cursor<'tx> = CursorImpl<'tx>; | ^^^^^^^^^^^^^^^- help: try copying these clauses from the trait: `where 'db: 'tx, Self: 'tx` | note: lifetime parameter instantiated with the lifetime `'db` as defined here - --> $DIR/issue-91883.rs:31:6 + --> $DIR/issue-91883.rs:29:6 | LL | impl<'db> Transaction<'db> for TransactionImpl<'db> { | ^^^ note: but lifetime parameter must outlive the lifetime `'tx` as defined here - --> $DIR/issue-91883.rs:32:17 + --> $DIR/issue-91883.rs:30:17 | LL | type Cursor<'tx> = CursorImpl<'tx>; | ^^^ diff --git a/src/test/ui/generic-associated-types/issue-92033.rs b/src/test/ui/generic-associated-types/issue-92033.rs index 1d5f7d5c0099e..d111580b860aa 100644 --- a/src/test/ui/generic-associated-types/issue-92033.rs +++ b/src/test/ui/generic-associated-types/issue-92033.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - struct Texture; trait Surface { diff --git a/src/test/ui/generic-associated-types/issue-92033.stderr b/src/test/ui/generic-associated-types/issue-92033.stderr index 6dd901027d7ba..cd7eed25421e8 100644 --- a/src/test/ui/generic-associated-types/issue-92033.stderr +++ b/src/test/ui/generic-associated-types/issue-92033.stderr @@ -1,5 +1,5 @@ error[E0477]: the type `&'s Texture` does not fulfill the required lifetime - --> $DIR/issue-92033.rs:22:28 + --> $DIR/issue-92033.rs:20:28 | LL | type TextureIter<'a>: Iterator | -------------------------------------------------- definition of `TextureIter` from trait @@ -8,7 +8,7 @@ LL | type TextureIter<'a> = std::option::IntoIter<&'a Texture>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try copying this clause from the trait: `where Self: 'a` | note: type must outlive the lifetime `'a` as defined here - --> $DIR/issue-92033.rs:22:22 + --> $DIR/issue-92033.rs:20:22 | LL | type TextureIter<'a> = std::option::IntoIter<&'a Texture>; | ^^ diff --git a/src/test/ui/generic-associated-types/issue-92096.migrate.stderr b/src/test/ui/generic-associated-types/issue-92096.migrate.stderr index c74161cd3e059..ce1fd6dd9831f 100644 --- a/src/test/ui/generic-associated-types/issue-92096.migrate.stderr +++ b/src/test/ui/generic-associated-types/issue-92096.migrate.stderr @@ -1,5 +1,5 @@ error[E0311]: the parameter type `C` may not live long enough - --> $DIR/issue-92096.rs:20:33 + --> $DIR/issue-92096.rs:19:33 | LL | fn call_connect(c: &'_ C) -> impl '_ + Future + Send | ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds @@ -10,7 +10,7 @@ LL | C: Client + Send + Sync + 'a, | ++++ error[E0311]: the parameter type `C` may not live long enough - --> $DIR/issue-92096.rs:20:33 + --> $DIR/issue-92096.rs:19:33 | LL | fn call_connect(c: &'_ C) -> impl '_ + Future + Send | ^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `C` will meet its required lifetime bounds diff --git a/src/test/ui/generic-associated-types/issue-92096.rs b/src/test/ui/generic-associated-types/issue-92096.rs index 377b8164ad506..e285af6660ec3 100644 --- a/src/test/ui/generic-associated-types/issue-92096.rs +++ b/src/test/ui/generic-associated-types/issue-92096.rs @@ -1,7 +1,5 @@ // edition:2018 -#![feature(generic_associated_types)] - use std::future::Future; trait Client { diff --git a/src/test/ui/generic-associated-types/issue-92096.stderr b/src/test/ui/generic-associated-types/issue-92096.stderr index ca61a0f435e93..91a06d5acde1a 100644 --- a/src/test/ui/generic-associated-types/issue-92096.stderr +++ b/src/test/ui/generic-associated-types/issue-92096.stderr @@ -1,5 +1,5 @@ error: `C` does not live long enough - --> $DIR/issue-92096.rs:19:5 + --> $DIR/issue-92096.rs:17:5 | LL | async move { c.connect().await } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/issue-92280.rs b/src/test/ui/generic-associated-types/issue-92280.rs index 81d000f1076ca..9284beea33e5d 100644 --- a/src/test/ui/generic-associated-types/issue-92280.rs +++ b/src/test/ui/generic-associated-types/issue-92280.rs @@ -1,6 +1,5 @@ // check-pass -#![feature(generic_associated_types)] #![allow(non_camel_case_types)] trait HasAssoc { diff --git a/src/test/ui/generic-associated-types/issue-92954.rs b/src/test/ui/generic-associated-types/issue-92954.rs index 95c090ff4e906..22ce8f9fe3b80 100644 --- a/src/test/ui/generic-associated-types/issue-92954.rs +++ b/src/test/ui/generic-associated-types/issue-92954.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - pub trait Foo { type Assoc<'c>; fn function() -> for<'x> fn(Self::Assoc<'x>); diff --git a/src/test/ui/generic-associated-types/issue-93141.rs b/src/test/ui/generic-associated-types/issue-93141.rs index 39ca77d13db99..48c78b9c06760 100644 --- a/src/test/ui/generic-associated-types/issue-93141.rs +++ b/src/test/ui/generic-associated-types/issue-93141.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - pub trait Fooey: Sized { type Context<'c> where Self: 'c; } diff --git a/src/test/ui/generic-associated-types/issue-93262.rs b/src/test/ui/generic-associated-types/issue-93262.rs index adc6aa8fa1afa..a7bcd111dfff0 100644 --- a/src/test/ui/generic-associated-types/issue-93262.rs +++ b/src/test/ui/generic-associated-types/issue-93262.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - pub trait Trait { type Assoc<'a> where Self: 'a; } diff --git a/src/test/ui/generic-associated-types/issue-93340.rs b/src/test/ui/generic-associated-types/issue-93340.rs index d065bde88c414..4662fda537b5f 100644 --- a/src/test/ui/generic-associated-types/issue-93340.rs +++ b/src/test/ui/generic-associated-types/issue-93340.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - pub trait Scalar: 'static { type RefType<'a>: ScalarRef<'a>; } diff --git a/src/test/ui/generic-associated-types/issue-93341.rs b/src/test/ui/generic-associated-types/issue-93341.rs index e96a768ecda8f..737b2bbdb245a 100644 --- a/src/test/ui/generic-associated-types/issue-93341.rs +++ b/src/test/ui/generic-associated-types/issue-93341.rs @@ -1,6 +1,5 @@ // check-pass -#![feature(generic_associated_types)] use std::marker::PhantomData; pub struct Id<'id>(PhantomData &'id ()>); diff --git a/src/test/ui/generic-associated-types/issue-93342.rs b/src/test/ui/generic-associated-types/issue-93342.rs index d8d7adac95161..d4422d5d1d723 100644 --- a/src/test/ui/generic-associated-types/issue-93342.rs +++ b/src/test/ui/generic-associated-types/issue-93342.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - use std::marker::PhantomData; pub trait Scalar: 'static { diff --git a/src/test/ui/generic-associated-types/issue-93874.rs b/src/test/ui/generic-associated-types/issue-93874.rs index f403d75167d8a..30956655ad409 100644 --- a/src/test/ui/generic-associated-types/issue-93874.rs +++ b/src/test/ui/generic-associated-types/issue-93874.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - pub trait Build { type Output; fn build(self, input: O) -> Self::Output; diff --git a/src/test/ui/generic-associated-types/issue-95305.rs b/src/test/ui/generic-associated-types/issue-95305.rs index e2f1710fa281c..6c3ec20e7a052 100644 --- a/src/test/ui/generic-associated-types/issue-95305.rs +++ b/src/test/ui/generic-associated-types/issue-95305.rs @@ -2,7 +2,6 @@ // Forbid it for now but proper support might be added // at some point in the future. -#![feature(generic_associated_types)] #![feature(anonymous_lifetime_in_impl_trait)] trait Foo { type Item<'a>; diff --git a/src/test/ui/generic-associated-types/issue-95305.stderr b/src/test/ui/generic-associated-types/issue-95305.stderr index d8557525f54ed..eb15cbc620acb 100644 --- a/src/test/ui/generic-associated-types/issue-95305.stderr +++ b/src/test/ui/generic-associated-types/issue-95305.stderr @@ -1,5 +1,5 @@ error[E0637]: `'_` cannot be used here - --> $DIR/issue-95305.rs:11:26 + --> $DIR/issue-95305.rs:10:26 | LL | fn foo(x: &impl Foo = u32>) { } | ^^ `'_` is a reserved lifetime name diff --git a/src/test/ui/generic-associated-types/iterable.rs b/src/test/ui/generic-associated-types/iterable.rs index af0049891b696..8ad351bd343cc 100644 --- a/src/test/ui/generic-associated-types/iterable.rs +++ b/src/test/ui/generic-associated-types/iterable.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // run-pass trait Iterable { diff --git a/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.rs b/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.rs index 655abd18da1cb..36974b3df5e64 100644 --- a/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.rs +++ b/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.rs @@ -1,8 +1,6 @@ // Test that the predicate printed in an unresolved method error prints the // generics for a generic associated type. -#![feature(generic_associated_types)] - trait X { type Y; } diff --git a/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr b/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr index d9dc77ac8eb40..baef38f6b8046 100644 --- a/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr +++ b/src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr @@ -1,5 +1,5 @@ error[E0599]: the method `f` exists for struct `S`, but its trait bounds were not satisfied - --> $DIR/method-unsatified-assoc-type-predicate.rs:30:7 + --> $DIR/method-unsatified-assoc-type-predicate.rs:28:7 | LL | struct S; | -------- @@ -12,7 +12,7 @@ LL | a.f(); | ^ method cannot be called on `S` due to unsatisfied trait bounds | note: trait bound `::Y = i32` was not satisfied - --> $DIR/method-unsatified-assoc-type-predicate.rs:14:11 + --> $DIR/method-unsatified-assoc-type-predicate.rs:12:11 | LL | impl = i32>> M for T {} | ^^^^^^^^^^^^ - - diff --git a/src/test/ui/generic-associated-types/missing-where-clause-on-trait.rs b/src/test/ui/generic-associated-types/missing-where-clause-on-trait.rs index 8171dc0ae28d6..de9cad308014d 100644 --- a/src/test/ui/generic-associated-types/missing-where-clause-on-trait.rs +++ b/src/test/ui/generic-associated-types/missing-where-clause-on-trait.rs @@ -1,7 +1,5 @@ // check-fail -#![feature(generic_associated_types)] - trait Foo { type Assoc<'a, 'b>; } diff --git a/src/test/ui/generic-associated-types/missing-where-clause-on-trait.stderr b/src/test/ui/generic-associated-types/missing-where-clause-on-trait.stderr index edd1f9367d129..ffdba6676bf8d 100644 --- a/src/test/ui/generic-associated-types/missing-where-clause-on-trait.stderr +++ b/src/test/ui/generic-associated-types/missing-where-clause-on-trait.stderr @@ -1,5 +1,5 @@ error[E0276]: impl has stricter requirements than trait - --> $DIR/missing-where-clause-on-trait.rs:9:39 + --> $DIR/missing-where-clause-on-trait.rs:7:39 | LL | type Assoc<'a, 'b>; | ------------------ definition of `Assoc` from trait diff --git a/src/test/ui/generic-associated-types/missing_lifetime_args.rs b/src/test/ui/generic-associated-types/missing_lifetime_args.rs index cd918157f7c8d..78def80925ad0 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_args.rs +++ b/src/test/ui/generic-associated-types/missing_lifetime_args.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a, 'b>; } diff --git a/src/test/ui/generic-associated-types/missing_lifetime_args.stderr b/src/test/ui/generic-associated-types/missing_lifetime_args.stderr index 7cf3f4b737e0e..0ad1f1f8c4d32 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_args.stderr +++ b/src/test/ui/generic-associated-types/missing_lifetime_args.stderr @@ -1,11 +1,11 @@ error[E0107]: missing generics for associated type `X::Y` - --> $DIR/missing_lifetime_args.rs:13:32 + --> $DIR/missing_lifetime_args.rs:11:32 | LL | fn foo<'c, 'd>(_arg: Box>) {} | ^ expected 2 lifetime arguments | note: associated type defined here, with 2 lifetime parameters: `'a`, `'b` - --> $DIR/missing_lifetime_args.rs:4:10 + --> $DIR/missing_lifetime_args.rs:2:10 | LL | type Y<'a, 'b>; | ^ -- -- @@ -15,7 +15,7 @@ LL | fn foo<'c, 'd>(_arg: Box = (&'c u32, &'d u32)>>) {} | ~~~~~~~~~ error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied - --> $DIR/missing_lifetime_args.rs:16:26 + --> $DIR/missing_lifetime_args.rs:14:26 | LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {} | ^^^ -- -- supplied 2 lifetime arguments @@ -23,7 +23,7 @@ LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {} | expected 3 lifetime arguments | note: struct defined here, with 3 lifetime parameters: `'a`, `'b`, `'c` - --> $DIR/missing_lifetime_args.rs:7:8 + --> $DIR/missing_lifetime_args.rs:5:8 | LL | struct Foo<'a, 'b, 'c> { | ^^^ -- -- -- @@ -33,7 +33,7 @@ LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {} | ++++ error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied - --> $DIR/missing_lifetime_args.rs:19:16 + --> $DIR/missing_lifetime_args.rs:17:16 | LL | fn f<'a>(_arg: Foo<'a>) {} | ^^^ -- supplied 1 lifetime argument @@ -41,7 +41,7 @@ LL | fn f<'a>(_arg: Foo<'a>) {} | expected 3 lifetime arguments | note: struct defined here, with 3 lifetime parameters: `'a`, `'b`, `'c` - --> $DIR/missing_lifetime_args.rs:7:8 + --> $DIR/missing_lifetime_args.rs:5:8 | LL | struct Foo<'a, 'b, 'c> { | ^^^ -- -- -- diff --git a/src/test/ui/generic-associated-types/missing_lifetime_const.rs b/src/test/ui/generic-associated-types/missing_lifetime_const.rs index e3e78dd96f62b..8b174b9e971e0 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_const.rs +++ b/src/test/ui/generic-associated-types/missing_lifetime_const.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Foo { type Assoc<'a, const N: usize>; } diff --git a/src/test/ui/generic-associated-types/missing_lifetime_const.stderr b/src/test/ui/generic-associated-types/missing_lifetime_const.stderr index 5d50637bd0131..62d2e9f49dde1 100644 --- a/src/test/ui/generic-associated-types/missing_lifetime_const.stderr +++ b/src/test/ui/generic-associated-types/missing_lifetime_const.stderr @@ -1,11 +1,11 @@ error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied - --> $DIR/missing_lifetime_const.rs:8:24 + --> $DIR/missing_lifetime_const.rs:6:24 | LL | let _: ::Assoc<3>; | ^^^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/missing_lifetime_const.rs:4:10 + --> $DIR/missing_lifetime_const.rs:2:10 | LL | type Assoc<'a, const N: usize>; | ^^^^^ -- diff --git a/src/test/ui/generic-associated-types/parameter_number_and_kind.rs b/src/test/ui/generic-associated-types/parameter_number_and_kind.rs index 0508cc2daeae0..8428e7763fb46 100644 --- a/src/test/ui/generic-associated-types/parameter_number_and_kind.rs +++ b/src/test/ui/generic-associated-types/parameter_number_and_kind.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] trait Foo { diff --git a/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr b/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr index 53d76fd220122..c20b9669e8140 100644 --- a/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr +++ b/src/test/ui/generic-associated-types/parameter_number_and_kind.stderr @@ -1,5 +1,5 @@ error[E0107]: this associated type takes 1 lifetime argument but 2 lifetime arguments were supplied - --> $DIR/parameter_number_and_kind.rs:12:24 + --> $DIR/parameter_number_and_kind.rs:11:24 | LL | type FErr1 = Self::E<'static, 'static>; | ^ ------- help: remove this lifetime argument @@ -7,19 +7,19 @@ LL | type FErr1 = Self::E<'static, 'static>; | expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/parameter_number_and_kind.rs:9:10 + --> $DIR/parameter_number_and_kind.rs:8:10 | LL | type E<'a, T>; | ^ -- error[E0107]: this associated type takes 1 generic argument but 0 generic arguments were supplied - --> $DIR/parameter_number_and_kind.rs:12:24 + --> $DIR/parameter_number_and_kind.rs:11:24 | LL | type FErr1 = Self::E<'static, 'static>; | ^ expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/parameter_number_and_kind.rs:9:10 + --> $DIR/parameter_number_and_kind.rs:8:10 | LL | type E<'a, T>; | ^ - @@ -29,7 +29,7 @@ LL | type FErr1 = Self::E<'static, 'static, T>; | +++ error[E0107]: this associated type takes 1 generic argument but 2 generic arguments were supplied - --> $DIR/parameter_number_and_kind.rs:15:27 + --> $DIR/parameter_number_and_kind.rs:14:27 | LL | type FErr2 = Self::E<'static, T, u32>; | ^ --- help: remove this generic argument @@ -37,7 +37,7 @@ LL | type FErr2 = Self::E<'static, T, u32>; | expected 1 generic argument | note: associated type defined here, with 1 generic parameter: `T` - --> $DIR/parameter_number_and_kind.rs:9:10 + --> $DIR/parameter_number_and_kind.rs:8:10 | LL | type E<'a, T>; | ^ - diff --git a/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.rs b/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.rs index 6ca0bc6ddbc9f..c1381025ac2a8 100644 --- a/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.rs +++ b/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(associated_type_defaults)] // FIXME(#44265) add tests for type-generic and const-genertic associated types. diff --git a/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.stderr b/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.stderr index 1458bf0c4a493..fdd6d305ab27e 100644 --- a/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.stderr +++ b/src/test/ui/generic-associated-types/parameter_number_and_kind_impl.stderr @@ -1,5 +1,5 @@ error[E0195]: lifetime parameters or bounds on type `A` do not match the trait declaration - --> $DIR/parameter_number_and_kind_impl.rs:15:11 + --> $DIR/parameter_number_and_kind_impl.rs:14:11 | LL | type A<'a>; | ---- lifetimes in impl do not match this type in trait @@ -8,7 +8,7 @@ LL | type A = u32; | ^ lifetimes do not match type in trait error[E0049]: type `B` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/parameter_number_and_kind_impl.rs:17:12 + --> $DIR/parameter_number_and_kind_impl.rs:16:12 | LL | type B<'a, 'b>; | -- -- @@ -21,7 +21,7 @@ LL | type B<'a, T> = Vec; | found 1 type parameter error[E0195]: lifetime parameters or bounds on type `C` do not match the trait declaration - --> $DIR/parameter_number_and_kind_impl.rs:19:11 + --> $DIR/parameter_number_and_kind_impl.rs:18:11 | LL | type C; | - lifetimes in impl do not match this type in trait @@ -30,7 +30,7 @@ LL | type C<'a> = u32; | ^^^^ lifetimes do not match type in trait error[E0049]: type `A` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/parameter_number_and_kind_impl.rs:26:12 + --> $DIR/parameter_number_and_kind_impl.rs:25:12 | LL | type A<'a>; | -- expected 0 type parameters @@ -39,7 +39,7 @@ LL | type A = u32; | ^ found 1 type parameter error[E0195]: lifetime parameters or bounds on type `B` do not match the trait declaration - --> $DIR/parameter_number_and_kind_impl.rs:28:11 + --> $DIR/parameter_number_and_kind_impl.rs:27:11 | LL | type B<'a, 'b>; | -------- lifetimes in impl do not match this type in trait @@ -48,7 +48,7 @@ LL | type B<'a> = u32; | ^^^^ lifetimes do not match type in trait error[E0049]: type `C` has 1 type parameter but its trait declaration has 0 type parameters - --> $DIR/parameter_number_and_kind_impl.rs:30:12 + --> $DIR/parameter_number_and_kind_impl.rs:29:12 | LL | type C; | - expected 0 type parameters diff --git a/src/test/ui/generic-associated-types/parse/in-trait-impl.rs b/src/test/ui/generic-associated-types/parse/in-trait-impl.rs index 7f4775ddbb078..767098835c484 100644 --- a/src/test/ui/generic-associated-types/parse/in-trait-impl.rs +++ b/src/test/ui/generic-associated-types/parse/in-trait-impl.rs @@ -1,8 +1,6 @@ // check-pass // compile-flags: -Z parse-only -#![feature(generic_associated_types)] - impl Baz for T where T: Foo { type Quux<'a> = ::Bar<'a, 'static>; } diff --git a/src/test/ui/generic-associated-types/parse/in-trait.rs b/src/test/ui/generic-associated-types/parse/in-trait.rs index d438795eb1d97..6628aac374304 100644 --- a/src/test/ui/generic-associated-types/parse/in-trait.rs +++ b/src/test/ui/generic-associated-types/parse/in-trait.rs @@ -1,8 +1,6 @@ // check-pass // compile-flags: -Z parse-only -#![feature(generic_associated_types)] - use std::ops::Deref; use std::fmt::Debug; diff --git a/src/test/ui/generic-associated-types/parse/trait-path-expected-token.rs b/src/test/ui/generic-associated-types/parse/trait-path-expected-token.rs index be85598b7bfaf..cbb05189201da 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-expected-token.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-expected-token.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; } diff --git a/src/test/ui/generic-associated-types/parse/trait-path-expected-token.stderr b/src/test/ui/generic-associated-types/parse/trait-path-expected-token.stderr index 2b265e921616d..53d5f9de65754 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-expected-token.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-expected-token.stderr @@ -1,5 +1,5 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, `<`, or `>`, found `=` - --> $DIR/trait-path-expected-token.rs:7:33 + --> $DIR/trait-path-expected-token.rs:5:33 | LL | fn f1<'a>(arg : Box>) {} | - ^ expected one of 7 possible tokens diff --git a/src/test/ui/generic-associated-types/parse/trait-path-expressions.rs b/src/test/ui/generic-associated-types/parse/trait-path-expressions.rs index d57c2813b38a9..9183ec4976b02 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-expressions.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-expressions.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - mod error1 { trait X { type Y<'a>; diff --git a/src/test/ui/generic-associated-types/parse/trait-path-expressions.stderr b/src/test/ui/generic-associated-types/parse/trait-path-expressions.stderr index 272afc10b17b5..cf2b1763fc9da 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-expressions.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-expressions.stderr @@ -1,5 +1,5 @@ error: expected expression, found `)` - --> $DIR/trait-path-expressions.rs:8:39 + --> $DIR/trait-path-expressions.rs:6:39 | LL | fn f1<'a>(arg : Box>) {} | - ^ expected expression @@ -7,7 +7,7 @@ LL | fn f1<'a>(arg : Box>) {} | while parsing a const generic argument starting here error: expected one of `,`, `:`, or `>`, found `=` - --> $DIR/trait-path-expressions.rs:18:36 + --> $DIR/trait-path-expressions.rs:16:36 | LL | fn f2<'a>(arg : Box>) {} | - ^ expected one of `,`, `:`, or `>` diff --git a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs index 7914864807ce3..ecabf8943ea3c 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; } diff --git a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr index 3ace774a041c7..10ceccedcac1b 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr @@ -1,5 +1,5 @@ error: expected one of `>`, a const expression, lifetime, or type, found `:` - --> $DIR/trait-path-missing-gen_arg.rs:8:30 + --> $DIR/trait-path-missing-gen_arg.rs:6:30 | LL | fn f1<'a>(arg : Box>) {} | ^ expected one of `>`, a const expression, lifetime, or type @@ -10,13 +10,13 @@ LL | fn f1<'a>(arg : Box<{ dyn X< : 32 } >>) {} | + + error: expected parameter name, found `>` - --> $DIR/trait-path-missing-gen_arg.rs:8:36 + --> $DIR/trait-path-missing-gen_arg.rs:6:36 | LL | fn f1<'a>(arg : Box>) {} | ^ expected parameter name error: expected one of `!`, `)`, `+`, `,`, or `::`, found `>` - --> $DIR/trait-path-missing-gen_arg.rs:8:36 + --> $DIR/trait-path-missing-gen_arg.rs:6:36 | LL | fn f1<'a>(arg : Box>) {} | ^ @@ -25,7 +25,7 @@ LL | fn f1<'a>(arg : Box>) {} | help: missing `,` error: expected one of `>`, a const expression, lifetime, or type, found `=` - --> $DIR/trait-path-missing-gen_arg.rs:16:30 + --> $DIR/trait-path-missing-gen_arg.rs:14:30 | LL | fn f1<'a>(arg : Box>) {} | - ^ expected one of `>`, a const expression, lifetime, or type @@ -33,7 +33,7 @@ LL | fn f1<'a>(arg : Box>) {} | maybe try to close unmatched angle bracket error[E0747]: constant provided when a type was expected - --> $DIR/trait-path-missing-gen_arg.rs:8:23 + --> $DIR/trait-path-missing-gen_arg.rs:6:23 | LL | fn f1<'a>(arg : Box>) {} | ^^^^^^^^^^^ diff --git a/src/test/ui/generic-associated-types/parse/trait-path-segments.rs b/src/test/ui/generic-associated-types/parse/trait-path-segments.rs index e943f075f5342..458e203eb3ce4 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-segments.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-segments.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - const _: () = { trait X { type Y<'a>; diff --git a/src/test/ui/generic-associated-types/parse/trait-path-segments.stderr b/src/test/ui/generic-associated-types/parse/trait-path-segments.stderr index 7394393c05e25..8bc737d675204 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-segments.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-segments.stderr @@ -1,5 +1,5 @@ error: expected one of `!`, `(`, `+`, `,`, `::`, `:`, `<`, or `>`, found `=` - --> $DIR/trait-path-segments.rs:8:36 + --> $DIR/trait-path-segments.rs:6:36 | LL | fn f1<'a>(arg : Box>) {} | - ^ expected one of 8 possible tokens @@ -12,7 +12,7 @@ LL | fn f1<'a>(arg : Box = u32>>) {} | + error: expected one of `,`, `::`, `:`, or `>`, found `=` - --> $DIR/trait-path-segments.rs:19:35 + --> $DIR/trait-path-segments.rs:17:35 | LL | impl::Y<'a> = &'a u32>> Z for T {} | - ^ expected one of `,`, `::`, `:`, or `>` @@ -25,7 +25,7 @@ LL | impl::Y<'a>> = &'a u32>> Z for T {} | + error: expected one of `!`, `+`, `,`, `::`, `:`, or `>`, found `=` - --> $DIR/trait-path-segments.rs:30:25 + --> $DIR/trait-path-segments.rs:28:25 | LL | impl = &'a u32>> Z for T {} | - ^ expected one of `!`, `+`, `,`, `::`, `:`, or `>` diff --git a/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs b/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs index 4846af96d32ac..1622b92aa0cc2 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; } diff --git a/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr b/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr index 46ddcb6351877..e00a414efb9bf 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-type-error-once-implemented.stderr @@ -1,11 +1,11 @@ error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied - --> $DIR/trait-path-type-error-once-implemented.rs:8:29 + --> $DIR/trait-path-type-error-once-implemented.rs:6:29 | LL | fn f2<'a>(arg : Box = &'a ()>>) {} | ^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/trait-path-type-error-once-implemented.rs:4:10 + --> $DIR/trait-path-type-error-once-implemented.rs:2:10 | LL | type Y<'a>; | ^ -- @@ -15,7 +15,7 @@ LL | fn f2<'a>(arg : Box = &'a ()>>) {} | +++ error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied - --> $DIR/trait-path-type-error-once-implemented.rs:8:29 + --> $DIR/trait-path-type-error-once-implemented.rs:6:29 | LL | fn f2<'a>(arg : Box = &'a ()>>) {} | ^--- help: remove these generics @@ -23,7 +23,7 @@ LL | fn f2<'a>(arg : Box = &'a ()>>) {} | expected 0 generic arguments | note: associated type defined here, with 0 generic parameters - --> $DIR/trait-path-type-error-once-implemented.rs:4:10 + --> $DIR/trait-path-type-error-once-implemented.rs:2:10 | LL | type Y<'a>; | ^ diff --git a/src/test/ui/generic-associated-types/parse/trait-path-types.rs b/src/test/ui/generic-associated-types/parse/trait-path-types.rs index 856253cc7fab6..74a00342ff4b5 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-types.rs +++ b/src/test/ui/generic-associated-types/parse/trait-path-types.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait X { type Y<'a>; } diff --git a/src/test/ui/generic-associated-types/parse/trait-path-types.stderr b/src/test/ui/generic-associated-types/parse/trait-path-types.stderr index fe9ed579e34af..8f7a73c95b65f 100644 --- a/src/test/ui/generic-associated-types/parse/trait-path-types.stderr +++ b/src/test/ui/generic-associated-types/parse/trait-path-types.stderr @@ -1,5 +1,5 @@ error: expected one of `,`, `:`, or `>`, found `=` - --> $DIR/trait-path-types.rs:8:37 + --> $DIR/trait-path-types.rs:6:37 | LL | fn f<'a>(arg : Box>) {} | - ^ expected one of `,`, `:`, or `>` @@ -12,7 +12,7 @@ LL | fn f<'a>(arg : Box = u32>>) {} | + error: expected one of `,`, `:`, or `>`, found `=` - --> $DIR/trait-path-types.rs:13:37 + --> $DIR/trait-path-types.rs:11:37 | LL | fn f1<'a>(arg : Box) = &'a ()>>) {} | - ^ expected one of `,`, `:`, or `>` @@ -25,7 +25,7 @@ LL | fn f1<'a>(arg : Box)> = &'a ()>>) {} | + error: expected one of `,`, `:`, or `>`, found `=` - --> $DIR/trait-path-types.rs:18:33 + --> $DIR/trait-path-types.rs:16:33 | LL | fn f1<'a>(arg : Box>) {} | -- ^ expected one of `,`, `:`, or `>` diff --git a/src/test/ui/generic-associated-types/pointer_family.rs b/src/test/ui/generic-associated-types/pointer_family.rs index da86e7f274820..80827cd567b4b 100644 --- a/src/test/ui/generic-associated-types/pointer_family.rs +++ b/src/test/ui/generic-associated-types/pointer_family.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // check-pass use std::rc::Rc; diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs index 794d677c8b657..58d57df63c1bd 100644 --- a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs +++ b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.rs @@ -1,8 +1,6 @@ // Like `projection-bound-cycle.rs` but this avoids using // `feature(trivial_bounds)`. -#![feature(generic_associated_types)] - trait Print { fn print(); } diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr index 2b57c439fe9a0..27c1a82994a53 100644 --- a/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr +++ b/src/test/ui/generic-associated-types/projection-bound-cycle-generic.stderr @@ -1,11 +1,11 @@ error[E0275]: overflow evaluating the requirement `::Item: Sized` - --> $DIR/projection-bound-cycle-generic.rs:44:18 + --> $DIR/projection-bound-cycle-generic.rs:42:18 | LL | type Assoc = OnlySized<::Item>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `OnlySized` - --> $DIR/projection-bound-cycle-generic.rs:28:18 + --> $DIR/projection-bound-cycle-generic.rs:26:18 | LL | struct OnlySized where T: Sized { f: T } | ^ required by this bound in `OnlySized` diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle.rs b/src/test/ui/generic-associated-types/projection-bound-cycle.rs index 6564a3608ec0e..4cad1f61319ef 100644 --- a/src/test/ui/generic-associated-types/projection-bound-cycle.rs +++ b/src/test/ui/generic-associated-types/projection-bound-cycle.rs @@ -2,7 +2,6 @@ // Make sure that we make sure that we don't allow arbitrary bounds to be // proven when a bound and a where clause of an associated type are the same. -#![feature(generic_associated_types)] #![feature(trivial_bounds)] trait Print { diff --git a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr index d9d0bf4274bd7..a46518c80da76 100644 --- a/src/test/ui/generic-associated-types/projection-bound-cycle.stderr +++ b/src/test/ui/generic-associated-types/projection-bound-cycle.stderr @@ -1,11 +1,11 @@ error[E0275]: overflow evaluating the requirement `::Item: Sized` - --> $DIR/projection-bound-cycle.rs:46:18 + --> $DIR/projection-bound-cycle.rs:45:18 | LL | type Assoc = OnlySized<::Item>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: required by a bound in `OnlySized` - --> $DIR/projection-bound-cycle.rs:30:18 + --> $DIR/projection-bound-cycle.rs:29:18 | LL | struct OnlySized where T: Sized { f: T } | ^ required by this bound in `OnlySized` diff --git a/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.rs b/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.rs index a40c0c2c4c74e..8e4d5ca5e2679 100644 --- a/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.rs +++ b/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - pub trait X { type Y<'a> where Self: 'a; fn m(&self) -> Self::Y<'_>; diff --git a/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr b/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr index 4620aa34e84d9..753ead48bf540 100644 --- a/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr +++ b/src/test/ui/generic-associated-types/projection-type-lifetime-mismatch.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/projection-type-lifetime-mismatch.rs:17:5 + --> $DIR/projection-type-lifetime-mismatch.rs:15:5 | LL | fn f(x: &impl for<'a> X = &'a ()>) -> &'static () { | - let's call the lifetime of this reference `'1` @@ -7,7 +7,7 @@ LL | x.m() | ^^^^^ returning this value requires that `'1` must outlive `'static` error: lifetime may not live long enough - --> $DIR/projection-type-lifetime-mismatch.rs:22:5 + --> $DIR/projection-type-lifetime-mismatch.rs:20:5 | LL | fn g X = &'a ()>>(x: &T) -> &'static () { | - let's call the lifetime of this reference `'1` @@ -15,7 +15,7 @@ LL | x.m() | ^^^^^ returning this value requires that `'1` must outlive `'static` error: lifetime may not live long enough - --> $DIR/projection-type-lifetime-mismatch.rs:27:5 + --> $DIR/projection-type-lifetime-mismatch.rs:25:5 | LL | fn h(x: &()) -> &'static () { | - let's call the lifetime of this reference `'1` diff --git a/src/test/ui/generic-associated-types/self-outlives-lint.rs b/src/test/ui/generic-associated-types/self-outlives-lint.rs index 9bb42d4ff1c1b..673891fc3d1b4 100644 --- a/src/test/ui/generic-associated-types/self-outlives-lint.rs +++ b/src/test/ui/generic-associated-types/self-outlives-lint.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - // check-fail use std::fmt::Debug; diff --git a/src/test/ui/generic-associated-types/self-outlives-lint.stderr b/src/test/ui/generic-associated-types/self-outlives-lint.stderr index a43b35bd79c95..58172bf06b512 100644 --- a/src/test/ui/generic-associated-types/self-outlives-lint.stderr +++ b/src/test/ui/generic-associated-types/self-outlives-lint.stderr @@ -1,5 +1,5 @@ error: missing required bound on `Item` - --> $DIR/self-outlives-lint.rs:9:5 + --> $DIR/self-outlives-lint.rs:7:5 | LL | type Item<'x>; | ^^^^^^^^^^^^^- @@ -10,7 +10,7 @@ LL | type Item<'x>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Out` - --> $DIR/self-outlives-lint.rs:25:5 + --> $DIR/self-outlives-lint.rs:23:5 | LL | type Out<'x>; | ^^^^^^^^^^^^- @@ -21,7 +21,7 @@ LL | type Out<'x>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Out` - --> $DIR/self-outlives-lint.rs:39:5 + --> $DIR/self-outlives-lint.rs:37:5 | LL | type Out<'x>; | ^^^^^^^^^^^^- @@ -32,7 +32,7 @@ LL | type Out<'x>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bounds on `Out` - --> $DIR/self-outlives-lint.rs:46:5 + --> $DIR/self-outlives-lint.rs:44:5 | LL | type Out<'x, 'y>; | ^^^^^^^^^^^^^^^^- @@ -43,7 +43,7 @@ LL | type Out<'x, 'y>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Out` - --> $DIR/self-outlives-lint.rs:61:5 + --> $DIR/self-outlives-lint.rs:59:5 | LL | type Out<'x, D>; | ^^^^^^^^^^^^^^^- @@ -54,7 +54,7 @@ LL | type Out<'x, D>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Out` - --> $DIR/self-outlives-lint.rs:77:5 + --> $DIR/self-outlives-lint.rs:75:5 | LL | type Out<'x, D>; | ^^^^^^^^^^^^^^^- @@ -65,7 +65,7 @@ LL | type Out<'x, D>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Out` - --> $DIR/self-outlives-lint.rs:92:5 + --> $DIR/self-outlives-lint.rs:90:5 | LL | type Out<'x, D>; | ^^^^^^^^^^^^^^^- @@ -76,7 +76,7 @@ LL | type Out<'x, D>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bounds on `Bar` - --> $DIR/self-outlives-lint.rs:114:5 + --> $DIR/self-outlives-lint.rs:112:5 | LL | type Bar<'b>; | ^^^^^^^^^^^^- @@ -87,7 +87,7 @@ LL | type Bar<'b>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Bar` - --> $DIR/self-outlives-lint.rs:122:5 + --> $DIR/self-outlives-lint.rs:120:5 | LL | type Bar<'b>; | ^^^^^^^^^^^^- @@ -98,7 +98,7 @@ LL | type Bar<'b>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Bar` - --> $DIR/self-outlives-lint.rs:129:5 + --> $DIR/self-outlives-lint.rs:127:5 | LL | type Bar<'b>; | ^^^^^^^^^^^^- @@ -109,7 +109,7 @@ LL | type Bar<'b>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Item` - --> $DIR/self-outlives-lint.rs:142:5 + --> $DIR/self-outlives-lint.rs:140:5 | LL | type Item<'a>; | ^^^^^^^^^^^^^- @@ -120,7 +120,7 @@ LL | type Item<'a>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Iterator` - --> $DIR/self-outlives-lint.rs:144:5 + --> $DIR/self-outlives-lint.rs:142:5 | LL | type Iterator<'a>: Iterator>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- @@ -131,7 +131,7 @@ LL | type Iterator<'a>: Iterator>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Item` - --> $DIR/self-outlives-lint.rs:150:5 + --> $DIR/self-outlives-lint.rs:148:5 | LL | type Item<'a>; | ^^^^^^^^^^^^^- @@ -142,7 +142,7 @@ LL | type Item<'a>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Bar` - --> $DIR/self-outlives-lint.rs:159:5 + --> $DIR/self-outlives-lint.rs:157:5 | LL | type Bar<'a, 'b>; | ^^^^^^^^^^^^^^^^- @@ -153,7 +153,7 @@ LL | type Bar<'a, 'b>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Fut` - --> $DIR/self-outlives-lint.rs:175:5 + --> $DIR/self-outlives-lint.rs:173:5 | LL | type Fut<'out>; | ^^^^^^^^^^^^^^- @@ -164,7 +164,7 @@ LL | type Fut<'out>; = note: we are soliciting feedback, see issue #87479 for more information error: missing required bound on `Item` - --> $DIR/self-outlives-lint.rs:215:5 + --> $DIR/self-outlives-lint.rs:213:5 | LL | type Item<'a>; | ^^^^^^^^^^^^^- diff --git a/src/test/ui/generic-associated-types/shadowing.rs b/src/test/ui/generic-associated-types/shadowing.rs index 2a9763457df75..a05d6e14352bb 100644 --- a/src/test/ui/generic-associated-types/shadowing.rs +++ b/src/test/ui/generic-associated-types/shadowing.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Shadow<'a> { type Bar<'a>; //~^ ERROR lifetime name `'a` shadows a lifetime name that is already in scope diff --git a/src/test/ui/generic-associated-types/shadowing.stderr b/src/test/ui/generic-associated-types/shadowing.stderr index be765920975b3..bb32684bc7b9e 100644 --- a/src/test/ui/generic-associated-types/shadowing.stderr +++ b/src/test/ui/generic-associated-types/shadowing.stderr @@ -1,5 +1,5 @@ error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope - --> $DIR/shadowing.rs:4:14 + --> $DIR/shadowing.rs:2:14 | LL | trait Shadow<'a> { | -- first declared here @@ -7,7 +7,7 @@ LL | type Bar<'a>; | ^^ lifetime `'a` already in scope error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope - --> $DIR/shadowing.rs:13:14 + --> $DIR/shadowing.rs:11:14 | LL | impl<'a> NoShadow<'a> for &'a u32 { | -- first declared here @@ -15,7 +15,7 @@ LL | type Bar<'a> = i32; | ^^ lifetime `'a` already in scope error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters - --> $DIR/shadowing.rs:18:14 + --> $DIR/shadowing.rs:16:14 | LL | trait ShadowT { | - first use of `T` @@ -23,7 +23,7 @@ LL | type Bar; | ^ already used error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters - --> $DIR/shadowing.rs:27:14 + --> $DIR/shadowing.rs:25:14 | LL | impl NoShadowT for Option { | - first use of `T` diff --git a/src/test/ui/generic-associated-types/streaming_iterator.rs b/src/test/ui/generic-associated-types/streaming_iterator.rs index e71b6805ad412..408b8dc99eb4e 100644 --- a/src/test/ui/generic-associated-types/streaming_iterator.rs +++ b/src/test/ui/generic-associated-types/streaming_iterator.rs @@ -1,7 +1,5 @@ // run-pass -#![feature(generic_associated_types)] - use std::fmt::Display; trait StreamingIterator { diff --git a/src/test/ui/generic-associated-types/trait-objects.base.stderr b/src/test/ui/generic-associated-types/trait-objects.base.stderr index 1df76a21bf9b4..556422c272cf6 100644 --- a/src/test/ui/generic-associated-types/trait-objects.base.stderr +++ b/src/test/ui/generic-associated-types/trait-objects.base.stderr @@ -1,11 +1,11 @@ error[E0038]: the trait `StreamingIterator` cannot be made into an object - --> $DIR/trait-objects.rs:14:21 + --> $DIR/trait-objects.rs:13:21 | LL | fn min_size(x: &mut dyn for<'a> StreamingIterator = &'a i32>) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `StreamingIterator` cannot be made into an object | note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit - --> $DIR/trait-objects.rs:8:10 + --> $DIR/trait-objects.rs:7:10 | LL | trait StreamingIterator { | ----------------- this trait cannot be made into an object... diff --git a/src/test/ui/generic-associated-types/trait-objects.extended.stderr b/src/test/ui/generic-associated-types/trait-objects.extended.stderr index 52d48d57859f4..086177cc106dc 100644 --- a/src/test/ui/generic-associated-types/trait-objects.extended.stderr +++ b/src/test/ui/generic-associated-types/trait-objects.extended.stderr @@ -1,5 +1,5 @@ error[E0521]: borrowed data escapes outside of function - --> $DIR/trait-objects.rs:16:5 + --> $DIR/trait-objects.rs:15:5 | LL | fn min_size(x: &mut dyn for<'a> StreamingIterator = &'a i32>) -> usize { | - - let's call the lifetime of this reference `'1` diff --git a/src/test/ui/generic-associated-types/trait-objects.rs b/src/test/ui/generic-associated-types/trait-objects.rs index c1da1e0a326d4..17fed11bac360 100644 --- a/src/test/ui/generic-associated-types/trait-objects.rs +++ b/src/test/ui/generic-associated-types/trait-objects.rs @@ -1,6 +1,5 @@ // revisions: base extended -#![feature(generic_associated_types)] #![cfg_attr(extended, feature(generic_associated_types_extended))] #![cfg_attr(extended, allow(incomplete_features))] diff --git a/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.rs b/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.rs index 8b40dac574a43..1cc09aa6dd4ca 100644 --- a/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.rs +++ b/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - pub trait X { type Y<'a: 'static>; //~^ WARNING unnecessary lifetime parameter diff --git a/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr b/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr index ae52010cc50a2..fbd79879d0fb1 100644 --- a/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr +++ b/src/test/ui/generic-associated-types/unsatified-item-lifetime-bound.stderr @@ -1,5 +1,5 @@ warning: unnecessary lifetime parameter `'a` - --> $DIR/unsatified-item-lifetime-bound.rs:4:12 + --> $DIR/unsatified-item-lifetime-bound.rs:2:12 | LL | type Y<'a: 'static>; | ^^ @@ -7,39 +7,39 @@ LL | type Y<'a: 'static>; = help: you can use the `'static` lifetime directly, in place of `'a` error[E0478]: lifetime bound not satisfied - --> $DIR/unsatified-item-lifetime-bound.rs:13:8 + --> $DIR/unsatified-item-lifetime-bound.rs:11:8 | LL | f: ::Y<'a>, | ^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime `'a` as defined here - --> $DIR/unsatified-item-lifetime-bound.rs:12:10 + --> $DIR/unsatified-item-lifetime-bound.rs:10:10 | LL | struct B<'a, T: for<'r> X = &'r ()>> { | ^^ = note: but lifetime parameter must outlive the static lifetime error[E0478]: lifetime bound not satisfied - --> $DIR/unsatified-item-lifetime-bound.rs:18:8 + --> $DIR/unsatified-item-lifetime-bound.rs:16:8 | LL | f: ::Y<'a>, | ^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime `'a` as defined here - --> $DIR/unsatified-item-lifetime-bound.rs:17:10 + --> $DIR/unsatified-item-lifetime-bound.rs:15:10 | LL | struct C<'a, T: X> { | ^^ = note: but lifetime parameter must outlive the static lifetime error[E0478]: lifetime bound not satisfied - --> $DIR/unsatified-item-lifetime-bound.rs:23:8 + --> $DIR/unsatified-item-lifetime-bound.rs:21:8 | LL | f: <() as X>::Y<'a>, | ^^^^^^^^^^^^^^^^ | note: lifetime parameter instantiated with the lifetime `'a` as defined here - --> $DIR/unsatified-item-lifetime-bound.rs:22:10 + --> $DIR/unsatified-item-lifetime-bound.rs:20:10 | LL | struct D<'a> { | ^^ diff --git a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs index 6466bf98dfc8f..7137d92379efb 100644 --- a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs +++ b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait ATy { type Item<'a>: 'a; } diff --git a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr index 7ec9386cabead..1c9ac01ec0f3f 100644 --- a/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr +++ b/src/test/ui/generic-associated-types/unsatisfied-outlives-bound.stderr @@ -1,23 +1,23 @@ error[E0477]: the type `&'b ()` does not fulfill the required lifetime - --> $DIR/unsatisfied-outlives-bound.rs:8:21 + --> $DIR/unsatisfied-outlives-bound.rs:6:21 | LL | type Item<'a> = &'b (); | ^^^^^^ | note: type must outlive the lifetime `'a` as defined here as required by this binding - --> $DIR/unsatisfied-outlives-bound.rs:8:15 + --> $DIR/unsatisfied-outlives-bound.rs:6:15 | LL | type Item<'a> = &'b (); | ^^ error[E0477]: the type `&'a ()` does not fulfill the required lifetime - --> $DIR/unsatisfied-outlives-bound.rs:17:21 + --> $DIR/unsatisfied-outlives-bound.rs:15:21 | LL | type Item<'a> = &'a (); | ^^^^^^ | note: type must satisfy the static lifetime as required by this binding - --> $DIR/unsatisfied-outlives-bound.rs:13:20 + --> $DIR/unsatisfied-outlives-bound.rs:11:20 | LL | type Item<'a>: 'static; | ^^^^^^^ diff --git a/src/test/ui/generic-associated-types/variance_constraints.rs b/src/test/ui/generic-associated-types/variance_constraints.rs index 7d0f7638ac89d..0e9dbb8b1becb 100644 --- a/src/test/ui/generic-associated-types/variance_constraints.rs +++ b/src/test/ui/generic-associated-types/variance_constraints.rs @@ -1,6 +1,5 @@ // check-pass // issue #69184 -#![feature(generic_associated_types)] trait A { type B<'a> where Self: 'a; diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90612.rs b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90612.rs index e150ecfe9a0dc..effc329456d46 100644 --- a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90612.rs +++ b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90612.rs @@ -1,7 +1,5 @@ // check-pass -#![feature(generic_associated_types)] - use std::marker::PhantomData; trait Family: Sized { diff --git a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90638.rs b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90638.rs index 18b7f383482a1..628b5cba10424 100644 --- a/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90638.rs +++ b/src/test/ui/higher-rank-trait-bounds/normalize-under-binder/issue-90638.rs @@ -1,7 +1,5 @@ //check-pass -#![feature(generic_associated_types)] - trait Yokeable<'a>: 'static { type Output: 'a; } diff --git a/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.rs b/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.rs index bcd29bb4e3495..b0c0d33975c30 100644 --- a/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.rs +++ b/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Foo { type Output; diff --git a/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr b/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr index 65a75b68c1f08..cbc2477deb39a 100644 --- a/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr +++ b/src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.stderr @@ -1,5 +1,5 @@ error[E0282]: type annotations needed - --> $DIR/expr-struct-type-relative-gat.rs:17:9 + --> $DIR/expr-struct-type-relative-gat.rs:15:9 | LL | Self::Output::Simple {}; | ^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the associated type `Output` diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.rs b/src/test/ui/lifetimes/missing-lifetime-in-alias.rs index af7b6412780d8..51c564c011a86 100644 --- a/src/test/ui/lifetimes/missing-lifetime-in-alias.rs +++ b/src/test/ui/lifetimes/missing-lifetime-in-alias.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Trait<'a> { type Foo; diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr b/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr index b8c68a4607da8..428b8f14b6fcd 100644 --- a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr +++ b/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/missing-lifetime-in-alias.rs:22:24 + --> $DIR/missing-lifetime-in-alias.rs:20:24 | LL | type B<'a> = as Trait>::Foo; | ^^^^^ expected named lifetime parameter @@ -10,13 +10,13 @@ LL | type B<'a> = as Trait<'a>>::Foo; | ++++ error[E0106]: missing lifetime specifier - --> $DIR/missing-lifetime-in-alias.rs:26:28 + --> $DIR/missing-lifetime-in-alias.rs:24:28 | LL | type C<'a, 'b> = as Trait>::Bar; | ^^^^^ expected named lifetime parameter | note: these named lifetimes are available to use - --> $DIR/missing-lifetime-in-alias.rs:26:8 + --> $DIR/missing-lifetime-in-alias.rs:24:8 | LL | type C<'a, 'b> = as Trait>::Bar; | ^^ ^^ @@ -26,13 +26,13 @@ LL | type C<'a, 'b> = as Trait<'lifetime>>::Bar; | +++++++++++ error[E0107]: missing generics for associated type `Trait::Bar` - --> $DIR/missing-lifetime-in-alias.rs:26:36 + --> $DIR/missing-lifetime-in-alias.rs:24:36 | LL | type C<'a, 'b> = as Trait>::Bar; | ^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'b` - --> $DIR/missing-lifetime-in-alias.rs:6:10 + --> $DIR/missing-lifetime-in-alias.rs:4:10 | LL | type Bar<'b> | ^^^ -- diff --git a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs index 9871cb8fe3ee8..1291a021bef5d 100644 --- a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs +++ b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - fn main() {} struct X; diff --git a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr index 4b398d791c4d1..3856754e080a2 100644 --- a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr +++ b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr @@ -1,5 +1,5 @@ error: associated type in `impl` without body - --> $DIR/impl-item-type-no-body-semantic-fail.rs:8:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:6:5 | LL | type Y; | ^^^^^^- @@ -7,7 +7,7 @@ LL | type Y; | help: provide a definition for the type: `= ;` error: associated type in `impl` without body - --> $DIR/impl-item-type-no-body-semantic-fail.rs:11:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:9:5 | LL | type Z: Ord; | ^^^^^^^^^^^- @@ -15,13 +15,13 @@ LL | type Z: Ord; | help: provide a definition for the type: `= ;` error: bounds on `type`s in `impl`s have no effect - --> $DIR/impl-item-type-no-body-semantic-fail.rs:11:13 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:9:13 | LL | type Z: Ord; | ^^^ error: associated type in `impl` without body - --> $DIR/impl-item-type-no-body-semantic-fail.rs:15:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:13:5 | LL | type W: Ord where Self: Eq; | ^^^^^^^^^^^^^^^^^^^^^^^^^^- @@ -29,13 +29,13 @@ LL | type W: Ord where Self: Eq; | help: provide a definition for the type: `= ;` error: bounds on `type`s in `impl`s have no effect - --> $DIR/impl-item-type-no-body-semantic-fail.rs:15:13 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:13:13 | LL | type W: Ord where Self: Eq; | ^^^ error: associated type in `impl` without body - --> $DIR/impl-item-type-no-body-semantic-fail.rs:19:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:17:5 | LL | type W where Self: Eq; | ^^^^^^^^^^^^^^^^^^^^^- @@ -43,7 +43,7 @@ LL | type W where Self: Eq; | help: provide a definition for the type: `= ;` error[E0658]: inherent associated types are unstable - --> $DIR/impl-item-type-no-body-semantic-fail.rs:8:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:6:5 | LL | type Y; | ^^^^^^^ @@ -52,7 +52,7 @@ LL | type Y; = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable error[E0658]: inherent associated types are unstable - --> $DIR/impl-item-type-no-body-semantic-fail.rs:11:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:9:5 | LL | type Z: Ord; | ^^^^^^^^^^^^ @@ -61,7 +61,7 @@ LL | type Z: Ord; = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable error[E0658]: inherent associated types are unstable - --> $DIR/impl-item-type-no-body-semantic-fail.rs:15:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:13:5 | LL | type W: Ord where Self: Eq; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -70,7 +70,7 @@ LL | type W: Ord where Self: Eq; = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable error[E0658]: inherent associated types are unstable - --> $DIR/impl-item-type-no-body-semantic-fail.rs:19:5 + --> $DIR/impl-item-type-no-body-semantic-fail.rs:17:5 | LL | type W where Self: Eq; | ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/parser/type-alias-where-fixable.fixed b/src/test/ui/parser/type-alias-where-fixable.fixed index 41dd10676d5fd..2f47c0d91fa96 100644 --- a/src/test/ui/parser/type-alias-where-fixable.fixed +++ b/src/test/ui/parser/type-alias-where-fixable.fixed @@ -1,8 +1,6 @@ // check-pass // run-rustfix -#![feature(generic_associated_types)] - trait Trait { // Fine. type Assoc where u32: Copy; diff --git a/src/test/ui/parser/type-alias-where-fixable.rs b/src/test/ui/parser/type-alias-where-fixable.rs index 562a530a7f302..b20aa9398b58f 100644 --- a/src/test/ui/parser/type-alias-where-fixable.rs +++ b/src/test/ui/parser/type-alias-where-fixable.rs @@ -1,8 +1,6 @@ // check-pass // run-rustfix -#![feature(generic_associated_types)] - trait Trait { // Fine. type Assoc where u32: Copy; diff --git a/src/test/ui/parser/type-alias-where-fixable.stderr b/src/test/ui/parser/type-alias-where-fixable.stderr index abfeb62fcbb46..2e516d5c47877 100644 --- a/src/test/ui/parser/type-alias-where-fixable.stderr +++ b/src/test/ui/parser/type-alias-where-fixable.stderr @@ -1,5 +1,5 @@ warning: where clause not allowed here - --> $DIR/type-alias-where-fixable.rs:15:16 + --> $DIR/type-alias-where-fixable.rs:13:16 | LL | type Assoc where u32: Copy = (); | ^^^^^^^^^^^^^^^ @@ -13,7 +13,7 @@ LL + type Assoc = () where u32: Copy; | warning: where clause not allowed here - --> $DIR/type-alias-where-fixable.rs:18:17 + --> $DIR/type-alias-where-fixable.rs:16:17 | LL | type Assoc2 where u32: Copy = () where i32: Copy; | ^^^^^^^^^^^^^^^ @@ -26,7 +26,7 @@ LL + type Assoc2 = () where i32: Copy, u32: Copy; | warning: where clause not allowed here - --> $DIR/type-alias-where-fixable.rs:26:17 + --> $DIR/type-alias-where-fixable.rs:24:17 | LL | type Assoc2 where u32: Copy, i32: Copy = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/parser/type-alias-where.rs b/src/test/ui/parser/type-alias-where.rs index f6e7dfb7b7b2e..62e301cb4086f 100644 --- a/src/test/ui/parser/type-alias-where.rs +++ b/src/test/ui/parser/type-alias-where.rs @@ -1,7 +1,5 @@ // check-fail -#![feature(generic_associated_types)] - // Fine, but lints as unused type Foo where u32: Copy = (); // Not fine. diff --git a/src/test/ui/parser/type-alias-where.stderr b/src/test/ui/parser/type-alias-where.stderr index 8789d2665ad92..fb83817926696 100644 --- a/src/test/ui/parser/type-alias-where.stderr +++ b/src/test/ui/parser/type-alias-where.stderr @@ -1,5 +1,5 @@ error: where clauses are not allowed after the type for type aliases - --> $DIR/type-alias-where.rs:8:15 + --> $DIR/type-alias-where.rs:6:15 | LL | type Bar = () where u32: Copy; | ^^^^^^^^^^^^^^^ @@ -7,7 +7,7 @@ LL | type Bar = () where u32: Copy; = note: see issue #89122 for more information error: where clauses are not allowed after the type for type aliases - --> $DIR/type-alias-where.rs:10:15 + --> $DIR/type-alias-where.rs:8:15 | LL | type Baz = () where; | ^^^^^ diff --git a/src/test/ui/specialization/default-generic-associated-type-bound.rs b/src/test/ui/specialization/default-generic-associated-type-bound.rs index 0f5714e996a17..31a0685d004bf 100644 --- a/src/test/ui/specialization/default-generic-associated-type-bound.rs +++ b/src/test/ui/specialization/default-generic-associated-type-bound.rs @@ -1,8 +1,7 @@ // Check that default generics associated types are validated. #![feature(specialization)] -#![feature(generic_associated_types)] -//~^^ WARNING `specialization` is incomplete +//~^ WARNING `specialization` is incomplete trait X { type U<'a>: PartialEq<&'a Self> where Self: 'a; diff --git a/src/test/ui/specialization/default-generic-associated-type-bound.stderr b/src/test/ui/specialization/default-generic-associated-type-bound.stderr index 6d98763a572f4..44c24c1e578a1 100644 --- a/src/test/ui/specialization/default-generic-associated-type-bound.stderr +++ b/src/test/ui/specialization/default-generic-associated-type-bound.stderr @@ -9,14 +9,14 @@ LL | #![feature(specialization)] = help: consider using `min_specialization` instead, which is more stable and complete error[E0277]: can't compare `T` with `T` - --> $DIR/default-generic-associated-type-bound.rs:18:26 + --> $DIR/default-generic-associated-type-bound.rs:17:26 | LL | default type U<'a> = &'a T; | ^^^^^ no implementation for `T == T` | = note: required for `&'a T` to implement `PartialEq` note: required by a bound in `X::U` - --> $DIR/default-generic-associated-type-bound.rs:8:17 + --> $DIR/default-generic-associated-type-bound.rs:7:17 | LL | type U<'a>: PartialEq<&'a Self> where Self: 'a; | ^^^^^^^^^^^^^^^^^^^ required by this bound in `X::U` diff --git a/src/test/ui/suggestions/issue-85347.rs b/src/test/ui/suggestions/issue-85347.rs index f08e38689d6af..dd52b3150551a 100644 --- a/src/test/ui/suggestions/issue-85347.rs +++ b/src/test/ui/suggestions/issue-85347.rs @@ -1,5 +1,3 @@ -#![allow(incomplete_features)] -#![feature(generic_associated_types)] use std::ops::Deref; trait Foo { type Bar<'a>: Deref::Bar>; diff --git a/src/test/ui/suggestions/issue-85347.stderr b/src/test/ui/suggestions/issue-85347.stderr index fccd2ef8df77c..de853de27e40e 100644 --- a/src/test/ui/suggestions/issue-85347.stderr +++ b/src/test/ui/suggestions/issue-85347.stderr @@ -1,11 +1,11 @@ error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied - --> $DIR/issue-85347.rs:5:42 + --> $DIR/issue-85347.rs:3:42 | LL | type Bar<'a>: Deref::Bar>; | ^^^ expected 1 lifetime argument | note: associated type defined here, with 1 lifetime parameter: `'a` - --> $DIR/issue-85347.rs:5:10 + --> $DIR/issue-85347.rs:3:10 | LL | type Bar<'a>: Deref::Bar>; | ^^^ -- diff --git a/src/test/ui/type-alias-impl-trait/issue-90400-1.rs b/src/test/ui/type-alias-impl-trait/issue-90400-1.rs index 8550a3e86379e..15aead2f64117 100644 --- a/src/test/ui/type-alias-impl-trait/issue-90400-1.rs +++ b/src/test/ui/type-alias-impl-trait/issue-90400-1.rs @@ -1,7 +1,6 @@ // Regression test for #90400, // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836 -#![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] trait Bar { diff --git a/src/test/ui/type-alias-impl-trait/issue-90400-1.stderr b/src/test/ui/type-alias-impl-trait/issue-90400-1.stderr index 428a1074031ee..ead28769f0660 100644 --- a/src/test/ui/type-alias-impl-trait/issue-90400-1.stderr +++ b/src/test/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:23:9 + --> $DIR/issue-90400-1.rs:22: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:22:15 + --> $DIR/issue-90400-1.rs:21:15 | LL | fn foo(&self, bar: B) -> Self::FooFn { | ^^^ required by this bound in `::foo` diff --git a/src/test/ui/type-alias-impl-trait/issue-90400-2.rs b/src/test/ui/type-alias-impl-trait/issue-90400-2.rs index 2b369bb8a2b92..4c6e893c17292 100644 --- a/src/test/ui/type-alias-impl-trait/issue-90400-2.rs +++ b/src/test/ui/type-alias-impl-trait/issue-90400-2.rs @@ -1,7 +1,6 @@ // Regression test for #90400, // taken from https://github.com/rust-lang/rust/issues/90400#issuecomment-954927836 -#![feature(generic_associated_types)] #![feature(type_alias_impl_trait)] trait Bar { diff --git a/src/test/ui/type-alias-impl-trait/issue-90400-2.stderr b/src/test/ui/type-alias-impl-trait/issue-90400-2.stderr index f84ec0cdc273f..50b2dc0495d7f 100644 --- a/src/test/ui/type-alias-impl-trait/issue-90400-2.stderr +++ b/src/test/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:26:9 + --> $DIR/issue-90400-2.rs:25:9 | LL | MyBaz(bar) | ^^^^^^^^^^ the trait `Bar` is not implemented for `B` | note: required for `MyBaz` to implement `Baz` - --> $DIR/issue-90400-2.rs:31:14 + --> $DIR/issue-90400-2.rs:30:14 | LL | impl Baz for MyBaz { | ^^^ ^^^^^^^^ diff --git a/src/tools/rustfmt/tests/source/issue_4257.rs b/src/tools/rustfmt/tests/source/issue_4257.rs index 2b887fadb621c..9482512efca0a 100644 --- a/src/tools/rustfmt/tests/source/issue_4257.rs +++ b/src/tools/rustfmt/tests/source/issue_4257.rs @@ -1,6 +1,3 @@ -#![feature(generic_associated_types)] -#![allow(incomplete_features)] - trait Trait { type Type<'a> where T: 'a; fn foo(x: &T) -> Self::Type<'_>; diff --git a/src/tools/rustfmt/tests/source/issue_4911.rs b/src/tools/rustfmt/tests/source/issue_4911.rs index 21ef6c6c491ac..c254db7b509cc 100644 --- a/src/tools/rustfmt/tests/source/issue_4911.rs +++ b/src/tools/rustfmt/tests/source/issue_4911.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(min_type_alias_impl_trait)] impl SomeTrait for SomeType { diff --git a/src/tools/rustfmt/tests/source/issue_4943.rs b/src/tools/rustfmt/tests/source/issue_4943.rs index 0793b7b4fe1cc..307d9a4a1aba1 100644 --- a/src/tools/rustfmt/tests/source/issue_4943.rs +++ b/src/tools/rustfmt/tests/source/issue_4943.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - impl SomeStruct { fn process(v: T) -> ::R where Self: GAT = T> diff --git a/src/tools/rustfmt/tests/target/issue_4257.rs b/src/tools/rustfmt/tests/target/issue_4257.rs index 1ebaaf2b60018..309a66c8dc3cc 100644 --- a/src/tools/rustfmt/tests/target/issue_4257.rs +++ b/src/tools/rustfmt/tests/target/issue_4257.rs @@ -1,6 +1,3 @@ -#![feature(generic_associated_types)] -#![allow(incomplete_features)] - trait Trait { type Type<'a> where diff --git a/src/tools/rustfmt/tests/target/issue_4911.rs b/src/tools/rustfmt/tests/target/issue_4911.rs index 890a62267ce64..0f64aa7f766fd 100644 --- a/src/tools/rustfmt/tests/target/issue_4911.rs +++ b/src/tools/rustfmt/tests/target/issue_4911.rs @@ -1,4 +1,3 @@ -#![feature(generic_associated_types)] #![feature(min_type_alias_impl_trait)] impl SomeTrait for SomeType { diff --git a/src/tools/rustfmt/tests/target/issue_4943.rs b/src/tools/rustfmt/tests/target/issue_4943.rs index 318f7ebed6e06..bc8f1a366da29 100644 --- a/src/tools/rustfmt/tests/target/issue_4943.rs +++ b/src/tools/rustfmt/tests/target/issue_4943.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - impl SomeStruct { fn process(v: T) -> ::R where