]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/own-bound-span.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / own-bound-span.rs
1 struct S;
2
3 trait D {
4     type P<T: Copy>;
5     //~^ NOTE required by this bound in `D::P`
6     //~| NOTE required by a bound in `D::P`
7 }
8
9 impl D for S {
10     type P<T: Copy> = ();
11 }
12
13 fn main() {
14     let _: <S as D>::P<String>;
15     //~^ ERROR the trait bound `String: Copy` is not satisfied
16     //~| NOTE the trait `Copy` is not implemented for `String`
17 }