about summary refs log tree commit diff
path: root/tests/ui/suggestions/dyn-incompatible-trait-should-use-where-sized.rs
blob: b0b02dedb2b9026833a9b756071df9bc16ec8918 (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` is not dyn compatible

trait Other {}

fn main() {}