about summary refs log tree commit diff
path: root/tests/ui/regions/multiple-sources-for-outlives-requirement.stderr
blob: 4cdaf950e155c9231b2055b8bfc7014aac73e0c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
error[E0716]: temporary value dropped while borrowed
  --> $DIR/multiple-sources-for-outlives-requirement.rs:5:38
   |
LL | fn foo<'b>() {
   |        -- lifetime `'b` defined here
LL |     outlives_indir::<'_, 'b, _>(&mut 1u32);
   |     ---------------------------------^^^^-- temporary value is freed at the end of this statement
   |     |                                |
   |     |                                creates a temporary value which is freed while still in use
   |     argument requires that borrow lasts for `'b`
   |
note: requirements that the value outlives `'b` introduced here
  --> $DIR/multiple-sources-for-outlives-requirement.rs:1:23
   |
LL | fn outlives_indir<'a: 'b, 'b, T: 'a>(_x: T) {}
   |                       ^^         ^^

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0716`.