]> git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/trait-objects.extended.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / trait-objects.extended.stderr
1 error[E0521]: borrowed data escapes outside of function
2 --> $DIR/trait-objects.rs:16:5
3 |
4 LL | fn min_size(x: &mut dyn for<'a> StreamingIterator<Item<'a> = &'a i32>) -> usize {
5 | - - let's call the lifetime of this reference `'1`
6 | |
7 | `x` is a reference that is only valid in the function body
8 LL |
9 LL | x.size_hint().0
10 | ^^^^^^^^^^^^^
11 | |
12 | `x` escapes the function body here
13 | argument requires that `'1` must outlive `'static`
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0521`.