rust/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.fixed
2024-10-10 01:13:29 +02:00

14 lines
306 B
Rust

//@ run-rustfix
#![allow(unused_variables, dead_code)]
trait Trait {
fn foo(&self) where Self: Other, Self: Sized { }
fn bar(self: &Self) {} //~ ERROR invalid `self` parameter type
}
fn bar(x: &dyn Trait) {} //~ ERROR the trait `Trait` cannot be made into an object
trait Other {}
fn main() {}