]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/bugs/hrtb-implied-1.stderr
Better errors for implied static bound
[rust.git] / src / test / ui / generic-associated-types / bugs / hrtb-implied-1.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/hrtb-implied-1.rs:31:22
3    |
4 LL |     let slice = &mut ();
5    |                      ^^ creates a temporary which is freed while still in use
6 ...
7 LL |     print_items::<WindowsMut<'_>>(windows);
8    |     -------------------------------------- argument requires that borrow lasts for `'static`
9 LL | }
10    | - temporary value is freed at the end of this statement
11    |
12 note: due to current limitations in the borrow checker, this implies a `'static` lifetime
13   --> $DIR/hrtb-implied-1.rs:26:26
14    |
15 LL |     for<'a> I::Item<'a>: Debug,
16    |                          ^^^^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0716`.