summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/object-unsafe-trait-should-use-where-sized.rs
blob: 38d9aea16ebf6293529e67152304218320ec4d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-rustfix
#![allow(unused_variables, dead_code)]

trait Trait {
    fn foo() where Self: Other, { }
    fn bar(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() {}