]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52742.rs
Do not suggest using a const parameter when there are bounds on an unused type parameter
[rust.git] / src / test / ui / nll / issue-52742.rs
1 #![feature(in_band_lifetimes)]
2
3 struct Foo<'a, 'b> {
4     x: &'a u32,
5     y: &'b u32,
6 }
7
8 struct Bar<'b> {
9     z: &'b u32,
10 }
11
12 impl Foo<'_, '_> {
13     fn take_bar(&mut self, b: Bar<'_>) {
14         self.y = b.z
15         //~^ ERROR
16     }
17 }
18
19 fn main() {}