remove unnecessary `blame_span` from `report_region_errors`
This commit is contained in:
parent
52c94e9dec
commit
4fce59f0fd
|
@ -199,19 +199,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
mir_def_id: DefId,
|
mir_def_id: DefId,
|
||||||
fr: RegionVid,
|
fr: RegionVid,
|
||||||
outlived_fr: RegionVid,
|
outlived_fr: RegionVid,
|
||||||
blame_span: Span,
|
|
||||||
errors_buffer: &mut Vec<Diagnostic>,
|
errors_buffer: &mut Vec<Diagnostic>,
|
||||||
) {
|
) {
|
||||||
debug!("report_error(fr={:?}, outlived_fr={:?})", fr, outlived_fr);
|
debug!("report_error(fr={:?}, outlived_fr={:?})", fr, outlived_fr);
|
||||||
|
|
||||||
if let (Some(f), Some(o)) = (self.to_error_region(fr), self.to_error_region(outlived_fr)) {
|
|
||||||
let tables = infcx.tcx.typeck_tables_of(mir_def_id);
|
|
||||||
let nice = NiceRegionError::new_from_span(infcx.tcx, blame_span, o, f, Some(tables));
|
|
||||||
if let Some(_error_reported) = nice.try_report() {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find all paths
|
// Find all paths
|
||||||
let constraint_paths = self.find_constraint_paths_between_regions(fr, |r| r == outlived_fr);
|
let constraint_paths = self.find_constraint_paths_between_regions(fr, |r| r == outlived_fr);
|
||||||
debug!("report_error: constraint_paths={:#?}", constraint_paths);
|
debug!("report_error: constraint_paths={:#?}", constraint_paths);
|
||||||
|
@ -233,6 +224,15 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
// Get a span
|
// Get a span
|
||||||
let (category, span) = categorized_path.first().unwrap();
|
let (category, span) = categorized_path.first().unwrap();
|
||||||
|
|
||||||
|
// Check if we can use one of the "nice region errors".
|
||||||
|
if let (Some(f), Some(o)) = (self.to_error_region(fr), self.to_error_region(outlived_fr)) {
|
||||||
|
let tables = infcx.tcx.typeck_tables_of(mir_def_id);
|
||||||
|
let nice = NiceRegionError::new_from_span(infcx.tcx, *span, o, f, Some(tables));
|
||||||
|
if let Some(_error_reported) = nice.try_report() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let category = match (
|
let category = match (
|
||||||
category,
|
category,
|
||||||
self.universal_regions.is_local_free_region(fr),
|
self.universal_regions.is_local_free_region(fr),
|
||||||
|
|
|
@ -921,7 +921,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
|
||||||
// to report the error. This gives better error messages
|
// to report the error. This gives better error messages
|
||||||
// in some cases.
|
// in some cases.
|
||||||
self.report_error(
|
self.report_error(
|
||||||
mir, infcx, mir_def_id, longer_fr, shorter_fr, blame_span, errors_buffer);
|
mir, infcx, mir_def_id, longer_fr, shorter_fr, errors_buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,20 +35,22 @@ LL | let mut out = Struct { head: x, _tail: [()] };
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0621]: explicit lifetime required in the type of `y`
|
error[E0621]: explicit lifetime required in the type of `y`
|
||||||
--> $DIR/issue-40288-2.rs:14:9
|
--> $DIR/issue-40288-2.rs:16:31
|
||||||
|
|
|
|
||||||
LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
|
LL | fn lifetime_transmute_slice<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
|
||||||
| - consider changing the type of `y` to `&'a T`
|
| - consider changing the type of `y` to `&'a T`
|
||||||
LL | let mut out = [x];
|
...
|
||||||
| ^^^^^^^ lifetime `'a` required
|
LL | let slice: &mut [_] = &mut out;
|
||||||
|
| ^^^^^^^^ lifetime `'a` required
|
||||||
|
|
||||||
error[E0621]: explicit lifetime required in the type of `y`
|
error[E0621]: explicit lifetime required in the type of `y`
|
||||||
--> $DIR/issue-40288-2.rs:29:9
|
--> $DIR/issue-40288-2.rs:31:41
|
||||||
|
|
|
|
||||||
LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
|
LL | fn lifetime_transmute_struct<'a, T: ?Sized>(x: &'a T, y: &T) -> &'a T {
|
||||||
| - consider changing the type of `y` to `&'a T`
|
| - consider changing the type of `y` to `&'a T`
|
||||||
LL | let mut out = Struct { head: x, _tail: [()] };
|
...
|
||||||
| ^^^^^^^ lifetime `'a` required
|
LL | let dst: &mut Struct<_, [()]> = &mut out;
|
||||||
|
| ^^^^^^^^ lifetime `'a` required
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ LL | if x > y { x } else { y } //~ ERROR explicit lifetime
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error[E0621]: explicit lifetime required in parameter type
|
error[E0621]: explicit lifetime required in parameter type
|
||||||
--> $DIR/ex1-return-one-existing-name-if-else-3.rs:11:13
|
--> $DIR/ex1-return-one-existing-name-if-else-3.rs:11:16
|
||||||
|
|
|
|
||||||
LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 {
|
LL | fn foo<'a>((x, y): (&'a i32, &i32)) -> &'a i32 {
|
||||||
| -^----
|
| ----^-
|
||||||
| | |
|
| | |
|
||||||
| | lifetime `'a` required
|
| | lifetime `'a` required
|
||||||
| consider changing type to `(&'a i32, &'a i32)`
|
| consider changing type to `(&'a i32, &'a i32)`
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0621]: explicit lifetime required in the type of `x`
|
||||||
LL | fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) {
|
LL | fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) {
|
||||||
| - consider changing the type of `x` to `Ref<'a, i32>`
|
| - consider changing the type of `x` to `Ref<'a, i32>`
|
||||||
LL | y.push(x); //~ ERROR explicit lifetime
|
LL | y.push(x); //~ ERROR explicit lifetime
|
||||||
| ^ lifetime `'a` required
|
| ^^^^^^^^^ lifetime `'a` required
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0621]: explicit lifetime required in the type of `y`
|
||||||
LL | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
|
LL | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) {
|
||||||
| - consider changing the type of `y` to `Ref<'a, i32>`
|
| - consider changing the type of `y` to `Ref<'a, i32>`
|
||||||
LL | x.push(y); //~ ERROR explicit lifetime
|
LL | x.push(y); //~ ERROR explicit lifetime
|
||||||
| ^ lifetime `'a` required
|
| ^^^^^^^^^ lifetime `'a` required
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
|
LL | fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) {
|
||||||
| -------- -------- these two types are declared with different lifetimes...
|
| -------- -------- these two types are declared with different lifetimes...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@ LL | let z = Ref { data: y.data };
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/ex2c-push-inference-variable.rs:16:9
|
--> $DIR/ex2c-push-inference-variable.rs:17:5
|
||||||
|
|
|
|
||||||
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
|
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
|
||||||
| ------------ ------------ these two types are declared with different lifetimes...
|
| ------------ ------------ these two types are declared with different lifetimes...
|
||||||
LL | let z = Ref { data: y.data };
|
LL | let z = Ref { data: y.data };
|
||||||
| ^ ...but data from `y` flows into `x` here
|
LL | x.push(z); //~ ERROR lifetime mismatch
|
||||||
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@ LL | let b = Ref { data: y.data };
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/ex2d-push-inference-variable-2.rs:16:9
|
--> $DIR/ex2d-push-inference-variable-2.rs:18:5
|
||||||
|
|
|
|
||||||
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
|
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
|
||||||
| ------------ ------------ these two types are declared with different lifetimes...
|
| ------------ ------------ these two types are declared with different lifetimes...
|
||||||
LL | let a: &mut Vec<Ref<i32>> = x; //~ ERROR lifetime mismatch
|
...
|
||||||
| ^ ...but data from `y` flows into `x` here
|
LL | a.push(b);
|
||||||
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@ LL | let b = Ref { data: y.data };
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/ex2e-push-inference-variable-3.rs:16:9
|
--> $DIR/ex2e-push-inference-variable-3.rs:18:5
|
||||||
|
|
|
|
||||||
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
|
LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) {
|
||||||
| ------------ ------------ these two types are declared with different lifetimes...
|
| ------------ ------------ these two types are declared with different lifetimes...
|
||||||
LL | let a: &mut Vec<Ref<i32>> = x; //~ ERROR lifetime mismatch
|
...
|
||||||
| ^ ...but data from `y` flows into `x` here
|
LL | Vec::push(a, b);
|
||||||
|
| ^^^^^^^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@ LL | *v = x; //~ ERROR lifetime mismatch
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/ex3-both-anon-regions-2.rs:11:14
|
--> $DIR/ex3-both-anon-regions-2.rs:12:5
|
||||||
|
|
|
|
||||||
LL | fn foo(&mut (ref mut v, w): &mut (&u8, &u8), x: &u8) {
|
LL | fn foo(&mut (ref mut v, w): &mut (&u8, &u8), x: &u8) {
|
||||||
| ^^^^^^^^^ --- --- these two types are declared with different lifetimes...
|
| --- --- these two types are declared with different lifetimes...
|
||||||
| |
|
LL | *v = x; //~ ERROR lifetime mismatch
|
||||||
| ...but data from `x` flows here
|
| ^^^^^^ ...but data from `x` flows here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
|
||||||
| ...but data flows into `z` here
|
| ...but data flows into `z` here
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/ex3-both-anon-regions-3.rs:11:33
|
--> $DIR/ex3-both-anon-regions-3.rs:11:36
|
||||||
|
|
|
|
||||||
LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
|
LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) {
|
||||||
| --- ^ --- these two types are declared with different lifetimes...
|
| --- ^ --- these two types are declared with different lifetimes...
|
||||||
|
|
|
@ -11,7 +11,7 @@ LL | fn foo<'a, 'b>(mut x: Vec<Ref<'a>>, y: Ref<'b>)
|
||||||
| ------- ------- these two types are declared with different lifetimes...
|
| ------- ------- these two types are declared with different lifetimes...
|
||||||
...
|
...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo<'a, 'b>(mut x: Vec<Ref<'a>>, y: Ref<'b>) {
|
LL | fn foo<'a, 'b>(mut x: Vec<Ref<'a>>, y: Ref<'b>) {
|
||||||
| ------- ------- these two types are declared with different lifetimes...
|
| ------- ------- these two types are declared with different lifetimes...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo(mut x: Vec<Ref>, y: Ref) {
|
LL | fn foo(mut x: Vec<Ref>, y: Ref) {
|
||||||
| --- --- these two types are declared with different lifetimes...
|
| --- --- these two types are declared with different lifetimes...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) {
|
LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) {
|
||||||
| ------ ------ these two types are declared with different lifetimes...
|
| ------ ------ these two types are declared with different lifetimes...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
|
LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
|
||||||
| --- --- these two types are declared with different lifetimes...
|
| --- --- these two types are declared with different lifetimes...
|
||||||
LL | y.push(z); //~ ERROR lifetime mismatch
|
LL | y.push(z); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `z` flows into `y` here
|
| ^^^^^^^^^ ...but data from `z` flows into `y` here
|
||||||
|
|
||||||
error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
|
error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
|
||||||
--> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:3
|
--> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:3
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo(x: &mut Vec<&u8>, y: &u8) {
|
LL | fn foo(x: &mut Vec<&u8>, y: &u8) {
|
||||||
| --- --- these two types are declared with different lifetimes...
|
| --- --- these two types are declared with different lifetimes...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
|
LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) {
|
||||||
| --- --- these two types are declared with different lifetimes...
|
| --- --- these two types are declared with different lifetimes...
|
||||||
LL | y.push(z); //~ ERROR lifetime mismatch
|
LL | y.push(z); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `z` flows into `y` here
|
| ^^^^^^^^^ ...but data from `z` flows into `y` here
|
||||||
|
|
||||||
error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
|
error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable
|
||||||
--> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:3
|
--> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:3
|
||||||
|
|
|
@ -10,7 +10,7 @@ error[E0623]: lifetime mismatch
|
||||||
LL | fn foo(x: &mut Vec<&u8>, y: &u8) {
|
LL | fn foo(x: &mut Vec<&u8>, y: &u8) {
|
||||||
| --- --- these two types are declared with different lifetimes...
|
| --- --- these two types are declared with different lifetimes...
|
||||||
LL | x.push(y); //~ ERROR lifetime mismatch
|
LL | x.push(y); //~ ERROR lifetime mismatch
|
||||||
| ^ ...but data from `y` flows into `x` here
|
| ^^^^^^^^^ ...but data from `y` flows into `x` here
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
|
|
@ -24,14 +24,19 @@ LL | | });
|
||||||
= note: where '_#1r: '_#2r
|
= note: where '_#1r: '_#2r
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/propagate-approximated-ref.rs:53:29
|
--> $DIR/propagate-approximated-ref.rs:53:5
|
||||||
|
|
|
|
||||||
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||||
| ------- -------
|
| ------- -------
|
||||||
| |
|
| |
|
||||||
| these two types are declared with different lifetimes...
|
| these two types are declared with different lifetimes...
|
||||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||||
| ^^^^^^^ ...but data from `cell_a` flows into `cell_b` here
|
LL | | //~^ ERROR lifetime mismatch
|
||||||
|
LL | |
|
||||||
|
LL | | // Only works if 'x: 'y:
|
||||||
|
LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
|
||||||
|
LL | | });
|
||||||
|
| |______^ ...but data from `cell_a` flows into `cell_b` here
|
||||||
|
|
||||||
note: No external requirements
|
note: No external requirements
|
||||||
--> $DIR/propagate-approximated-ref.rs:52:1
|
--> $DIR/propagate-approximated-ref.rs:52:1
|
||||||
|
|
|
@ -24,14 +24,19 @@ LL | | });
|
||||||
= note: where '_#1r: '_#2r
|
= note: where '_#1r: '_#2r
|
||||||
|
|
||||||
error[E0623]: lifetime mismatch
|
error[E0623]: lifetime mismatch
|
||||||
--> $DIR/propagate-approximated-val.rs:46:29
|
--> $DIR/propagate-approximated-val.rs:46:5
|
||||||
|
|
|
|
||||||
LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||||
| ------- -------
|
| ------- -------
|
||||||
| |
|
| |
|
||||||
| these two types are declared with different lifetimes...
|
| these two types are declared with different lifetimes...
|
||||||
LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
LL | / establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
||||||
| ^^^^^^ ...but data from `cell_a` flows into `cell_b` here
|
LL | | //~^ ERROR lifetime mismatch
|
||||||
|
LL | |
|
||||||
|
LL | | // Only works if 'x: 'y:
|
||||||
|
LL | | demand_y(outlives1, outlives2, x.get()) //~ WARNING not reporting region error due to nll
|
||||||
|
LL | | });
|
||||||
|
| |______^ ...but data from `cell_a` flows into `cell_b` here
|
||||||
|
|
||||||
note: No external requirements
|
note: No external requirements
|
||||||
--> $DIR/propagate-approximated-val.rs:45:1
|
--> $DIR/propagate-approximated-val.rs:45:1
|
||||||
|
|
Loading…
Reference in New Issue