rust/tests/ui/chalkify/impl_wf.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
447 B
Rust
Raw Normal View History

2023-01-02 17:18:00 -06:00
// compile-flags: -Z trait-solver=chalk
2020-03-03 10:25:03 -06:00
trait Foo: Sized { }
trait Bar {
type Item: Foo;
}
impl Foo for i32 { }
impl Foo for str { }
2020-05-27 00:05:09 -05:00
//~^ ERROR the size for values of type `str` cannot be known at compilation time
2020-03-03 10:25:03 -06:00
// Implicit `T: Sized` bound.
impl<T> Foo for Option<T> { }
trait Baz<U: ?Sized> where U: Foo { }
impl Baz<i32> for i32 { }
impl Baz<f32> for f32 { }
//~^ ERROR the trait bound `f32: Foo` is not satisfied
fn main() {
}