From c63f3feb0fcde0d59004f30ab8f8d2f38da74754 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Tue, 5 Mar 2024 18:23:01 +0000 Subject: [PATCH] Stabilize associated type bounds --- compiler/rustc_ast/src/lib.rs | 2 +- compiler/rustc_ast_passes/src/feature_gate.rs | 8 - compiler/rustc_borrowck/src/lib.rs | 2 +- compiler/rustc_codegen_gcc/src/lib.rs | 2 +- compiler/rustc_codegen_ssa/src/lib.rs | 2 +- .../src/error_codes/E0719.md | 4 - compiler/rustc_expand/src/lib.rs | 2 +- compiler/rustc_feature/src/accepted.rs | 2 + compiler/rustc_feature/src/unstable.rs | 2 - compiler/rustc_infer/src/lib.rs | 2 +- compiler/rustc_middle/src/lib.rs | 2 +- compiler/rustc_mir_build/src/lib.rs | 2 +- compiler/rustc_parse/src/parser/path.rs | 2 - compiler/rustc_serialize/src/lib.rs | 2 +- compiler/rustc_trait_selection/src/lib.rs | 2 +- .../src/traits/error_reporting/suggestions.rs | 3 +- library/alloc/src/lib.rs | 2 +- library/alloc/tests/lib.rs | 2 +- library/core/src/lib.rs | 2 +- tests/rustdoc-ui/issues/issue-110900.rs | 1 - tests/ui/associated-consts/issue-93835.rs | 1 - tests/ui/associated-consts/issue-93835.stderr | 12 +- .../ambiguous-associated-type.rs | 2 - .../assoc-type-eq-with-dyn-atb-fail.rs | 2 - .../assoc-type-eq-with-dyn-atb-fail.stderr | 2 +- .../bad-bounds-on-assoc-in-trait.rs | 2 - .../bad-universal-in-dyn-in-where-clause.rs | 2 - ...ad-universal-in-dyn-in-where-clause.stderr | 2 +- .../bad-universal-in-impl-sig.rs | 2 - .../bad-universal-in-impl-sig.stderr | 2 +- .../bounds-on-assoc-in-trait.rs | 2 - tests/ui/associated-type-bounds/consts.rs | 2 - tests/ui/associated-type-bounds/consts.stderr | 4 +- tests/ui/associated-type-bounds/duplicate.rs | 1 - .../associated-type-bounds/duplicate.stderr | 144 +++++++++--------- tests/ui/associated-type-bounds/elision.rs | 1 - .../ui/associated-type-bounds/elision.stderr | 4 +- .../entails-sized-object-safety.rs | 2 - .../ui/associated-type-bounds/enum-bounds.rs | 1 - tests/ui/associated-type-bounds/fn-apit.rs | 2 - tests/ui/associated-type-bounds/fn-aux.rs | 2 - tests/ui/associated-type-bounds/fn-inline.rs | 2 - tests/ui/associated-type-bounds/fn-where.rs | 2 - .../ui/associated-type-bounds/fn-wrap-apit.rs | 1 - .../associated-type-bounds/higher-ranked.rs | 2 - tests/ui/associated-type-bounds/hrtb.rs | 2 - .../implied-bounds-cycle.rs | 2 - .../implied-bounds-cycle.stderr | 4 +- .../implied-in-supertrait.rs | 2 - .../implied-region-constraints.rs | 2 - .../implied-region-constraints.stderr | 4 +- tests/ui/associated-type-bounds/inside-adt.rs | 2 - .../associated-type-bounds/inside-adt.stderr | 18 +-- .../ui/associated-type-bounds/issue-104916.rs | 2 - .../issue-104916.stderr | 2 +- .../ui/associated-type-bounds/issue-61752.rs | 2 - .../ui/associated-type-bounds/issue-70292.rs | 2 - .../associated-type-bounds/issue-71443-1.rs | 2 - .../issue-71443-1.stderr | 2 +- .../associated-type-bounds/issue-71443-2.rs | 2 - .../ui/associated-type-bounds/issue-79949.rs | 2 - .../ui/associated-type-bounds/issue-81193.rs | 2 - .../ui/associated-type-bounds/issue-83017.rs | 2 - ...sted-bounds-dont-eliminate-alias-bounds.rs | 2 - .../associated-type-bounds/no-gat-position.rs | 2 - .../no-gat-position.stderr | 2 +- .../overlaping-bound-suggestion.rs | 1 - .../overlaping-bound-suggestion.stderr | 4 +- .../bad-inputs-and-output.rs | 2 - .../bad-inputs-and-output.stderr | 27 +--- .../unpretty-parenthesized.rs | 5 +- .../unpretty-parenthesized.stderr | 13 -- .../unpretty-parenthesized.stdout | 4 + tests/ui/associated-type-bounds/rpit.rs | 2 - tests/ui/associated-type-bounds/rpit.stderr | 2 +- .../associated-type-bounds/struct-bounds.rs | 2 - .../supertrait-defines-ty.rs | 2 - .../trait-alias-impl-trait.rs | 1 - .../ui/associated-type-bounds/trait-params.rs | 2 - tests/ui/associated-type-bounds/type-alias.rs | 2 - .../associated-type-bounds/type-alias.stderr | 24 +-- .../ui/associated-type-bounds/union-bounds.rs | 2 - tests/ui/associated-types/issue-63591.rs | 1 - .../feature-gate-associated_type_bounds.rs | 61 -------- ...feature-gate-associated_type_bounds.stderr | 138 ----------------- .../lifetime-in-associated-trait-bound.rs | 2 - ...ints-before-generic-args-syntactic-pass.rs | 4 - ...-before-generic-args-syntactic-pass.stderr | 26 ---- .../const-impl-trait.rs | 1 - .../const-impl-trait.stderr | 6 +- tests/ui/suggestions/missing-assoc-fn.rs | 2 +- tests/ui/suggestions/missing-assoc-fn.stderr | 15 +- ...type-ascription-instead-of-path-in-type.rs | 2 - ...-ascription-instead-of-path-in-type.stderr | 14 +- .../negative-bounds/associated-constraints.rs | 2 +- 95 files changed, 147 insertions(+), 533 deletions(-) delete mode 100644 tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr delete mode 100644 tests/ui/feature-gates/feature-gate-associated_type_bounds.rs delete mode 100644 tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr delete mode 100644 tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr diff --git a/compiler/rustc_ast/src/lib.rs b/compiler/rustc_ast/src/lib.rs index 6e42cf37b865c..ef60a1c9b5b6b 100644 --- a/compiler/rustc_ast/src/lib.rs +++ b/compiler/rustc_ast/src/lib.rs @@ -11,7 +11,7 @@ #![doc(rust_logo)] #![allow(internal_features)] #![feature(rustdoc_internals)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(associated_type_defaults)] #![feature(box_patterns)] #![feature(if_let_guard)] diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 2e14238f950f2..0020ef79d0252 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -452,13 +452,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { constraint.span, "return type notation is experimental" ); - } else { - gate!( - &self, - associated_type_bounds, - constraint.span, - "associated type bounds are unstable" - ); } } visit::walk_assoc_constraint(self, constraint) @@ -604,7 +597,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) { } gate_all_legacy_dont_use!(trait_alias, "trait aliases are experimental"); - gate_all_legacy_dont_use!(associated_type_bounds, "associated type bounds are unstable"); // Despite being a new feature, `where T: Trait`, which is RTN syntax now, // used to be gated under associated_type_bounds, which are right above, so RTN needs to // be too. diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 8dcfe014b653e..ec89f5d4b403c 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -4,7 +4,7 @@ #![feature(rustdoc_internals)] #![doc(rust_logo)] #![feature(assert_matches)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(box_patterns)] #![feature(control_flow_enum)] #![feature(let_chains)] diff --git a/compiler/rustc_codegen_gcc/src/lib.rs b/compiler/rustc_codegen_gcc/src/lib.rs index 09ce059476ec7..0f986d554e558 100644 --- a/compiler/rustc_codegen_gcc/src/lib.rs +++ b/compiler/rustc_codegen_gcc/src/lib.rs @@ -18,11 +18,11 @@ #![feature( rustc_private, decl_macro, - associated_type_bounds, never_type, trusted_len, hash_raw_entry )] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![allow(broken_intra_doc_links)] #![recursion_limit="256"] #![warn(rust_2018_idioms)] diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs index 92f0be541c0b0..9be8dcf166d40 100644 --- a/compiler/rustc_codegen_ssa/src/lib.rs +++ b/compiler/rustc_codegen_ssa/src/lib.rs @@ -4,7 +4,7 @@ #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(box_patterns)] #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/compiler/rustc_error_codes/src/error_codes/E0719.md b/compiler/rustc_error_codes/src/error_codes/E0719.md index 057a0b1645c57..cd981db1058a6 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0719.md +++ b/compiler/rustc_error_codes/src/error_codes/E0719.md @@ -3,8 +3,6 @@ An associated type value was specified more than once. Erroneous code example: ```compile_fail,E0719 -#![feature(associated_type_bounds)] - trait FooTrait {} trait BarTrait {} @@ -19,8 +17,6 @@ specify the associated type with the new trait. Corrected example: ``` -#![feature(associated_type_bounds)] - trait FooTrait {} trait BarTrait {} trait FooBarTrait: FooTrait + BarTrait {} diff --git a/compiler/rustc_expand/src/lib.rs b/compiler/rustc_expand/src/lib.rs index e550f7242c338..0b8f75bc2caeb 100644 --- a/compiler/rustc_expand/src/lib.rs +++ b/compiler/rustc_expand/src/lib.rs @@ -1,7 +1,7 @@ #![doc(rust_logo)] #![feature(rustdoc_internals)] #![feature(array_windows)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(associated_type_defaults)] #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 7e5197f16f91e..ceab4581fe7b8 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -59,6 +59,8 @@ declare_features! ( (accepted, asm_sym, "1.66.0", Some(93333)), /// Allows the definition of associated constants in `trait` or `impl` blocks. (accepted, associated_consts, "1.20.0", Some(29646)), + /// Allows the user of associated type bounds. + (accepted, associated_type_bounds, "CURRENT_RUSTC_VERSION", Some(52662)), /// Allows using associated `type`s in `trait`s. (accepted, associated_types, "1.0.0", None), /// Allows free and inherent `async fn`s, `async` blocks, and `.await` expressions. diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index a10f4b934ea0a..df812b53e64e4 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -351,8 +351,6 @@ declare_features! ( (unstable, asm_unwind, "1.58.0", Some(93334)), /// Allows users to enforce equality of associated constants `TraitImpl`. (unstable, associated_const_equality, "1.58.0", Some(92827)), - /// Allows the user of associated type bounds. - (unstable, associated_type_bounds, "1.34.0", Some(52662)), /// Allows associated type defaults. (unstable, associated_type_defaults, "1.2.0", Some(29661)), /// Allows `async || body` closures. diff --git a/compiler/rustc_infer/src/lib.rs b/compiler/rustc_infer/src/lib.rs index 029bddda1e1c5..3c2071be04e73 100644 --- a/compiler/rustc_infer/src/lib.rs +++ b/compiler/rustc_infer/src/lib.rs @@ -18,7 +18,7 @@ #![allow(internal_features)] #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(box_patterns)] #![feature(control_flow_enum)] #![feature(extend_one)] diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index c3e4a03ad1677..e47668b9110ff 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -48,7 +48,7 @@ #![feature(trusted_len)] #![feature(type_alias_impl_trait)] #![feature(strict_provenance)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(rustc_attrs)] #![feature(control_flow_enum)] #![feature(trait_upcasting)] diff --git a/compiler/rustc_mir_build/src/lib.rs b/compiler/rustc_mir_build/src/lib.rs index e3f202b7f1882..b9a20cb21e968 100644 --- a/compiler/rustc_mir_build/src/lib.rs +++ b/compiler/rustc_mir_build/src/lib.rs @@ -5,7 +5,7 @@ #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] #![feature(assert_matches)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(box_patterns)] #![feature(if_let_guard)] #![feature(let_chains)] diff --git a/compiler/rustc_parse/src/parser/path.rs b/compiler/rustc_parse/src/parser/path.rs index 545db5138a3ab..683ff36294ef5 100644 --- a/compiler/rustc_parse/src/parser/path.rs +++ b/compiler/rustc_parse/src/parser/path.rs @@ -639,8 +639,6 @@ impl<'a> Parser<'a> { && matches!(args.output, ast::FnRetTy::Default(..)) { self.psess.gated_spans.gate(sym::return_type_notation, span); - } else { - self.psess.gated_spans.gate(sym::associated_type_bounds, span); } } let constraint = diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index bb822c611a170..b67b7d79d97bb 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -8,7 +8,7 @@ #![doc(rust_logo)] #![allow(internal_features)] #![feature(rustdoc_internals)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(const_option)] #![feature(core_intrinsics)] #![feature(generic_nonzero)] diff --git a/compiler/rustc_trait_selection/src/lib.rs b/compiler/rustc_trait_selection/src/lib.rs index fd3d62d1321e2..9fac0ea77153b 100644 --- a/compiler/rustc_trait_selection/src/lib.rs +++ b/compiler/rustc_trait_selection/src/lib.rs @@ -17,7 +17,7 @@ #![allow(rustc::diagnostic_outside_of_impl)] #![allow(rustc::untranslatable_diagnostic)] #![feature(assert_matches)] -#![feature(associated_type_bounds)] +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(associated_type_defaults)] #![feature(box_patterns)] #![feature(control_flow_enum)] diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 1241227a5af39..367c915c53d6b 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -194,8 +194,7 @@ pub fn suggest_restriction<'tcx, G: EmissionGuarantee>( sugg.extend(ty_spans.into_iter().map(|s| (s, type_param_name.to_string()))); // Suggest `fn foo(t: T) where ::A: Bound`. - // FIXME: once `#![feature(associated_type_bounds)]` is stabilized, we should suggest - // `fn foo(t: impl Trait)` instead. + // FIXME: we should suggest `fn foo(t: impl Trait)` instead. err.multipart_suggestion( "introduce a type parameter with a trait bound instead of using `impl Trait`", sugg, diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 28695ade5bf55..31cb9c9a8e262 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -172,12 +172,12 @@ // // Language features: // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![cfg_attr(not(test), feature(coroutine_trait))] #![cfg_attr(test, feature(panic_update_hook))] #![cfg_attr(test, feature(test))] #![feature(allocator_internals)] #![feature(allow_internal_unstable)] -#![feature(associated_type_bounds)] #![feature(c_unwind)] #![feature(cfg_sanitize)] #![feature(const_mut_refs)] diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index ed928994ad697..b4c036f1034d3 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -1,3 +1,4 @@ +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![feature(allocator_api)] #![feature(alloc_layout_extra)] #![feature(iter_array_chunks)] @@ -21,7 +22,6 @@ #![feature(trusted_len)] #![feature(try_reserve_kind)] #![feature(unboxed_closures)] -#![feature(associated_type_bounds)] #![feature(binary_heap_into_iter_sorted)] #![feature(binary_heap_drain_sorted)] #![feature(slice_ptr_get)] diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 0f7885769c267..d8aaac7a72920 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -202,6 +202,7 @@ // // Language features: // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(associated_type_bounds))] #![cfg_attr(bootstrap, feature(diagnostic_namespace))] #![cfg_attr(bootstrap, feature(platform_intrinsics))] #![feature(abi_unadjusted)] @@ -209,7 +210,6 @@ #![feature(allow_internal_unsafe)] #![feature(allow_internal_unstable)] #![feature(asm_const)] -#![feature(associated_type_bounds)] #![feature(auto_traits)] #![feature(c_unwind)] #![feature(cfg_sanitize)] diff --git a/tests/rustdoc-ui/issues/issue-110900.rs b/tests/rustdoc-ui/issues/issue-110900.rs index 5f90444dfd309..5a8961670833f 100644 --- a/tests/rustdoc-ui/issues/issue-110900.rs +++ b/tests/rustdoc-ui/issues/issue-110900.rs @@ -1,7 +1,6 @@ //@ check-pass #![crate_type="lib"] -#![feature(associated_type_bounds)] trait A<'a> {} trait B<'b> {} diff --git a/tests/ui/associated-consts/issue-93835.rs b/tests/ui/associated-consts/issue-93835.rs index b2a437fcbfb85..9cc33d53f9cd5 100644 --- a/tests/ui/associated-consts/issue-93835.rs +++ b/tests/ui/associated-consts/issue-93835.rs @@ -6,7 +6,6 @@ fn e() { //~| ERROR cannot find value //~| ERROR associated const equality //~| ERROR cannot find trait `p` in this scope - //~| ERROR associated type bounds } fn main() {} diff --git a/tests/ui/associated-consts/issue-93835.stderr b/tests/ui/associated-consts/issue-93835.stderr index d3ce46f6f03fb..dfe78b3d1f380 100644 --- a/tests/ui/associated-consts/issue-93835.stderr +++ b/tests/ui/associated-consts/issue-93835.stderr @@ -26,17 +26,7 @@ LL | type_ascribe!(p, a>); = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: associated type bounds are unstable - --> $DIR/issue-93835.rs:4:24 - | -LL | type_ascribe!(p, a>); - | ^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 5 previous errors +error: aborting due to 4 previous errors Some errors have detailed explanations: E0405, E0412, E0425, E0658. For more information about an error, try `rustc --explain E0405`. diff --git a/tests/ui/associated-type-bounds/ambiguous-associated-type.rs b/tests/ui/associated-type-bounds/ambiguous-associated-type.rs index 4e6d8b9dd0a67..ff3c6f2a95d6e 100644 --- a/tests/ui/associated-type-bounds/ambiguous-associated-type.rs +++ b/tests/ui/associated-type-bounds/ambiguous-associated-type.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - pub struct Flatten where I: Iterator, diff --git a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs index 8a580e191869b..ca4d1f6d9202c 100644 --- a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs +++ b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.rs @@ -8,8 +8,6 @@ // Additionally, as reported in https://github.com/rust-lang/rust/issues/63594, // we check that the spans for the error message are sane here. -#![feature(associated_type_bounds)] - fn main() {} trait Bar { diff --git a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr index ad5409094118d..b1575abe57112 100644 --- a/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr +++ b/tests/ui/associated-type-bounds/assoc-type-eq-with-dyn-atb-fail.stderr @@ -1,5 +1,5 @@ error: associated type bounds are not allowed in `dyn` types - --> $DIR/assoc-type-eq-with-dyn-atb-fail.rs:30:28 + --> $DIR/assoc-type-eq-with-dyn-atb-fail.rs:28:28 | LL | type Out = Box>; | ^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs index edde549bb4b67..30fa51bb17532 100644 --- a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs +++ b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - use std::fmt::Debug; use std::iter::Once; diff --git a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.rs b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.rs index 81c8fe829f978..4689888719f08 100644 --- a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.rs +++ b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - trait B { type AssocType; } diff --git a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr index 7d9870c72d481..5d8108f28a075 100644 --- a/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr +++ b/tests/ui/associated-type-bounds/bad-universal-in-dyn-in-where-clause.stderr @@ -1,5 +1,5 @@ error: associated type bounds are not allowed in `dyn` types - --> $DIR/bad-universal-in-dyn-in-where-clause.rs:9:19 + --> $DIR/bad-universal-in-dyn-in-where-clause.rs:7:19 | LL | dyn for<'j> B:, | ^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.rs b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.rs index f465123f34c8b..014550823bd1d 100644 --- a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.rs +++ b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - trait Trait { type Item; } diff --git a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr index 8855bd9c31230..a017a601a17d6 100644 --- a/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr +++ b/tests/ui/associated-type-bounds/bad-universal-in-impl-sig.stderr @@ -1,5 +1,5 @@ error: associated type bounds are not allowed in `dyn` types - --> $DIR/bad-universal-in-impl-sig.rs:10:16 + --> $DIR/bad-universal-in-impl-sig.rs:8:16 | LL | impl dyn Trait {} | ^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs b/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs index dad1f644284d8..f69c392a8c34c 100644 --- a/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs +++ b/tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - use std::fmt::Debug; use std::iter::Empty; use std::ops::Range; diff --git a/tests/ui/associated-type-bounds/consts.rs b/tests/ui/associated-type-bounds/consts.rs index 8f90c36ed45e1..17de1ff568209 100644 --- a/tests/ui/associated-type-bounds/consts.rs +++ b/tests/ui/associated-type-bounds/consts.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - pub fn accept(_: impl Trait) {} //~^ ERROR expected type, found constant diff --git a/tests/ui/associated-type-bounds/consts.stderr b/tests/ui/associated-type-bounds/consts.stderr index 7f9fe5e500a3c..ddb677ec74db1 100644 --- a/tests/ui/associated-type-bounds/consts.stderr +++ b/tests/ui/associated-type-bounds/consts.stderr @@ -1,5 +1,5 @@ error: expected type, found constant - --> $DIR/consts.rs:3:29 + --> $DIR/consts.rs:1:29 | LL | pub fn accept(_: impl Trait) {} | ^------ bounds are not allowed on associated constants @@ -7,7 +7,7 @@ LL | pub fn accept(_: impl Trait) {} | unexpected constant | note: the associated constant is defined here - --> $DIR/consts.rs:7:5 + --> $DIR/consts.rs:5:5 | LL | const K: i32; | ^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/duplicate.rs b/tests/ui/associated-type-bounds/duplicate.rs index 54c8cd3fde0d7..06a1993da7272 100644 --- a/tests/ui/associated-type-bounds/duplicate.rs +++ b/tests/ui/associated-type-bounds/duplicate.rs @@ -1,4 +1,3 @@ -#![feature(associated_type_bounds)] #![feature(type_alias_impl_trait)] use std::iter; diff --git a/tests/ui/associated-type-bounds/duplicate.stderr b/tests/ui/associated-type-bounds/duplicate.stderr index 6345ef4b79860..2d298f0a013a5 100644 --- a/tests/ui/associated-type-bounds/duplicate.stderr +++ b/tests/ui/associated-type-bounds/duplicate.stderr @@ -1,5 +1,5 @@ error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:7:36 + --> $DIR/duplicate.rs:6:36 | LL | struct SI1> { | ---------- ^^^^^^^^^^ re-bound here @@ -7,7 +7,7 @@ LL | struct SI1> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:11:36 + --> $DIR/duplicate.rs:10:36 | LL | struct SI2> { | ---------- ^^^^^^^^^^ re-bound here @@ -15,7 +15,7 @@ LL | struct SI2> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:15:39 + --> $DIR/duplicate.rs:14:39 | LL | struct SI3> { | ------------- ^^^^^^^^^^^^^ re-bound here @@ -23,7 +23,7 @@ LL | struct SI3> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:21:29 + --> $DIR/duplicate.rs:20:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -31,7 +31,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:28:29 + --> $DIR/duplicate.rs:27:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -39,7 +39,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:35:32 + --> $DIR/duplicate.rs:34:32 | LL | T: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -47,7 +47,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:41:34 + --> $DIR/duplicate.rs:40:34 | LL | enum EI1> { | ---------- ^^^^^^^^^^ re-bound here @@ -55,7 +55,7 @@ LL | enum EI1> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:45:34 + --> $DIR/duplicate.rs:44:34 | LL | enum EI2> { | ---------- ^^^^^^^^^^ re-bound here @@ -63,7 +63,7 @@ LL | enum EI2> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:49:37 + --> $DIR/duplicate.rs:48:37 | LL | enum EI3> { | ------------- ^^^^^^^^^^^^^ re-bound here @@ -71,7 +71,7 @@ LL | enum EI3> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:55:29 + --> $DIR/duplicate.rs:54:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -79,7 +79,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:62:29 + --> $DIR/duplicate.rs:61:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -87,7 +87,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:69:32 + --> $DIR/duplicate.rs:68:32 | LL | T: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -95,7 +95,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:75:35 + --> $DIR/duplicate.rs:74:35 | LL | union UI1> { | ---------- ^^^^^^^^^^ re-bound here @@ -103,7 +103,7 @@ LL | union UI1> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:79:35 + --> $DIR/duplicate.rs:78:35 | LL | union UI2> { | ---------- ^^^^^^^^^^ re-bound here @@ -111,7 +111,7 @@ LL | union UI2> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:83:38 + --> $DIR/duplicate.rs:82:38 | LL | union UI3> { | ------------- ^^^^^^^^^^^^^ re-bound here @@ -119,7 +119,7 @@ LL | union UI3> { | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:89:29 + --> $DIR/duplicate.rs:88:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -127,7 +127,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:96:29 + --> $DIR/duplicate.rs:95:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -135,7 +135,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:103:32 + --> $DIR/duplicate.rs:102:32 | LL | T: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -143,7 +143,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:109:32 + --> $DIR/duplicate.rs:108:32 | LL | fn FI1>() {} | ---------- ^^^^^^^^^^ re-bound here @@ -151,7 +151,7 @@ LL | fn FI1>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:111:32 + --> $DIR/duplicate.rs:110:32 | LL | fn FI2>() {} | ---------- ^^^^^^^^^^ re-bound here @@ -159,7 +159,7 @@ LL | fn FI2>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:113:35 + --> $DIR/duplicate.rs:112:35 | LL | fn FI3>() {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -167,7 +167,7 @@ LL | fn FI3>() {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:117:29 + --> $DIR/duplicate.rs:116:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -175,7 +175,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:123:29 + --> $DIR/duplicate.rs:122:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -183,7 +183,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:129:32 + --> $DIR/duplicate.rs:128:32 | LL | T: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -191,7 +191,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:134:42 + --> $DIR/duplicate.rs:133:42 | LL | fn FRPIT1() -> impl Iterator { | ---------- ^^^^^^^^^^ re-bound here @@ -199,7 +199,7 @@ LL | fn FRPIT1() -> impl Iterator { | `Item` bound here first error[E0282]: type annotations needed - --> $DIR/duplicate.rs:136:5 + --> $DIR/duplicate.rs:135:5 | LL | iter::empty() | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty` @@ -210,7 +210,7 @@ LL | iter::empty::() | +++++ error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:139:42 + --> $DIR/duplicate.rs:138:42 | LL | fn FRPIT2() -> impl Iterator { | ---------- ^^^^^^^^^^ re-bound here @@ -218,7 +218,7 @@ LL | fn FRPIT2() -> impl Iterator { | `Item` bound here first error[E0282]: type annotations needed - --> $DIR/duplicate.rs:141:5 + --> $DIR/duplicate.rs:140:5 | LL | iter::empty() | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty` @@ -229,7 +229,7 @@ LL | iter::empty::() | +++++ error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:144:45 + --> $DIR/duplicate.rs:143:45 | LL | fn FRPIT3() -> impl Iterator { | ------------- ^^^^^^^^^^^^^ re-bound here @@ -237,7 +237,7 @@ LL | fn FRPIT3() -> impl Iterator { | `Item` bound here first error[E0282]: type annotations needed - --> $DIR/duplicate.rs:146:5 + --> $DIR/duplicate.rs:145:5 | LL | iter::empty() | ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `empty` @@ -248,7 +248,7 @@ LL | iter::empty::() | +++++ error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:149:40 + --> $DIR/duplicate.rs:148:40 | LL | fn FAPIT1(_: impl Iterator) {} | ---------- ^^^^^^^^^^ re-bound here @@ -256,7 +256,7 @@ LL | fn FAPIT1(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:151:40 + --> $DIR/duplicate.rs:150:40 | LL | fn FAPIT2(_: impl Iterator) {} | ---------- ^^^^^^^^^^ re-bound here @@ -264,7 +264,7 @@ LL | fn FAPIT2(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:153:43 + --> $DIR/duplicate.rs:152:43 | LL | fn FAPIT3(_: impl Iterator) {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -272,7 +272,7 @@ LL | fn FAPIT3(_: impl Iterator) {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:156:35 + --> $DIR/duplicate.rs:155:35 | LL | type TAI1> = T; | ---------- ^^^^^^^^^^ re-bound here @@ -280,7 +280,7 @@ LL | type TAI1> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:158:35 + --> $DIR/duplicate.rs:157:35 | LL | type TAI2> = T; | ---------- ^^^^^^^^^^ re-bound here @@ -288,7 +288,7 @@ LL | type TAI2> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:160:38 + --> $DIR/duplicate.rs:159:38 | LL | type TAI3> = T; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -296,7 +296,7 @@ LL | type TAI3> = T; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:164:29 + --> $DIR/duplicate.rs:163:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -304,7 +304,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:169:29 + --> $DIR/duplicate.rs:168:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -312,7 +312,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:174:32 + --> $DIR/duplicate.rs:173:32 | LL | T: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -320,7 +320,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:178:36 + --> $DIR/duplicate.rs:177:36 | LL | type ETAI1> = impl Copy; | ---------- ^^^^^^^^^^ re-bound here @@ -328,7 +328,7 @@ LL | type ETAI1> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:180:36 + --> $DIR/duplicate.rs:179:36 | LL | type ETAI2> = impl Copy; | ---------- ^^^^^^^^^^ re-bound here @@ -336,7 +336,7 @@ LL | type ETAI2> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:182:39 + --> $DIR/duplicate.rs:181:39 | LL | type ETAI3> = impl Copy; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -344,7 +344,7 @@ LL | type ETAI3> = impl Copy; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:184:40 + --> $DIR/duplicate.rs:183:40 | LL | type ETAI4 = impl Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -352,7 +352,7 @@ LL | type ETAI4 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:186:40 + --> $DIR/duplicate.rs:185:40 | LL | type ETAI5 = impl Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -360,7 +360,7 @@ LL | type ETAI5 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:188:43 + --> $DIR/duplicate.rs:187:43 | LL | type ETAI6 = impl Iterator; | ------------- ^^^^^^^^^^^^^ re-bound here @@ -368,7 +368,7 @@ LL | type ETAI6 = impl Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:191:36 + --> $DIR/duplicate.rs:190:36 | LL | trait TRI1> {} | ---------- ^^^^^^^^^^ re-bound here @@ -376,7 +376,7 @@ LL | trait TRI1> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:193:36 + --> $DIR/duplicate.rs:192:36 | LL | trait TRI2> {} | ---------- ^^^^^^^^^^ re-bound here @@ -384,7 +384,7 @@ LL | trait TRI2> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:195:39 + --> $DIR/duplicate.rs:194:39 | LL | trait TRI3> {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -392,7 +392,7 @@ LL | trait TRI3> {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:197:34 + --> $DIR/duplicate.rs:196:34 | LL | trait TRS1: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -400,7 +400,7 @@ LL | trait TRS1: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:197:34 + --> $DIR/duplicate.rs:196:34 | LL | trait TRS1: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -410,7 +410,7 @@ LL | trait TRS1: Iterator {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:197:34 + --> $DIR/duplicate.rs:196:34 | LL | trait TRS1: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -420,7 +420,7 @@ LL | trait TRS1: Iterator {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:201:34 + --> $DIR/duplicate.rs:200:34 | LL | trait TRS2: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -428,7 +428,7 @@ LL | trait TRS2: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:201:34 + --> $DIR/duplicate.rs:200:34 | LL | trait TRS2: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -438,7 +438,7 @@ LL | trait TRS2: Iterator {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:201:34 + --> $DIR/duplicate.rs:200:34 | LL | trait TRS2: Iterator {} | ---------- ^^^^^^^^^^ re-bound here @@ -448,7 +448,7 @@ LL | trait TRS2: Iterator {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:205:37 + --> $DIR/duplicate.rs:204:37 | LL | trait TRS3: Iterator {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -456,7 +456,7 @@ LL | trait TRS3: Iterator {} | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:205:37 + --> $DIR/duplicate.rs:204:37 | LL | trait TRS3: Iterator {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -466,7 +466,7 @@ LL | trait TRS3: Iterator {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:205:37 + --> $DIR/duplicate.rs:204:37 | LL | trait TRS3: Iterator {} | ------------- ^^^^^^^^^^^^^ re-bound here @@ -476,7 +476,7 @@ LL | trait TRS3: Iterator {} = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:211:29 + --> $DIR/duplicate.rs:210:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -484,7 +484,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:217:29 + --> $DIR/duplicate.rs:216:29 | LL | T: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -492,7 +492,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:223:32 + --> $DIR/duplicate.rs:222:32 | LL | T: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -500,7 +500,7 @@ LL | T: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:229:32 + --> $DIR/duplicate.rs:228:32 | LL | Self: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -508,7 +508,7 @@ LL | Self: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:229:32 + --> $DIR/duplicate.rs:228:32 | LL | Self: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -518,7 +518,7 @@ LL | Self: Iterator, = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:229:32 + --> $DIR/duplicate.rs:228:32 | LL | Self: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -528,7 +528,7 @@ LL | Self: Iterator, = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:237:32 + --> $DIR/duplicate.rs:236:32 | LL | Self: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -536,7 +536,7 @@ LL | Self: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:237:32 + --> $DIR/duplicate.rs:236:32 | LL | Self: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -546,7 +546,7 @@ LL | Self: Iterator, = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:237:32 + --> $DIR/duplicate.rs:236:32 | LL | Self: Iterator, | ---------- ^^^^^^^^^^ re-bound here @@ -556,7 +556,7 @@ LL | Self: Iterator, = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:245:35 + --> $DIR/duplicate.rs:244:35 | LL | Self: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -564,7 +564,7 @@ LL | Self: Iterator, | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:245:35 + --> $DIR/duplicate.rs:244:35 | LL | Self: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -574,7 +574,7 @@ LL | Self: Iterator, = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:245:35 + --> $DIR/duplicate.rs:244:35 | LL | Self: Iterator, | ------------- ^^^^^^^^^^^^^ re-bound here @@ -584,7 +584,7 @@ LL | Self: Iterator, = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:252:34 + --> $DIR/duplicate.rs:251:34 | LL | type A: Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -592,7 +592,7 @@ LL | type A: Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:256:34 + --> $DIR/duplicate.rs:255:34 | LL | type A: Iterator; | ---------- ^^^^^^^^^^ re-bound here @@ -600,7 +600,7 @@ LL | type A: Iterator; | `Item` bound here first error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified - --> $DIR/duplicate.rs:260:37 + --> $DIR/duplicate.rs:259:37 | LL | type A: Iterator; | ------------- ^^^^^^^^^^^^^ re-bound here diff --git a/tests/ui/associated-type-bounds/elision.rs b/tests/ui/associated-type-bounds/elision.rs index 5d7ed940ac69b..8d35df1e4f4c9 100644 --- a/tests/ui/associated-type-bounds/elision.rs +++ b/tests/ui/associated-type-bounds/elision.rs @@ -1,4 +1,3 @@ -#![feature(associated_type_bounds)] #![feature(anonymous_lifetime_in_impl_trait)] // The same thing should happen for constraints in dyn trait. diff --git a/tests/ui/associated-type-bounds/elision.stderr b/tests/ui/associated-type-bounds/elision.stderr index 749dffdc4d318..36ca5a80024af 100644 --- a/tests/ui/associated-type-bounds/elision.stderr +++ b/tests/ui/associated-type-bounds/elision.stderr @@ -1,5 +1,5 @@ error[E0106]: missing lifetime specifier - --> $DIR/elision.rs:5:70 + --> $DIR/elision.rs:4:70 | LL | fn f(x: &mut dyn Iterator>) -> Option<&'_ ()> { x.next() } | ------------------------------------------------ ^^ expected named lifetime parameter @@ -11,7 +11,7 @@ LL | fn f<'a>(x: &'a mut dyn Iterator>) -> Option< | ++++ ++ ~~ ~~ error: associated type bounds are not allowed in `dyn` types - --> $DIR/elision.rs:5:27 + --> $DIR/elision.rs:4:27 | LL | fn f(x: &mut dyn Iterator>) -> Option<&'_ ()> { x.next() } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs b/tests/ui/associated-type-bounds/entails-sized-object-safety.rs index 211c67061e669..ad2cbe4820981 100644 --- a/tests/ui/associated-type-bounds/entails-sized-object-safety.rs +++ b/tests/ui/associated-type-bounds/entails-sized-object-safety.rs @@ -1,7 +1,5 @@ //@ build-pass (FIXME(62277): could be check-pass?) -#![feature(associated_type_bounds)] - trait Tr1: Sized { type As1; } trait Tr2<'a>: Sized { type As2; } diff --git a/tests/ui/associated-type-bounds/enum-bounds.rs b/tests/ui/associated-type-bounds/enum-bounds.rs index b5087acb6b8ea..b1c42610862c0 100644 --- a/tests/ui/associated-type-bounds/enum-bounds.rs +++ b/tests/ui/associated-type-bounds/enum-bounds.rs @@ -1,6 +1,5 @@ //@ run-pass -#![feature(associated_type_bounds)] #![allow(dead_code)] trait Tr1 { type As1; } diff --git a/tests/ui/associated-type-bounds/fn-apit.rs b/tests/ui/associated-type-bounds/fn-apit.rs index 8e1897cc3d457..24bb5b93c9922 100644 --- a/tests/ui/associated-type-bounds/fn-apit.rs +++ b/tests/ui/associated-type-bounds/fn-apit.rs @@ -2,8 +2,6 @@ //@ aux-build:fn-aux.rs #![allow(unused)] -#![feature(associated_type_bounds)] - extern crate fn_aux; use fn_aux::*; diff --git a/tests/ui/associated-type-bounds/fn-aux.rs b/tests/ui/associated-type-bounds/fn-aux.rs index 6aaa0cc895fe4..26ba2cc40158a 100644 --- a/tests/ui/associated-type-bounds/fn-aux.rs +++ b/tests/ui/associated-type-bounds/fn-aux.rs @@ -1,8 +1,6 @@ //@ run-pass //@ aux-build:fn-aux.rs -#![feature(associated_type_bounds)] - extern crate fn_aux; use fn_aux::*; diff --git a/tests/ui/associated-type-bounds/fn-inline.rs b/tests/ui/associated-type-bounds/fn-inline.rs index 8435cb44a9a4f..971751cc115ff 100644 --- a/tests/ui/associated-type-bounds/fn-inline.rs +++ b/tests/ui/associated-type-bounds/fn-inline.rs @@ -2,8 +2,6 @@ //@ aux-build:fn-aux.rs #![allow(unused)] -#![feature(associated_type_bounds)] - extern crate fn_aux; use fn_aux::*; diff --git a/tests/ui/associated-type-bounds/fn-where.rs b/tests/ui/associated-type-bounds/fn-where.rs index 3b6b557fb113e..d28860bd4ccd0 100644 --- a/tests/ui/associated-type-bounds/fn-where.rs +++ b/tests/ui/associated-type-bounds/fn-where.rs @@ -2,8 +2,6 @@ //@ aux-build:fn-aux.rs #![allow(unused)] -#![feature(associated_type_bounds)] - extern crate fn_aux; use fn_aux::*; diff --git a/tests/ui/associated-type-bounds/fn-wrap-apit.rs b/tests/ui/associated-type-bounds/fn-wrap-apit.rs index 4ce714d432f35..7b55cd33b249c 100644 --- a/tests/ui/associated-type-bounds/fn-wrap-apit.rs +++ b/tests/ui/associated-type-bounds/fn-wrap-apit.rs @@ -1,7 +1,6 @@ //@ run-pass //@ aux-build:fn-aux.rs -#![feature(associated_type_bounds)] #![allow(dead_code)] extern crate fn_aux; diff --git a/tests/ui/associated-type-bounds/higher-ranked.rs b/tests/ui/associated-type-bounds/higher-ranked.rs index 9e783c4bdcae3..a313b54f5b9ca 100644 --- a/tests/ui/associated-type-bounds/higher-ranked.rs +++ b/tests/ui/associated-type-bounds/higher-ranked.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait A<'a> { type Assoc: ?Sized; } diff --git a/tests/ui/associated-type-bounds/hrtb.rs b/tests/ui/associated-type-bounds/hrtb.rs index 73c7a1a56777c..1bf574f2e6518 100644 --- a/tests/ui/associated-type-bounds/hrtb.rs +++ b/tests/ui/associated-type-bounds/hrtb.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait A<'a> {} trait B<'b> {} fn foo() diff --git a/tests/ui/associated-type-bounds/implied-bounds-cycle.rs b/tests/ui/associated-type-bounds/implied-bounds-cycle.rs index 785d47d479148..8f2bec889eac5 100644 --- a/tests/ui/associated-type-bounds/implied-bounds-cycle.rs +++ b/tests/ui/associated-type-bounds/implied-bounds-cycle.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - trait A { type T; } diff --git a/tests/ui/associated-type-bounds/implied-bounds-cycle.stderr b/tests/ui/associated-type-bounds/implied-bounds-cycle.stderr index 1c1c64ea5f5ec..9ced743121001 100644 --- a/tests/ui/associated-type-bounds/implied-bounds-cycle.stderr +++ b/tests/ui/associated-type-bounds/implied-bounds-cycle.stderr @@ -1,12 +1,12 @@ error[E0391]: cycle detected when computing the implied predicates of `B` - --> $DIR/implied-bounds-cycle.rs:7:15 + --> $DIR/implied-bounds-cycle.rs:5:15 | LL | trait B: A {} | ^ | = note: ...which immediately requires computing the implied predicates of `B` again note: cycle used when computing normalized predicates of `B` - --> $DIR/implied-bounds-cycle.rs:7:1 + --> $DIR/implied-bounds-cycle.rs:5:1 | LL | trait B: A {} | ^^^^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/implied-in-supertrait.rs b/tests/ui/associated-type-bounds/implied-in-supertrait.rs index 83cb07d700ac8..639eb8dc6db1f 100644 --- a/tests/ui/associated-type-bounds/implied-in-supertrait.rs +++ b/tests/ui/associated-type-bounds/implied-in-supertrait.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait Trait: Super {} trait Super { diff --git a/tests/ui/associated-type-bounds/implied-region-constraints.rs b/tests/ui/associated-type-bounds/implied-region-constraints.rs index 38219da61b4ec..ab03376c07620 100644 --- a/tests/ui/associated-type-bounds/implied-region-constraints.rs +++ b/tests/ui/associated-type-bounds/implied-region-constraints.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - trait Tr1 { type As1; } trait Tr2 { type As2; } diff --git a/tests/ui/associated-type-bounds/implied-region-constraints.stderr b/tests/ui/associated-type-bounds/implied-region-constraints.stderr index cddce8777eab7..0aa76f732e4c4 100644 --- a/tests/ui/associated-type-bounds/implied-region-constraints.stderr +++ b/tests/ui/associated-type-bounds/implied-region-constraints.stderr @@ -1,5 +1,5 @@ error: lifetime may not live long enough - --> $DIR/implied-region-constraints.rs:17:56 + --> $DIR/implied-region-constraints.rs:15:56 | LL | fn _bad_st<'a, 'b, T>(x: St<'a, 'b, T>) | -- -- lifetime `'b` defined here @@ -12,7 +12,7 @@ LL | let _failure_proves_not_implied_outlives_region_b: &'b T = &x.f0; = help: consider adding the following bound: `'a: 'b` error: lifetime may not live long enough - --> $DIR/implied-region-constraints.rs:38:64 + --> $DIR/implied-region-constraints.rs:36:64 | LL | fn _bad_en7<'a, 'b, T>(x: En7<'a, 'b, T>) | -- -- lifetime `'b` defined here diff --git a/tests/ui/associated-type-bounds/inside-adt.rs b/tests/ui/associated-type-bounds/inside-adt.rs index 2b4b060983e03..bf520d7ee381a 100644 --- a/tests/ui/associated-type-bounds/inside-adt.rs +++ b/tests/ui/associated-type-bounds/inside-adt.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - use std::mem::ManuallyDrop; struct S1 { f: dyn Iterator } diff --git a/tests/ui/associated-type-bounds/inside-adt.stderr b/tests/ui/associated-type-bounds/inside-adt.stderr index ef45fae8f2a1c..ff9e258526491 100644 --- a/tests/ui/associated-type-bounds/inside-adt.stderr +++ b/tests/ui/associated-type-bounds/inside-adt.stderr @@ -1,53 +1,53 @@ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:5:29 + --> $DIR/inside-adt.rs:3:29 | LL | struct S1 { f: dyn Iterator } | ^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:7:33 + --> $DIR/inside-adt.rs:5:33 | LL | struct S2 { f: Box> } | ^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:9:29 + --> $DIR/inside-adt.rs:7:29 | LL | struct S3 { f: dyn Iterator } | ^^^^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:12:26 + --> $DIR/inside-adt.rs:10:26 | LL | enum E1 { V(dyn Iterator) } | ^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:14:30 + --> $DIR/inside-adt.rs:12:30 | LL | enum E2 { V(Box>) } | ^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:16:26 + --> $DIR/inside-adt.rs:14:26 | LL | enum E3 { V(dyn Iterator) } | ^^^^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:19:41 + --> $DIR/inside-adt.rs:17:41 | LL | union U1 { f: ManuallyDrop> } | ^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:21:45 + --> $DIR/inside-adt.rs:19:45 | LL | union U2 { f: ManuallyDrop>> } | ^^^^^^^^^^ error: associated type bounds are not allowed in `dyn` types - --> $DIR/inside-adt.rs:23:41 + --> $DIR/inside-adt.rs:21:41 | LL | union U3 { f: ManuallyDrop> } | ^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/issue-104916.rs b/tests/ui/associated-type-bounds/issue-104916.rs index ee29a0a2fc491..75f327e6ee79e 100644 --- a/tests/ui/associated-type-bounds/issue-104916.rs +++ b/tests/ui/associated-type-bounds/issue-104916.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - trait B { type AssocType; } diff --git a/tests/ui/associated-type-bounds/issue-104916.stderr b/tests/ui/associated-type-bounds/issue-104916.stderr index e8618b7210369..21927328dad0c 100644 --- a/tests/ui/associated-type-bounds/issue-104916.stderr +++ b/tests/ui/associated-type-bounds/issue-104916.stderr @@ -1,5 +1,5 @@ error: associated type bounds are not allowed in `dyn` types - --> $DIR/issue-104916.rs:9:19 + --> $DIR/issue-104916.rs:7:19 | LL | dyn for<'j> B:, | ^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/issue-61752.rs b/tests/ui/associated-type-bounds/issue-61752.rs index 22e43ea875e3e..a73ba833c43e8 100644 --- a/tests/ui/associated-type-bounds/issue-61752.rs +++ b/tests/ui/associated-type-bounds/issue-61752.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait Foo { type Bar; } diff --git a/tests/ui/associated-type-bounds/issue-70292.rs b/tests/ui/associated-type-bounds/issue-70292.rs index 4b8e19904d03b..1a6bdcd1a31f6 100644 --- a/tests/ui/associated-type-bounds/issue-70292.rs +++ b/tests/ui/associated-type-bounds/issue-70292.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - fn foo(_: F) where F: for<'a> Trait, diff --git a/tests/ui/associated-type-bounds/issue-71443-1.rs b/tests/ui/associated-type-bounds/issue-71443-1.rs index 5d2a3e6cbad12..58341ac3d3a82 100644 --- a/tests/ui/associated-type-bounds/issue-71443-1.rs +++ b/tests/ui/associated-type-bounds/issue-71443-1.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - struct Incorrect; fn hello Iterator>() { diff --git a/tests/ui/associated-type-bounds/issue-71443-1.stderr b/tests/ui/associated-type-bounds/issue-71443-1.stderr index 6abaaf8e182be..27ef545daaa5c 100644 --- a/tests/ui/associated-type-bounds/issue-71443-1.stderr +++ b/tests/ui/associated-type-bounds/issue-71443-1.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/issue-71443-1.rs:6:5 + --> $DIR/issue-71443-1.rs:4:5 | LL | fn hello Iterator>() { | - help: try adding a return type: `-> Incorrect` diff --git a/tests/ui/associated-type-bounds/issue-71443-2.rs b/tests/ui/associated-type-bounds/issue-71443-2.rs index bd072f4465002..24c4c88f20bd9 100644 --- a/tests/ui/associated-type-bounds/issue-71443-2.rs +++ b/tests/ui/associated-type-bounds/issue-71443-2.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - fn hello<'b, F>() where for<'a> F: Iterator + 'b, diff --git a/tests/ui/associated-type-bounds/issue-79949.rs b/tests/ui/associated-type-bounds/issue-79949.rs index 4513f0a0b6296..9f4a8ffa7e789 100644 --- a/tests/ui/associated-type-bounds/issue-79949.rs +++ b/tests/ui/associated-type-bounds/issue-79949.rs @@ -1,8 +1,6 @@ //@ check-pass #![allow(incomplete_features)] -#![feature(associated_type_bounds)] - trait MP { type T<'a>; } diff --git a/tests/ui/associated-type-bounds/issue-81193.rs b/tests/ui/associated-type-bounds/issue-81193.rs index 1247f835be979..caa5915819b99 100644 --- a/tests/ui/associated-type-bounds/issue-81193.rs +++ b/tests/ui/associated-type-bounds/issue-81193.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait A<'a, 'b> {} trait B<'a, 'b, 'c> {} diff --git a/tests/ui/associated-type-bounds/issue-83017.rs b/tests/ui/associated-type-bounds/issue-83017.rs index a059b940e66b5..932b71cc0ae77 100644 --- a/tests/ui/associated-type-bounds/issue-83017.rs +++ b/tests/ui/associated-type-bounds/issue-83017.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait TraitA<'a> { type AsA; } diff --git a/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs b/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs index ee4de509da6c9..305c117da6216 100644 --- a/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs +++ b/tests/ui/associated-type-bounds/nested-bounds-dont-eliminate-alias-bounds.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait Trait1 { type Assoc1: Bar; diff --git a/tests/ui/associated-type-bounds/no-gat-position.rs b/tests/ui/associated-type-bounds/no-gat-position.rs index 01740e6242e98..5005c5027f420 100644 --- a/tests/ui/associated-type-bounds/no-gat-position.rs +++ b/tests/ui/associated-type-bounds/no-gat-position.rs @@ -1,5 +1,3 @@ -#![feature(associated_type_bounds)] - // Test for . pub trait Iter { diff --git a/tests/ui/associated-type-bounds/no-gat-position.stderr b/tests/ui/associated-type-bounds/no-gat-position.stderr index 5692b2c7d0902..c348d33c3a9a3 100644 --- a/tests/ui/associated-type-bounds/no-gat-position.stderr +++ b/tests/ui/associated-type-bounds/no-gat-position.stderr @@ -1,5 +1,5 @@ error[E0229]: associated type bindings are not allowed here - --> $DIR/no-gat-position.rs:8:56 + --> $DIR/no-gat-position.rs:6:56 | LL | fn next<'a>(&'a mut self) -> Option>; | ^^^^^^^^^ associated type not allowed here diff --git a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.rs b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.rs index 3853bc8594fad..c0012564843fb 100644 --- a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.rs +++ b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.rs @@ -1,5 +1,4 @@ #![allow(bare_trait_objects)] -#![feature(associated_type_bounds)] trait Item { type Core; } diff --git a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr index 03d72f2ae2c6e..39a2b98e2e2d1 100644 --- a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr +++ b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr @@ -1,11 +1,11 @@ error[E0191]: the value of the associated types `Item` and `IntoIter` in `IntoIterator` must be specified - --> $DIR/overlaping-bound-suggestion.rs:7:13 + --> $DIR/overlaping-bound-suggestion.rs:6:13 | LL | inner: >::IntoIterator as Item>::Core, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated types: `IntoIterator, Item = Type, IntoIter = Type>` error[E0223]: ambiguous associated type - --> $DIR/overlaping-bound-suggestion.rs:7:13 + --> $DIR/overlaping-bound-suggestion.rs:6:13 | LL | inner: >::IntoIterator as Item>::Core, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs index 50a8cd8e04b2c..c23eff79ce2e5 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs @@ -9,11 +9,9 @@ trait Trait { fn foo>() {} //~^ ERROR argument types not allowed with return type notation -//~| ERROR associated type bounds are unstable fn bar (): Send>>() {} //~^ ERROR return type not allowed with return type notation -//~| ERROR associated type bounds are unstable fn baz>() {} //~^ ERROR return type notation uses `()` instead of `(..)` for elided arguments diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr index 02bec24c628de..d95249efe4049 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr +++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr @@ -1,29 +1,9 @@ error: return type notation uses `()` instead of `(..)` for elided arguments - --> $DIR/bad-inputs-and-output.rs:18:24 + --> $DIR/bad-inputs-and-output.rs:16:24 | LL | fn baz>() {} | ^^ help: remove the `..` -error[E0658]: associated type bounds are unstable - --> $DIR/bad-inputs-and-output.rs:10:17 - | -LL | fn foo>() {} - | ^^^^^^^^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/bad-inputs-and-output.rs:14:17 - | -LL | fn bar (): Send>>() {} - | ^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/bad-inputs-and-output.rs:3:12 | @@ -40,11 +20,10 @@ LL | fn foo>() {} | ^^^^^ help: remove the input types: `()` error: return type not allowed with return type notation - --> $DIR/bad-inputs-and-output.rs:14:25 + --> $DIR/bad-inputs-and-output.rs:13:25 | LL | fn bar (): Send>>() {} | ^^^^^^ help: remove the return type -error: aborting due to 5 previous errors; 1 warning emitted +error: aborting due to 3 previous errors; 1 warning emitted -For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs index 0a98f0d2c8d10..931e41bc84034 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.rs @@ -1,11 +1,14 @@ //@ edition: 2021 //@ compile-flags: -Zunpretty=expanded +//@ check-pass + +// NOTE: This is not considered RTN syntax currently. +// This is simply parenthesized generics. trait Trait { async fn method() {} } fn foo>() {} -//~^ ERROR associated type bounds are unstable fn main() {} diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr deleted file mode 100644 index 3007240c3ab62..0000000000000 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0658]: associated type bounds are unstable - --> $DIR/unpretty-parenthesized.rs:8:17 - | -LL | fn foo>() {} - | ^^^^^^^^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 1 previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout index 17c3b9580ca85..87667553837f5 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout +++ b/tests/ui/associated-type-bounds/return-type-notation/unpretty-parenthesized.stdout @@ -5,6 +5,10 @@ use std::prelude::rust_2021::*; extern crate std; //@ edition: 2021 //@ compile-flags: -Zunpretty=expanded +//@ check-pass + +// NOTE: This is not considered RTN syntax currently. +// This is simply parenthesized generics. trait Trait { async fn method() {} diff --git a/tests/ui/associated-type-bounds/rpit.rs b/tests/ui/associated-type-bounds/rpit.rs index 78710621caded..cb1d7f8fcc715 100644 --- a/tests/ui/associated-type-bounds/rpit.rs +++ b/tests/ui/associated-type-bounds/rpit.rs @@ -1,7 +1,5 @@ //@ run-pass -#![feature(associated_type_bounds)] - use std::ops::Add; trait Tr1 { type As1; fn mk(self) -> Self::As1; } diff --git a/tests/ui/associated-type-bounds/rpit.stderr b/tests/ui/associated-type-bounds/rpit.stderr index 76bd75bd2cab3..1091a4c573b02 100644 --- a/tests/ui/associated-type-bounds/rpit.stderr +++ b/tests/ui/associated-type-bounds/rpit.stderr @@ -1,5 +1,5 @@ warning: method `tr2` is never used - --> $DIR/rpit.rs:8:20 + --> $DIR/rpit.rs:6:20 | LL | trait Tr2<'a> { fn tr2(self) -> &'a Self; } | --- ^^^ diff --git a/tests/ui/associated-type-bounds/struct-bounds.rs b/tests/ui/associated-type-bounds/struct-bounds.rs index 2c46832cb99a4..0c8a52539f3b4 100644 --- a/tests/ui/associated-type-bounds/struct-bounds.rs +++ b/tests/ui/associated-type-bounds/struct-bounds.rs @@ -1,8 +1,6 @@ //@ run-pass #![allow(unused)] -#![feature(associated_type_bounds)] - trait Tr1 { type As1; } trait Tr2 { type As2; } trait Tr3 {} diff --git a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs index 62b23b5fbab85..ed1c1fa6f039a 100644 --- a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs +++ b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs @@ -3,8 +3,6 @@ // Make sure that we don't look into associated type bounds when looking for // supertraits that define an associated type. Fixes #76593. -#![feature(associated_type_bounds)] - trait Load: Sized { type Blob; } diff --git a/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs b/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs index 6ca9f80ccaff1..fb6a4fcbe9768 100644 --- a/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs +++ b/tests/ui/associated-type-bounds/trait-alias-impl-trait.rs @@ -1,7 +1,6 @@ //@ run-pass #![allow(dead_code)] -#![feature(associated_type_bounds)] #![feature(type_alias_impl_trait)] use std::ops::Add; diff --git a/tests/ui/associated-type-bounds/trait-params.rs b/tests/ui/associated-type-bounds/trait-params.rs index 6782d68812627..72a445351e760 100644 --- a/tests/ui/associated-type-bounds/trait-params.rs +++ b/tests/ui/associated-type-bounds/trait-params.rs @@ -1,7 +1,5 @@ //@ build-pass (FIXME(62277): could be check-pass?) -#![feature(associated_type_bounds)] - use std::iter::Once; use std::ops::Range; diff --git a/tests/ui/associated-type-bounds/type-alias.rs b/tests/ui/associated-type-bounds/type-alias.rs index 819a7656a4429..2dccb37f37fac 100644 --- a/tests/ui/associated-type-bounds/type-alias.rs +++ b/tests/ui/associated-type-bounds/type-alias.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - type _TaWhere1 where T: Iterator = T; //~ WARNING type_alias_bounds type _TaWhere2 where T: Iterator = T; //~ WARNING type_alias_bounds type _TaWhere3 where T: Iterator = T; //~ WARNING type_alias_bounds diff --git a/tests/ui/associated-type-bounds/type-alias.stderr b/tests/ui/associated-type-bounds/type-alias.stderr index c22b80b889edc..072c471467c77 100644 --- a/tests/ui/associated-type-bounds/type-alias.stderr +++ b/tests/ui/associated-type-bounds/type-alias.stderr @@ -1,5 +1,5 @@ warning: where clauses are not enforced in type aliases - --> $DIR/type-alias.rs:5:25 + --> $DIR/type-alias.rs:3:25 | LL | type _TaWhere1 where T: Iterator = T; | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -12,7 +12,7 @@ LL + type _TaWhere1 = T; | warning: where clauses are not enforced in type aliases - --> $DIR/type-alias.rs:6:25 + --> $DIR/type-alias.rs:4:25 | LL | type _TaWhere2 where T: Iterator = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -24,7 +24,7 @@ LL + type _TaWhere2 = T; | warning: where clauses are not enforced in type aliases - --> $DIR/type-alias.rs:7:25 + --> $DIR/type-alias.rs:5:25 | LL | type _TaWhere3 where T: Iterator = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -36,7 +36,7 @@ LL + type _TaWhere3 = T; | warning: where clauses are not enforced in type aliases - --> $DIR/type-alias.rs:8:25 + --> $DIR/type-alias.rs:6:25 | LL | type _TaWhere4 where T: Iterator = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -48,7 +48,7 @@ LL + type _TaWhere4 = T; | warning: where clauses are not enforced in type aliases - --> $DIR/type-alias.rs:9:25 + --> $DIR/type-alias.rs:7:25 | LL | type _TaWhere5 where T: Iterator Into<&'a u8>> = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -60,7 +60,7 @@ LL + type _TaWhere5 = T; | warning: where clauses are not enforced in type aliases - --> $DIR/type-alias.rs:10:25 + --> $DIR/type-alias.rs:8:25 | LL | type _TaWhere6 where T: Iterator> = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -72,7 +72,7 @@ LL + type _TaWhere6 = T; | warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/type-alias.rs:12:20 + --> $DIR/type-alias.rs:10:20 | LL | type _TaInline1> = T; | ^^^^^^^^^^^^^^^^^^^^ @@ -84,7 +84,7 @@ LL + type _TaInline1 = T; | warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/type-alias.rs:13:20 + --> $DIR/type-alias.rs:11:20 | LL | type _TaInline2> = T; | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -96,7 +96,7 @@ LL + type _TaInline2 = T; | warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/type-alias.rs:14:20 + --> $DIR/type-alias.rs:12:20 | LL | type _TaInline3> = T; | ^^^^^^^^^^^^^^^^^^^^^^^ @@ -108,7 +108,7 @@ LL + type _TaInline3 = T; | warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/type-alias.rs:15:20 + --> $DIR/type-alias.rs:13:20 | LL | type _TaInline4> = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -120,7 +120,7 @@ LL + type _TaInline4 = T; | warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/type-alias.rs:16:20 + --> $DIR/type-alias.rs:14:20 | LL | type _TaInline5 Into<&'a u8>>> = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -132,7 +132,7 @@ LL + type _TaInline5 = T; | warning: bounds on generic parameters are not enforced in type aliases - --> $DIR/type-alias.rs:17:20 + --> $DIR/type-alias.rs:15:20 | LL | type _TaInline6>> = T; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/ui/associated-type-bounds/union-bounds.rs b/tests/ui/associated-type-bounds/union-bounds.rs index 8a7ba6f5ebf90..b9b92a96fb009 100644 --- a/tests/ui/associated-type-bounds/union-bounds.rs +++ b/tests/ui/associated-type-bounds/union-bounds.rs @@ -1,7 +1,5 @@ //@ run-pass -#![feature(associated_type_bounds)] - #![allow(unused_assignments)] trait Tr1: Copy { type As1: Copy; } diff --git a/tests/ui/associated-types/issue-63591.rs b/tests/ui/associated-types/issue-63591.rs index 33826a24ddb9a..52464d94a2301 100644 --- a/tests/ui/associated-types/issue-63591.rs +++ b/tests/ui/associated-types/issue-63591.rs @@ -1,6 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] #![feature(impl_trait_in_assoc_type)] fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs b/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs deleted file mode 100644 index 717da41f8713d..0000000000000 --- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.rs +++ /dev/null @@ -1,61 +0,0 @@ -use std::mem::ManuallyDrop; - -trait Tr1 { type As1: Copy; } -trait Tr2 { type As2: Copy; } - -struct S1; -#[derive(Copy, Clone)] -struct S2; -impl Tr1 for S1 { type As1 = S2; } - -trait _Tr3 { - type A: Iterator; - //~^ ERROR associated type bounds are unstable - - type B: Iterator; - //~^ ERROR associated type bounds are unstable -} - -struct _St1> { -//~^ ERROR associated type bounds are unstable - outest: T, - outer: T::As1, - inner: ::As2, -} - -enum _En1> { -//~^ ERROR associated type bounds are unstable - Outest(T), - Outer(T::As1), - Inner(::As2), -} - -union _Un1> { -//~^ ERROR associated type bounds are unstable - outest: ManuallyDrop, - outer: ManuallyDrop, - inner: ManuallyDrop<::As2>, -} - -type _TaWhere1 where T: Iterator = T; -//~^ ERROR associated type bounds are unstable - -fn _apit(_: impl Tr1) {} -//~^ ERROR associated type bounds are unstable - -fn _rpit() -> impl Tr1 { S1 } -//~^ ERROR associated type bounds are unstable - -const _cdef: impl Tr1 = S1; -//~^ ERROR associated type bounds are unstable -//~| ERROR `impl Trait` is not allowed in const types - -static _sdef: impl Tr1 = S1; -//~^ ERROR associated type bounds are unstable -//~| ERROR `impl Trait` is not allowed in static types - -fn main() { - let _: impl Tr1 = S1; - //~^ ERROR associated type bounds are unstable - //~| ERROR `impl Trait` is not allowed in the type of variable bindings -} diff --git a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr b/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr deleted file mode 100644 index 1838eab5cda5f..0000000000000 --- a/tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr +++ /dev/null @@ -1,138 +0,0 @@ -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:12:22 - | -LL | type A: Iterator; - | ^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:15:22 - | -LL | type B: Iterator; - | ^^^^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:19:20 - | -LL | struct _St1> { - | ^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:26:18 - | -LL | enum _En1> { - | ^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:33:19 - | -LL | union _Un1> { - | ^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:40:37 - | -LL | type _TaWhere1 where T: Iterator = T; - | ^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:43:22 - | -LL | fn _apit(_: impl Tr1) {} - | ^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:46:24 - | -LL | fn _rpit() -> impl Tr1 { S1 } - | ^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:49:23 - | -LL | const _cdef: impl Tr1 = S1; - | ^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:53:24 - | -LL | static _sdef: impl Tr1 = S1; - | ^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: associated type bounds are unstable - --> $DIR/feature-gate-associated_type_bounds.rs:58:21 - | -LL | let _: impl Tr1 = S1; - | ^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0562]: `impl Trait` is not allowed in const types - --> $DIR/feature-gate-associated_type_bounds.rs:49:14 - | -LL | const _cdef: impl Tr1 = S1; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `impl Trait` is only allowed in arguments and return types of functions and methods - -error[E0562]: `impl Trait` is not allowed in static types - --> $DIR/feature-gate-associated_type_bounds.rs:53:15 - | -LL | static _sdef: impl Tr1 = S1; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `impl Trait` is only allowed in arguments and return types of functions and methods - -error[E0562]: `impl Trait` is not allowed in the type of variable bindings - --> $DIR/feature-gate-associated_type_bounds.rs:58:12 - | -LL | let _: impl Tr1 = S1; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `impl Trait` is only allowed in arguments and return types of functions and methods - -error: aborting due to 14 previous errors - -Some errors have detailed explanations: E0562, E0658. -For more information about an error, try `rustc --explain E0562`. diff --git a/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs b/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs index e0d4f461974f8..b29d71437b986 100644 --- a/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs +++ b/tests/ui/impl-trait/in-trait/lifetime-in-associated-trait-bound.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(associated_type_bounds)] - trait Trait { type Type; diff --git a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs index 6566d8a11154c..ed3ffed2f8026 100644 --- a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs +++ b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.rs @@ -3,11 +3,7 @@ #[cfg(FALSE)] fn syntax() { foo::(); - //~^ WARN associated type bounds are unstable - //~| WARN unstable syntax foo::(); - //~^ WARN associated type bounds are unstable - //~| WARN unstable syntax } fn main() {} diff --git a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr b/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr deleted file mode 100644 index 393ed704b4197..0000000000000 --- a/tests/ui/parser/constraints-before-generic-args-syntactic-pass.stderr +++ /dev/null @@ -1,26 +0,0 @@ -warning: associated type bounds are unstable - --> $DIR/constraints-before-generic-args-syntactic-pass.rs:5:19 - | -LL | foo::(); - | ^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = warning: unstable syntax can change at any point in the future, causing a hard error! - = note: for more information, see issue #65860 - -warning: associated type bounds are unstable - --> $DIR/constraints-before-generic-args-syntactic-pass.rs:8:23 - | -LL | foo::(); - | ^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - = warning: unstable syntax can change at any point in the future, causing a hard error! - = note: for more information, see issue #65860 - -warning: 2 warnings emitted - diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs index 91f1b90bdc046..51dfe29b8290a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.rs @@ -3,7 +3,6 @@ #![allow(incomplete_features)] #![feature( - associated_type_bounds, const_trait_impl, effects, const_cmp, diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr index d4be71f2f4661..03038eb5c84ad 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr @@ -1,5 +1,5 @@ error[E0277]: can't compare `()` with `()` - --> $DIR/const-impl-trait.rs:37:17 + --> $DIR/const-impl-trait.rs:36:17 | LL | assert!(cmp(&())); | --- ^^^ no implementation for `() == ()` @@ -9,13 +9,13 @@ LL | assert!(cmp(&())); = help: the trait `const PartialEq` is not implemented for `()` = help: the trait `PartialEq` is implemented for `()` note: required by a bound in `cmp` - --> $DIR/const-impl-trait.rs:14:23 + --> $DIR/const-impl-trait.rs:13:23 | LL | const fn cmp(a: &impl ~const PartialEq) -> bool { | ^^^^^^^^^^^^^^^^ required by this bound in `cmp` error[E0369]: binary operation `==` cannot be applied to type `&impl ~const PartialEq` - --> $DIR/const-impl-trait.rs:15:7 + --> $DIR/const-impl-trait.rs:14:7 | LL | a == a | - ^^ - &impl ~const PartialEq diff --git a/tests/ui/suggestions/missing-assoc-fn.rs b/tests/ui/suggestions/missing-assoc-fn.rs index 9af8e5a939d65..260d3b33e2829 100644 --- a/tests/ui/suggestions/missing-assoc-fn.rs +++ b/tests/ui/suggestions/missing-assoc-fn.rs @@ -6,7 +6,7 @@ trait TraitA { fn foo>(_: T) -> Self; fn bar(_: T) -> Self; fn baz(_: T) -> Self where T: TraitB, ::Item: Copy; - fn bat>(_: T) -> Self; //~ ERROR associated type bounds are unstable + fn bat>(_: T) -> Self; } struct S; diff --git a/tests/ui/suggestions/missing-assoc-fn.stderr b/tests/ui/suggestions/missing-assoc-fn.stderr index 61a5492d583d4..d819f7e8bd2c4 100644 --- a/tests/ui/suggestions/missing-assoc-fn.stderr +++ b/tests/ui/suggestions/missing-assoc-fn.stderr @@ -1,13 +1,3 @@ -error[E0658]: associated type bounds are unstable - --> $DIR/missing-assoc-fn.rs:9:22 - | -LL | fn bat>(_: T) -> Self; - | ^^^^^^^^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - error[E0046]: not all trait items implemented, missing: `foo`, `bar`, `baz`, `bat` --> $DIR/missing-assoc-fn.rs:14:1 | @@ -31,7 +21,6 @@ LL | impl FromIterator<()> for X { | = help: implement the missing item: `fn from_iter>(_: T) -> Self { todo!() }` -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0046, E0658. -For more information about an error, try `rustc --explain E0046`. +For more information about this error, try `rustc --explain E0046`. diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs index 48d19f6dd4e3f..c98eec4af01c5 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs +++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.rs @@ -6,8 +6,6 @@ fn main() { let _: Vec = A::B; //~^ ERROR cannot find trait `B` in this scope //~| HELP you might have meant to write a path instead of an associated type bound - //~| ERROR associated type bounds are unstable - //~| HELP add `#![feature(associated_type_bounds)]` to the crate attributes to enable //~| ERROR struct takes at least 1 generic argument but 0 generic arguments were supplied //~| HELP add missing generic argument //~| ERROR associated type bindings are not allowed here diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr index 9c22873e79c0c..834c141ec3e1a 100644 --- a/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr +++ b/tests/ui/suggestions/type-ascription-instead-of-path-in-type.stderr @@ -9,16 +9,6 @@ help: you might have meant to write a path instead of an associated type bound LL | let _: Vec = A::B; | ~~ -error[E0658]: associated type bounds are unstable - --> $DIR/type-ascription-instead-of-path-in-type.rs:6:16 - | -LL | let _: Vec = A::B; - | ^^^ - | - = note: see issue #52662 for more information - = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - error[E0107]: struct takes at least 1 generic argument but 0 generic arguments were supplied --> $DIR/type-ascription-instead-of-path-in-type.rs:6:12 | @@ -36,7 +26,7 @@ error[E0229]: associated type bindings are not allowed here LL | let _: Vec = A::B; | ^^^ associated type not allowed here -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors -Some errors have detailed explanations: E0107, E0229, E0405, E0658. +Some errors have detailed explanations: E0107, E0229, E0405. For more information about an error, try `rustc --explain E0107`. diff --git a/tests/ui/traits/negative-bounds/associated-constraints.rs b/tests/ui/traits/negative-bounds/associated-constraints.rs index 4a7132ccde917..795e68bb46950 100644 --- a/tests/ui/traits/negative-bounds/associated-constraints.rs +++ b/tests/ui/traits/negative-bounds/associated-constraints.rs @@ -1,4 +1,4 @@ -#![feature(negative_bounds, associated_type_bounds)] +#![feature(negative_bounds)] trait Trait { type Assoc;