diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:31 +0000 |
commit | 2ff14448863ac1a1dd9533461708e29aae170c2d (patch) | |
tree | 85b9fea2bbfe3f06473cfa381eed11f273b57c5c /src/test/ui/associated-type-bounds | |
parent | Adding debian version 1.64.0+dfsg1-1. (diff) | |
download | rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip |
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
6 files changed, 23 insertions, 5 deletions
diff --git a/src/test/ui/associated-type-bounds/binder-on-bound.rs b/src/test/ui/associated-type-bounds/binder-on-bound.rs index 0b4b24b98..6cba45129 100644 --- a/src/test/ui/associated-type-bounds/binder-on-bound.rs +++ b/src/test/ui/associated-type-bounds/binder-on-bound.rs @@ -1,5 +1,3 @@ -#![feature(generic_associated_types)] - trait Trait { type Bound<'a>; } diff --git a/src/test/ui/associated-type-bounds/binder-on-bound.stderr b/src/test/ui/associated-type-bounds/binder-on-bound.stderr index 3432672e0..f71f72bfb 100644 --- a/src/test/ui/associated-type-bounds/binder-on-bound.stderr +++ b/src/test/ui/associated-type-bounds/binder-on-bound.stderr @@ -1,5 +1,5 @@ error: `for<...>` is not allowed on associated type bounds - --> $DIR/binder-on-bound.rs:7:22 + --> $DIR/binder-on-bound.rs:5:22 | LL | fn foo() where Trait<for<'a> Bound<'a> = &'a ()> { | ^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/associated-type-bounds/elision.rs b/src/test/ui/associated-type-bounds/elision.rs index 4a5339399..d00def571 100644 --- a/src/test/ui/associated-type-bounds/elision.rs +++ b/src/test/ui/associated-type-bounds/elision.rs @@ -1,7 +1,7 @@ #![feature(associated_type_bounds)] #![feature(anonymous_lifetime_in_impl_trait)] -// The same thing should happen for constaints in dyn trait. +// The same thing should happen for constraints in dyn trait. fn f(x: &mut dyn Iterator<Item: Iterator<Item = &'_ ()>>) -> Option<&'_ ()> { x.next() } //~^ ERROR missing lifetime specifier //~| ERROR mismatched types diff --git a/src/test/ui/associated-type-bounds/issue-102335-ty.rs b/src/test/ui/associated-type-bounds/issue-102335-ty.rs new file mode 100644 index 000000000..363df73c1 --- /dev/null +++ b/src/test/ui/associated-type-bounds/issue-102335-ty.rs @@ -0,0 +1,12 @@ +trait T { + type A: S<C<i32 = u32> = ()>; + //~^ ERROR associated type bindings are not allowed here +} + +trait Q {} + +trait S { + type C: Q; +} + +fn main() {} diff --git a/src/test/ui/associated-type-bounds/issue-102335-ty.stderr b/src/test/ui/associated-type-bounds/issue-102335-ty.stderr new file mode 100644 index 000000000..8777b2965 --- /dev/null +++ b/src/test/ui/associated-type-bounds/issue-102335-ty.stderr @@ -0,0 +1,9 @@ +error[E0229]: associated type bindings are not allowed here + --> $DIR/issue-102335-ty.rs:2:17 + | +LL | type A: S<C<i32 = u32> = ()>; + | ^^^^^^^^^ associated type not allowed here + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0229`. diff --git a/src/test/ui/associated-type-bounds/issue-79949.rs b/src/test/ui/associated-type-bounds/issue-79949.rs index 9f924f1fd..9dd37f981 100644 --- a/src/test/ui/associated-type-bounds/issue-79949.rs +++ b/src/test/ui/associated-type-bounds/issue-79949.rs @@ -2,7 +2,6 @@ #![allow(incomplete_features)] #![feature(associated_type_bounds)] -#![feature(generic_associated_types)] trait MP { type T<'a>; |