Skip to content

Stabilize associated type bounds (RFC 2289) #122055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
8 changes: 0 additions & 8 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -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<Assoc(): Sized>`, which is RTN syntax now,
// used to be gated under associated_type_bounds, which are right above, so RTN needs to
// be too.
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
4 changes: 0 additions & 4 deletions compiler/rustc_error_codes/src/error_codes/E0719.md
Original file line number Diff line number Diff line change
@@ -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 {}
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
@@ -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 `<expr>.await` expressions.
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
@@ -351,8 +351,6 @@ declare_features! (
(unstable, asm_unwind, "1.58.0", Some(93334)),
/// Allows users to enforce equality of associated constants `TraitImpl<AssocConst=3>`.
(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.
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion compiler/rustc_mir_build/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 0 additions & 2 deletions compiler/rustc_parse/src/parser/path.rs
Original file line number Diff line number Diff line change
@@ -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 =
2 changes: 1 addition & 1 deletion compiler/rustc_serialize/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion compiler/rustc_trait_selection/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
Original file line number Diff line number Diff line change
@@ -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: Trait>(t: T) where <T as Trait>::A: Bound`.
// FIXME: once `#![feature(associated_type_bounds)]` is stabilized, we should suggest
// `fn foo(t: impl Trait<A: Bound>)` instead.
// FIXME: we should suggest `fn foo(t: impl Trait<A: Bound>)` instead.
err.multipart_suggestion(
"introduce a type parameter with a trait bound instead of using `impl Trait`",
sugg,
2 changes: 1 addition & 1 deletion library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion library/alloc/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -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)]
2 changes: 1 addition & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -202,14 +202,14 @@
//
// 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)]
#![feature(adt_const_params)]
#![feature(allow_internal_unsafe)]
#![feature(allow_internal_unstable)]
#![feature(asm_const)]
#![feature(associated_type_bounds)]
#![feature(auto_traits)]
#![feature(c_unwind)]
#![feature(cfg_sanitize)]
1 change: 0 additions & 1 deletion tests/rustdoc-ui/issues/issue-110900.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![crate_type="lib"]
#![feature(associated_type_bounds)]

