From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/chalkify/impl_wf.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/ui/chalkify/impl_wf.rs (limited to 'tests/ui/chalkify/impl_wf.rs') diff --git a/tests/ui/chalkify/impl_wf.rs b/tests/ui/chalkify/impl_wf.rs new file mode 100644 index 000000000..c8dfd4c3a --- /dev/null +++ b/tests/ui/chalkify/impl_wf.rs @@ -0,0 +1,26 @@ +// compile-flags: -Z trait-solver=chalk + +trait Foo: Sized { } + +trait Bar { + type Item: Foo; +} + +impl Foo for i32 { } + +impl Foo for str { } +//~^ ERROR the size for values of type `str` cannot be known at compilation time + + +// Implicit `T: Sized` bound. +impl Foo for Option { } + +trait Baz where U: Foo { } + +impl Baz for i32 { } + +impl Baz for f32 { } +//~^ ERROR the trait bound `f32: Foo` is not satisfied + +fn main() { +} -- cgit v1.2.3