]> git.lizzy.rs Git - rust.git/blob - src/test/ui/compare-method/trait-bound-on-type-parameter.rs
Rollup merge of #106248 - dtolnay:revertupcastlint, r=jackh726
[rust.git] / src / test / ui / compare-method / trait-bound-on-type-parameter.rs
1 // Tests that impl can't add extra `F: Sync` bound aren't *more* restrictive
2 // than the trait method it's implementing.
3 //
4 // Regr test for #26111.
5
6 trait A {
7   fn b<C,D>(&self, x: C) -> C;
8 }
9
10 struct E {
11  f: isize
12 }
13
14 impl A for E {
15     fn b<F: Sync, G>(&self, _x: F) -> F { panic!() } //~ ERROR E0276
16 }
17
18 fn main() {}