trait A<'a> {}
trait B<'b> {}
1 change: 0 additions & 1 deletion tests/ui/associated-consts/issue-93835.rs
Original file line number Diff line number Diff line change
@@ -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() {}
12 changes: 1 addition & 11 deletions tests/ui/associated-consts/issue-93835.stderr
Original file line number Diff line number Diff line change
@@ -26,17 +26,7 @@ LL | type_ascribe!(p, a<p:p<e=6>>);
= 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<p:p<e=6>>);
| ^^^^^^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/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`.
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/ambiguous-associated-type.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

pub struct Flatten<I>
where
I: Iterator<Item: IntoIterator>,
Original file line number Diff line number Diff line change
@@ -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 {
Original file line number Diff line number Diff line change
@@ -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<dyn Bar<Assoc: Copy>>;
| ^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

use std::fmt::Debug;
use std::iter::Once;

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

trait B {
type AssocType;
}
Original file line number Diff line number Diff line change
@@ -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<AssocType: 'j>:,
| ^^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/bad-universal-in-impl-sig.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

trait Trait {
type Item;
}
Original file line number Diff line number Diff line change
@@ -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<Item: Trait2> {}
| ^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/bounds-on-assoc-in-trait.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

use std::fmt::Debug;
use std::iter::Empty;
use std::ops::Range;
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/consts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

pub fn accept(_: impl Trait<K: Copy>) {}
//~^ ERROR expected type, found constant

4 changes: 2 additions & 2 deletions tests/ui/associated-type-bounds/consts.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: expected type, found constant
--> $DIR/consts.rs:3:29
--> $DIR/consts.rs:1:29
|
LL | pub fn accept(_: impl Trait<K: Copy>) {}
| ^------ bounds are not allowed on associated constants
| |
| unexpected constant
|
note: the associated constant is defined here
--> $DIR/consts.rs:7:5
--> $DIR/consts.rs:5:5
|
LL | const K: i32;
| ^^^^^^^^^^^^
1 change: 0 additions & 1 deletion tests/ui/associated-type-bounds/duplicate.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(associated_type_bounds)]
#![feature(type_alias_impl_trait)]

use std::iter;
144 changes: 72 additions & 72 deletions tests/ui/associated-type-bounds/duplicate.stderr

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion tests/ui/associated-type-bounds/elision.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![feature(associated_type_bounds)]
#![feature(anonymous_lifetime_in_impl_trait)]

// The same thing should happen for constraints in dyn trait.
4 changes: 2 additions & 2 deletions tests/ui/associated-type-bounds/elision.stderr
Original file line number Diff line number Diff line change
@@ -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<Item: Iterator<Item = &'_ ()>>) -> Option<&'_ ()> { x.next() }
| ------------------------------------------------ ^^ expected named lifetime parameter
@@ -11,7 +11,7 @@ LL | fn f<'a>(x: &'a mut dyn Iterator<Item: Iterator<Item = &'a ()>>) -> 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<Item: Iterator<Item = &'_ ()>>) -> Option<&'_ ()> { x.next() }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -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; }

1 change: 0 additions & 1 deletion tests/ui/associated-type-bounds/enum-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ run-pass

#![feature(associated_type_bounds)]
#![allow(dead_code)]

trait Tr1 { type As1; }
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/fn-apit.rs
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
//@ aux-build:fn-aux.rs

#![allow(unused)]
#![feature(associated_type_bounds)]

extern crate fn_aux;

use fn_aux::*;
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/fn-aux.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ run-pass
//@ aux-build:fn-aux.rs

#![feature(associated_type_bounds)]

extern crate fn_aux;

use fn_aux::*;
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/fn-inline.rs
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
//@ aux-build:fn-aux.rs

#![allow(unused)]
#![feature(associated_type_bounds)]

extern crate fn_aux;

use fn_aux::*;
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/fn-where.rs
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
//@ aux-build:fn-aux.rs

#![allow(unused)]
#![feature(associated_type_bounds)]

extern crate fn_aux;

use fn_aux::*;
1 change: 0 additions & 1 deletion tests/ui/associated-type-bounds/fn-wrap-apit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ run-pass
//@ aux-build:fn-aux.rs

#![feature(associated_type_bounds)]
#![allow(dead_code)]

extern crate fn_aux;
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/higher-ranked.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait A<'a> {
type Assoc: ?Sized;
}
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/hrtb.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait A<'a> {}
trait B<'b> {}
fn foo<T>()
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/implied-bounds-cycle.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

trait A {
type T;
}
4 changes: 2 additions & 2 deletions tests/ui/associated-type-bounds/implied-bounds-cycle.stderr
Original file line number Diff line number Diff line change
@@ -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<T: B> {}
| ^
|
= 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<T: B> {}
| ^^^^^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/implied-in-supertrait.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait Trait: Super<Assoc: Bound> {}

trait Super {
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/implied-region-constraints.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

trait Tr1 { type As1; }
trait Tr2 { type As2; }

Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/inside-adt.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

use std::mem::ManuallyDrop;

struct S1 { f: dyn Iterator<Item: Copy> }
18 changes: 9 additions & 9 deletions tests/ui/associated-type-bounds/inside-adt.stderr
Original file line number Diff line number Diff line change
@@ -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<Item: Copy> }
| ^^^^^^^^^^

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<dyn Iterator<Item: Copy>> }
| ^^^^^^^^^^

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<Item: 'static> }
| ^^^^^^^^^^^^^

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<Item: Copy>) }
| ^^^^^^^^^^

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<dyn Iterator<Item: Copy>>) }
| ^^^^^^^^^^

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<Item: 'static>) }
| ^^^^^^^^^^^^^

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<dyn Iterator<Item: Copy>> }
| ^^^^^^^^^^

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<Box<dyn Iterator<Item: Copy>>> }
| ^^^^^^^^^^

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<dyn Iterator<Item: 'static>> }
| ^^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-104916.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

trait B {
type AssocType;
}
2 changes: 1 addition & 1 deletion tests/ui/associated-type-bounds/issue-104916.stderr
Original file line number Diff line number Diff line change
@@ -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<AssocType: 'j>:,
| ^^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-61752.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait Foo {
type Bar;
}
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-70292.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

fn foo<F>(_: F)
where
F: for<'a> Trait<Output: 'a>,
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-71443-1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

struct Incorrect;

fn hello<F: for<'a> Iterator<Item: 'a>>() {
2 changes: 1 addition & 1 deletion tests/ui/associated-type-bounds/issue-71443-1.stderr
Original file line number Diff line number Diff line change
@@ -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<F: for<'a> Iterator<Item: 'a>>() {
| - help: try adding a return type: `-> Incorrect`
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-71443-2.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

fn hello<'b, F>()
where
for<'a> F: Iterator<Item: 'a> + 'b,
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-79949.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass

#![allow(incomplete_features)]
#![feature(associated_type_bounds)]

trait MP {
type T<'a>;
}
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-81193.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait A<'a, 'b> {}

trait B<'a, 'b, 'c> {}
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/issue-83017.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait TraitA<'a> {
type AsA;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait Trait1 {
type Assoc1: Bar;

2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/no-gat-position.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![feature(associated_type_bounds)]

// Test for <https://github.com/rust-lang/rust/issues/119857>.

pub trait Iter {
2 changes: 1 addition & 1 deletion tests/ui/associated-type-bounds/no-gat-position.stderr
Original file line number Diff line number Diff line change
@@ -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<Self::Item<'a, As1: Copy>>;
| ^^^^^^^^^ associated type not allowed here
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(bare_trait_objects)]
#![feature(associated_type_bounds)]
trait Item {
type Core;
}
Original file line number Diff line number Diff line change
@@ -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<Item: IntoIterator<Item: >>::IntoIterator as Item>::Core,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated types: `IntoIterator<Item: IntoIterator<Item: >, 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<Item: IntoIterator<Item: >>::IntoIterator as Item>::Core,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change
@@ -9,11 +9,9 @@ trait Trait {

fn foo<T: Trait<method(i32): Send>>() {}
//~^ ERROR argument types not allowed with return type notation
//~| ERROR associated type bounds are unstable

fn bar<T: Trait<method() -> (): Send>>() {}
//~^ ERROR return type not allowed with return type notation
//~| ERROR associated type bounds are unstable

fn baz<T: Trait<method(..): Send>>() {}
//~^ ERROR return type notation uses `()` instead of `(..)` for elided arguments
Original file line number Diff line number Diff line change
@@ -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<T: Trait<method(..): Send>>() {}
| ^^ help: remove the `..`

error[E0658]: associated type bounds are unstable
--> $DIR/bad-inputs-and-output.rs:10:17
|
LL | fn foo<T: Trait<method(i32): Send>>() {}
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/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<T: Trait<method() -> (): Send>>() {}
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/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<T: Trait<method(i32): Send>>() {}
| ^^^^^ 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<T: Trait<method() -> (): 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`.
Original file line number Diff line number Diff line change
@@ -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<T: Trait<method(i32): Send>>() {}
//~^ ERROR associated type bounds are unstable

fn main() {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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() {}
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/rpit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ run-pass

#![feature(associated_type_bounds)]

use std::ops::Add;

trait Tr1 { type As1; fn mk(self) -> Self::As1; }
2 changes: 1 addition & 1 deletion tests/ui/associated-type-bounds/rpit.stderr
Original file line number Diff line number Diff line change
@@ -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; }
| --- ^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/struct-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ run-pass

#![allow(unused)]
#![feature(associated_type_bounds)]

trait Tr1 { type As1; }
trait Tr2 { type As2; }
trait Tr3 {}
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/supertrait-defines-ty.rs
Original file line number Diff line number Diff line change
@@ -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;
}
1 change: 0 additions & 1 deletion tests/ui/associated-type-bounds/trait-alias-impl-trait.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ run-pass

#![allow(dead_code)]
#![feature(associated_type_bounds)]
#![feature(type_alias_impl_trait)]

use std::ops::Add;
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/trait-params.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ build-pass (FIXME(62277): could be check-pass?)

#![feature(associated_type_bounds)]

use std::iter::Once;
use std::ops::Range;

2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/type-alias.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

type _TaWhere1<T> where T: Iterator<Item: Copy> = T; //~ WARNING type_alias_bounds
type _TaWhere2<T> where T: Iterator<Item: 'static> = T; //~ WARNING type_alias_bounds
type _TaWhere3<T> where T: Iterator<Item: 'static> = T; //~ WARNING type_alias_bounds
24 changes: 12 additions & 12 deletions tests/ui/associated-type-bounds/type-alias.stderr
Original file line number Diff line number Diff line change
@@ -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<T> where T: Iterator<Item: Copy> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,7 +12,7 @@ LL + type _TaWhere1<T> = 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<T> where T: Iterator<Item: 'static> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -24,7 +24,7 @@ LL + type _TaWhere2<T> = 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<T> where T: Iterator<Item: 'static> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -36,7 +36,7 @@ LL + type _TaWhere3<T> = 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<T> where T: Iterator<Item: 'static + Copy + Send> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -48,7 +48,7 @@ LL + type _TaWhere4<T> = 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<T> where T: Iterator<Item: for<'a> Into<&'a u8>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -60,7 +60,7 @@ LL + type _TaWhere5<T> = 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<T> where T: Iterator<Item: Iterator<Item: Copy>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ LL + type _TaWhere6<T> = 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: Iterator<Item: Copy>> = T;
| ^^^^^^^^^^^^^^^^^^^^
@@ -84,7 +84,7 @@ LL + type _TaInline1<T> = 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: Iterator<Item: 'static>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -96,7 +96,7 @@ LL + type _TaInline2<T> = 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: Iterator<Item: 'static>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^
@@ -108,7 +108,7 @@ LL + type _TaInline3<T> = 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: Iterator<Item: 'static + Copy + Send>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -120,7 +120,7 @@ LL + type _TaInline4<T> = 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<T: Iterator<Item: for<'a> Into<&'a u8>>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -132,7 +132,7 @@ LL + type _TaInline5<T> = 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: Iterator<Item: Iterator<Item: Copy>>> = T;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 changes: 0 additions & 2 deletions tests/ui/associated-type-bounds/union-bounds.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ run-pass

#![feature(associated_type_bounds)]

#![allow(unused_assignments)]

trait Tr1: Copy { type As1: Copy; }
1 change: 0 additions & 1 deletion tests/ui/associated-types/issue-63591.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]
#![feature(impl_trait_in_assoc_type)]

fn main() {}
61 changes: 0 additions & 61 deletions tests/ui/feature-gates/feature-gate-associated_type_bounds.rs

This file was deleted.

138 changes: 0 additions & 138 deletions tests/ui/feature-gates/feature-gate-associated_type_bounds.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//@ check-pass

#![feature(associated_type_bounds)]

trait Trait {
type Type;

Original file line number Diff line number Diff line change
@@ -3,11 +3,7 @@
#[cfg(FALSE)]
fn syntax() {
foo::<T = u8, T: Ord, String>();
//~^ WARN associated type bounds are unstable
//~| WARN unstable syntax
foo::<T = u8, 'a, T: Ord>();
//~^ WARN associated type bounds are unstable
//~| WARN unstable syntax
}

fn main() {}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@

#![allow(incomplete_features)]
#![feature(
associated_type_bounds,
const_trait_impl,
effects,
const_cmp,
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/ui/suggestions/missing-assoc-fn.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ trait TraitA<A> {
fn foo<T: TraitB<Item = A>>(_: T) -> Self;
fn bar<T>(_: T) -> Self;
fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: Copy;
fn bat<T: TraitB<Item: Copy>>(_: T) -> Self; //~ ERROR associated type bounds are unstable
fn bat<T: TraitB<Item: Copy>>(_: T) -> Self;
}

struct S;
15 changes: 2 additions & 13 deletions tests/ui/suggestions/missing-assoc-fn.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
error[E0658]: associated type bounds are unstable
--> $DIR/missing-assoc-fn.rs:9:22
|
LL | fn bat<T: TraitB<Item: Copy>>(_: T) -> Self;
| ^^^^^^^^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/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: IntoIterator<Item = ()>>(_: 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`.
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@ fn main() {
let _: Vec<A:B> = 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
Original file line number Diff line number Diff line change
@@ -9,16 +9,6 @@ help: you might have meant to write a path instead of an associated type bound
LL | let _: Vec<A::B> = 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> = A::B;
| ^^^
|
= note: see issue #52662 <https://github.com/rust-lang/rust/issues/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> = 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`.
2 changes: 1 addition & 1 deletion tests/ui/traits/negative-bounds/associated-constraints.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(negative_bounds, associated_type_bounds)]
#![feature(negative_bounds)]

trait Trait {
type Assoc;