summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/restrict-type-not-param.rs
blob: 60f5ba45c268d1ae6463509a16cc32c8b4f0e5e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use std::ops::Add;

struct Wrapper<T>(T);

trait Foo {}

fn qux<T>(a: Wrapper<T>, b: T) -> T {
    a + b
    //~^ ERROR cannot add `T` to `Wrapper<T>`
}

fn main() {}