summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/alias-bound-unsound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/new-solver/alias-bound-unsound.rs')
-rw-r--r--tests/ui/traits/new-solver/alias-bound-unsound.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.rs b/tests/ui/traits/new-solver/alias-bound-unsound.rs
index 959f1afa0..38d83d289 100644
--- a/tests/ui/traits/new-solver/alias-bound-unsound.rs
+++ b/tests/ui/traits/new-solver/alias-bound-unsound.rs
@@ -16,12 +16,17 @@ trait Foo {
impl Foo for () {
type Item = String where String: Copy;
+ //~^ ERROR overflow evaluating the requirement `<() as Foo>::Item: Copy`
}
fn main() {
let x = String::from("hello, world");
drop(<() as Foo>::copy_me(&x));
- //~^ ERROR the type `&<() as Foo>::Item` is not well-formed
- //~| ERROR `<() as Foo>::Item` is not well-formed
+ //~^ ERROR overflow evaluating the requirement `<() as Foo>::Item: Sized`
+ //~| ERROR overflow evaluating the requirement `<() as Foo>::Item == _`
+ //~| ERROR overflow evaluating the requirement `<() as Foo>::Item well-formed`
+ //~| ERROR overflow evaluating the requirement `String <: <() as Foo>::Item`
+ //~| ERROR overflow evaluating the requirement `&<() as Foo>::Item well-formed`
+ //~| ERROR type annotations needed
println!("{x}");
}