rust/tests/ui/suggestions/object-unsafe-trait-should-use-where-sized.fixed

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

14 lines
305 B
Rust
Raw Normal View History

2020-01-31 21:04:58 -06:00
// run-rustfix
#![allow(unused_variables, dead_code)]
trait Trait {
fn foo(&self) where Self: Other, Self: Sized { }
2020-01-31 21:04:58 -06:00
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() {}