summaryrefslogtreecommitdiffstats
path: root/src/test/ui/compare-method/trait-bound-on-type-parameter.rs
blob: 5359001ea436fa7b328cc391a2eac3bc5a3d4aee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Tests that impl can't add extra `F: Sync` bound aren't *more* restrictive
// than the trait method it's implementing.
//
// Regr test for #26111.

trait A {
  fn b<C,D>(&self, x: C) -> C;
}

struct E {
 f: isize
}

impl A for E {
    fn b<F: Sync, G>(&self, _x: F) -> F { panic!() } //~ ERROR E0276
}

fn main() {}