blob: 6b1b8a4b738ad735b59a70b6fdd0dbbf50a95596 [file] [log] [blame]
//@ run-rustfix
trait Trait {}
impl Trait for () {}
// this works
fn foo() -> impl Trait {
()
}
fn bar<T: Trait + std::marker::Sync>() -> T
where
T: Send,
{
() //~ ERROR mismatched types
}
fn other_bounds<T>() -> T
where
T: Trait,
Vec<usize>: Clone,
{
() //~ ERROR mismatched types
}
fn main() {
foo();
bar::<()>();
other_bounds::<()>();
}