]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-types/hr-associated-type-bound-param-4.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / associated-types / hr-associated-type-bound-param-4.rs
CommitLineData
f035d41b
XL
1trait X<'a, T>
2where
3 for<'b> (T,): X<'b, T>,
4 for<'b> <(T,) as X<'b, T>>::U: Clone,
5{
6 type U: ?Sized;
7 fn f(x: &<(T,) as X<'_, T>>::U) {
8 <<(T,) as X<'_, T>>::U>::clone(x);
9 }
10}
11
12impl<S, T> X<'_, T> for (S,) {
13 type U = str;
1b1a35ee 14 //~^ ERROR the trait bound `for<'b> <(T,) as X<'b, T>>::U: Clone` is not satisfied
f035d41b
XL
15}
16
17pub fn main() {
18 <(i32,) as X<i32>>::f("abc");
19}