Use def_span for external requirements.
This commit is contained in:
parent
7712825cc0
commit
494af379c4
24 changed files with 137 additions and 421 deletions
|
@ -389,8 +389,9 @@ pub(super) fn dump_annotation<'a, 'tcx>(
|
|||
// viewing the intraprocedural state, the -Zdump-mir output is
|
||||
// better.
|
||||
|
||||
let def_span = tcx.def_span(body.source.def_id());
|
||||
let mut err = if let Some(closure_region_requirements) = closure_region_requirements {
|
||||
let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "external requirements");
|
||||
let mut err = tcx.sess.diagnostic().span_note_diag(def_span, "external requirements");
|
||||
|
||||
regioncx.annotate(tcx, &mut err);
|
||||
|
||||
|
@ -409,7 +410,7 @@ pub(super) fn dump_annotation<'a, 'tcx>(
|
|||
|
||||
err
|
||||
} else {
|
||||
let mut err = tcx.sess.diagnostic().span_note_diag(body.span, "no external requirements");
|
||||
let mut err = tcx.sess.diagnostic().span_note_diag(def_span, "no external requirements");
|
||||
regioncx.annotate(tcx, &mut err);
|
||||
|
||||
err
|
||||
|
|
|
@ -2,7 +2,7 @@ note: no external requirements
|
|||
--> $DIR/escape-argument-callee.rs:26:38
|
||||
|
|
||||
LL | let mut closure = expect_sig(|p, y| *p = y);
|
||||
| ^^^^^^^^^^^^^
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -22,14 +22,8 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
|
|||
note: no external requirements
|
||||
--> $DIR/escape-argument-callee.rs:20:1
|
||||
|
|
||||
LL | / fn test() {
|
||||
LL | | let x = 44;
|
||||
LL | | let mut p = &x;
|
||||
LL | |
|
||||
... |
|
||||
LL | | deref(p);
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn test() {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: no external requirements
|
|||
--> $DIR/escape-argument.rs:26:38
|
||||
|
|
||||
LL | let mut closure = expect_sig(|p, y| *p = y);
|
||||
| ^^^^^^^^^^^^^
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -13,14 +13,8 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
|
|||
note: no external requirements
|
||||
--> $DIR/escape-argument.rs:20:1
|
||||
|
|
||||
LL | / fn test() {
|
||||
LL | | let x = 44;
|
||||
LL | | let mut p = &x;
|
||||
LL | |
|
||||
... |
|
||||
LL | | deref(p);
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn test() {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/escape-upvar-nested.rs:21:32
|
||||
|
|
||||
LL | let mut closure1 = || p = &y;
|
||||
| ^^^^^^^^^
|
||||
| ^^
|
||||
|
|
||||
= note: defining type: test::{closure#0}::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -15,12 +15,8 @@ LL | let mut closure1 = || p = &y;
|
|||
note: external requirements
|
||||
--> $DIR/escape-upvar-nested.rs:20:27
|
||||
|
|
||||
LL | let mut closure = || {
|
||||
| ___________________________^
|
||||
LL | | let mut closure1 = || p = &y;
|
||||
LL | | closure1();
|
||||
LL | | };
|
||||
| |_________^
|
||||
LL | let mut closure = || {
|
||||
| ^^
|
||||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -33,14 +29,8 @@ LL | | };
|
|||
note: no external requirements
|
||||
--> $DIR/escape-upvar-nested.rs:13:1
|
||||
|
|
||||
LL | / fn test() {
|
||||
LL | | let x = 44;
|
||||
LL | | let mut p = &x;
|
||||
LL | |
|
||||
... |
|
||||
LL | | deref(p);
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn test() {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/escape-upvar-ref.rs:23:27
|
||||
|
|
||||
LL | let mut closure = || p = &y;
|
||||
| ^^^^^^^^^
|
||||
| ^^
|
||||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -15,14 +15,8 @@ LL | let mut closure = || p = &y;
|
|||
note: no external requirements
|
||||
--> $DIR/escape-upvar-ref.rs:17:1
|
||||
|
|
||||
LL | / fn test() {
|
||||
LL | | let x = 44;
|
||||
LL | | let mut p = &x;
|
||||
LL | |
|
||||
... |
|
||||
LL | | deref(p);
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn test() {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-fail-no-postdom.rs:43:9
|
||||
|
|
||||
LL | / |_outlives1, _outlives2, _outlives3, x, y| {
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | let p = x.get();
|
||||
LL | | demand_y(x, y, p)
|
||||
LL | | },
|
||||
| |_________^
|
||||
LL | |_outlives1, _outlives2, _outlives3, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -31,14 +27,8 @@ LL | demand_y(x, y, p)
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-fail-no-postdom.rs:38:1
|
||||
|
|
||||
LL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
|
||||
LL | | establish_relationships(
|
||||
LL | | cell_a,
|
||||
LL | | cell_b,
|
||||
... |
|
||||
LL | | );
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/propagate-approximated-ref.rs:43:47
|
||||
|
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
| _______________________________________________^
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -22,14 +17,8 @@ LL | | });
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-ref.rs:42:1
|
||||
|
|
||||
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15
|
||||
|
|
||||
LL | foo(cell, |cell_a, cell_x| {
|
||||
| _______________^
|
||||
LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
|
||||
LL | |
|
||||
LL | | })
|
||||
| |_____^
|
||||
LL | foo(cell, |cell_a, cell_x| {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: case1::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -27,25 +23,16 @@ LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1
|
||||
|
|
||||
LL | / fn case1() {
|
||||
LL | | let a = 0;
|
||||
LL | | let cell = Cell::new(&a);
|
||||
LL | | foo(cell, |cell_a, cell_x| {
|
||||
... |
|
||||
LL | | })
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn case1() {
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: case1
|
||||
|
||||
note: external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15
|
||||
|
|
||||
LL | foo(cell, |cell_a, cell_x| {
|
||||
| _______________^
|
||||
LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error
|
||||
LL | | })
|
||||
| |_____^
|
||||
LL | foo(cell, |cell_a, cell_x| {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: case2::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -58,14 +45,8 @@ LL | | })
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
|
||||
|
|
||||
LL | / fn case2() {
|
||||
LL | | let a = 0;
|
||||
LL | | let cell = Cell::new(&a);
|
||||
LL | |
|
||||
... |
|
||||
LL | | })
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn case2() {
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: case2
|
||||
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47
|
||||
|
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
||||
| _______________________________________________^
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -23,14 +17,8 @@ LL | | });
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1
|
||||
|
|
||||
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
||||
LL | |
|
||||
LL | |
|
||||
... |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:47
|
||||
|
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
| _______________________________________________^
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -23,14 +17,8 @@ LL | | });
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:34:1
|
||||
|
|
||||
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
LL | |
|
||||
LL | |
|
||||
... |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/propagate-approximated-val.rs:36:45
|
||||
|
|
||||
LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
||||
| _____________________________________________^
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(outlives1, outlives2, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -22,14 +17,8 @@ LL | | });
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-approximated-val.rs:35:1
|
||||
|
|
||||
LL | / fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
LL | | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(outlives1, outlives2, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/propagate-despite-same-free-region.rs:42:9
|
||||
|
|
||||
LL | / |_outlives1, _outlives2, x, y| {
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | let p = x.get();
|
||||
LL | | demand_y(x, y, p)
|
||||
LL | | },
|
||||
| |_________^
|
||||
LL | |_outlives1, _outlives2, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -20,14 +16,8 @@ LL | | },
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-despite-same-free-region.rs:39:1
|
||||
|
|
||||
LL | / fn supply<'a>(cell_a: Cell<&'a u32>) {
|
||||
LL | | establish_relationships(
|
||||
LL | | cell_a,
|
||||
LL | | |_outlives1, _outlives2, x, y| {
|
||||
... |
|
||||
LL | | );
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a>(cell_a: Cell<&'a u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:35:47
|
||||
|
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
||||
| _______________________________________________^
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -31,14 +26,8 @@ LL | demand_y(x, y, x.get())
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:34:1
|
||||
|
|
||||
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:39:47
|
||||
|
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
| _______________________________________________^
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -31,14 +26,8 @@ LL | demand_y(x, y, x.get())
|
|||
note: no external requirements
|
||||
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:38:1
|
||||
|
|
||||
LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
|
||||
LL | | // Only works if 'x: 'y:
|
||||
LL | | demand_y(x, y, x.get())
|
||||
LL | |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: supply
|
||||
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/propagate-from-trait-match.rs:32:36
|
||||
|
|
||||
LL | establish_relationships(value, |value| {
|
||||
| ____________________________________^
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | // This function call requires that
|
||||
... |
|
||||
LL | | require(value);
|
||||
LL | | });
|
||||
| |_____^
|
||||
LL | establish_relationships(value, |value| {
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: defining type: supply::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -25,11 +18,7 @@ note: no external requirements
|
|||
LL | / fn supply<'a, T>(value: T)
|
||||
LL | | where
|
||||
LL | | T: Trait<'a>,
|
||||
LL | | {
|
||||
... |
|
||||
LL | | });
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_________________^
|
||||
|
|
||||
= note: defining type: supply::<'_#1r, T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: no external requirements
|
|||
--> $DIR/return-wrong-bound-region.rs:11:16
|
||||
|
|
||||
LL | expect_sig(|a, b| b); // ought to return `a`
|
||||
| ^^^^^^^^
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: test::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -22,11 +22,8 @@ LL | expect_sig(|a, b| b); // ought to return `a`
|
|||
note: no external requirements
|
||||
--> $DIR/return-wrong-bound-region.rs:10:1
|
||||
|
|
||||
LL | / fn test() {
|
||||
LL | | expect_sig(|a, b| b); // ought to return `a`
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn test() {
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: test
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/projection-no-regions-closure.rs:25:23
|
||||
|
|
||||
LL | with_signature(x, |mut y| Box::new(y.next()))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -18,11 +18,7 @@ note: no external requirements
|
|||
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
||||
LL | | where
|
||||
LL | | T: Iterator,
|
||||
LL | | {
|
||||
LL | | with_signature(x, |mut y| Box::new(y.next()))
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |________________^
|
||||
|
|
||||
= note: defining type: no_region::<'_#1r, T>
|
||||
|
||||
|
@ -39,7 +35,7 @@ note: external requirements
|
|||
--> $DIR/projection-no-regions-closure.rs:34:23
|
||||
|
|
||||
LL | with_signature(x, |mut y| Box::new(y.next()))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -55,10 +51,7 @@ note: no external requirements
|
|||
LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
||||
LL | | where
|
||||
LL | | T: 'a + Iterator,
|
||||
LL | | {
|
||||
LL | | with_signature(x, |mut y| Box::new(y.next()))
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________________^
|
||||
|
|
||||
= note: defining type: correct_region::<'_#1r, T>
|
||||
|
||||
|
@ -66,7 +59,7 @@ note: external requirements
|
|||
--> $DIR/projection-no-regions-closure.rs:42:23
|
||||
|
|
||||
LL | with_signature(x, |mut y| Box::new(y.next()))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -82,11 +75,7 @@ note: no external requirements
|
|||
LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
||||
LL | | where
|
||||
LL | | T: 'b + Iterator,
|
||||
LL | | {
|
||||
LL | | with_signature(x, |mut y| Box::new(y.next()))
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________________^
|
||||
|
|
||||
= note: defining type: wrong_region::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -103,7 +92,7 @@ note: external requirements
|
|||
--> $DIR/projection-no-regions-closure.rs:52:23
|
||||
|
|
||||
LL | with_signature(x, |mut y| Box::new(y.next()))
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^
|
||||
|
|
||||
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -120,10 +109,7 @@ LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
|
|||
LL | | where
|
||||
LL | | T: 'b + Iterator,
|
||||
LL | | 'b: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(x, |mut y| Box::new(y.next()))
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: outlives_region::<'_#1r, '_#2r, T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-closure.rs:45:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -20,11 +20,7 @@ note: no external requirements
|
|||
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | {
|
||||
... |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |____________________^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, T>
|
||||
|
||||
|
@ -56,7 +52,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-closure.rs:56:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -74,10 +70,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | 'a: 'a,
|
||||
... |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -109,7 +102,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-closure.rs:70:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -126,10 +119,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | T::AssocType: 'a,
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________________^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -137,7 +127,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-closure.rs:80:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -155,10 +145,8 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | T: 'a,
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | | 'b: 'a,
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-closure.rs:37:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -19,11 +19,7 @@ note: no external requirements
|
|||
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |____________________^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, T>
|
||||
|
||||
|
@ -44,7 +40,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-closure.rs:47:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -61,10 +57,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | 'a: 'a,
|
||||
... |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -85,7 +78,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-closure.rs:60:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -102,10 +95,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | T::AssocType: 'a,
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________________^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -113,7 +103,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-closure.rs:69:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -130,10 +120,7 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | 'b: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -141,7 +128,7 @@ note: external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-closure.rs:81:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -157,11 +144,7 @@ note: no external requirements
|
|||
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'a>,
|
||||
LL | | {
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |____________________^
|
||||
|
|
||||
= note: defining type: one_region::<'_#1r, T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: no external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-static-closure.rs:36:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -17,10 +17,7 @@ note: no external requirements
|
|||
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |____________________^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, T>
|
||||
|
||||
|
@ -28,7 +25,7 @@ note: no external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-static-closure.rs:45:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -43,10 +40,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | 'a: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -54,7 +48,7 @@ note: no external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-static-closure.rs:64:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -69,10 +63,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | T::AssocType: 'a,
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________________^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -80,7 +71,7 @@ note: no external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-static-closure.rs:73:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -95,10 +86,7 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b>,
|
||||
LL | | 'b: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -106,7 +94,7 @@ note: no external requirements
|
|||
--> $DIR/projection-one-region-trait-bound-static-closure.rs:85:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -120,11 +108,7 @@ note: no external requirements
|
|||
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'a>,
|
||||
LL | | {
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |____________________^
|
||||
|
|
||||
= note: defining type: one_region::<'_#1r, T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:38:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -19,11 +19,7 @@ note: no external requirements
|
|||
LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'b, 'c>,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |________________________^
|
||||
|
|
||||
= note: defining type: no_relationships_late::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -40,7 +36,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:48:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -57,10 +53,7 @@ LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b, 'c>,
|
||||
LL | | 'a: 'a,
|
||||
... |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>
|
||||
|
||||
|
@ -77,7 +70,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:61:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -94,10 +87,7 @@ LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b, 'c>,
|
||||
LL | | T::AssocType: 'a,
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________________^
|
||||
|
|
||||
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>
|
||||
|
||||
|
@ -105,7 +95,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:70:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -122,10 +112,7 @@ LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b, 'c>,
|
||||
LL | | 'b: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>
|
||||
|
||||
|
@ -133,7 +120,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:79:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -150,10 +137,7 @@ LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b, 'c>,
|
||||
LL | | 'c: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>
|
||||
|
||||
|
@ -161,7 +145,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:87:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: two_regions::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -178,11 +162,7 @@ note: no external requirements
|
|||
LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'b, 'b>,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |________________________^
|
||||
|
|
||||
= note: defining type: two_regions::<'_#1r, T>
|
||||
|
||||
|
@ -203,7 +183,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:97:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -220,10 +200,7 @@ LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
|
|||
LL | | where
|
||||
LL | | T: Anything<'b, 'b>,
|
||||
LL | | 'b: 'a,
|
||||
LL | | {
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>
|
||||
|
||||
|
@ -231,7 +208,7 @@ note: external requirements
|
|||
--> $DIR/projection-two-region-trait-bound-closure.rs:109:29
|
||||
|
|
||||
LL | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -247,11 +224,7 @@ note: no external requirements
|
|||
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
|
||||
LL | | where
|
||||
LL | | T: Anything<'a, 'a>,
|
||||
LL | | {
|
||||
... |
|
||||
LL | | with_signature(cell, t, |cell, t| require(cell, t));
|
||||
LL | | }
|
||||
| |_^
|
||||
| |________________________^
|
||||
|
|
||||
= note: defining type: one_region::<'_#1r, T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24
|
||||
|
|
||||
LL | twice(cell, value, |a, b| invoke(a, b));
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: generic::<T>::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -15,11 +15,8 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
|||
note: no external requirements
|
||||
--> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
|
||||
|
|
||||
LL | / fn generic<T>(value: T) {
|
||||
LL | | let cell = Cell::new(&());
|
||||
LL | | twice(cell, value, |a, b| invoke(a, b));
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn generic<T>(value: T) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: generic::<T>
|
||||
|
||||
|
@ -27,7 +24,7 @@ note: external requirements
|
|||
--> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
|
||||
|
|
||||
LL | twice(cell, value, |a, b| invoke(a, b));
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: generic_fail::<T>::{closure#0} with closure substs [
|
||||
i16,
|
||||
|
@ -41,11 +38,8 @@ LL | twice(cell, value, |a, b| invoke(a, b));
|
|||
note: no external requirements
|
||||
--> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
|
||||
|
|
||||
LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
|
||||
LL | | twice(cell, value, |a, b| invoke(a, b));
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: generic_fail::<T>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ note: external requirements
|
|||
--> $DIR/ty-param-closure-outlives-from-return-type.rs:26:23
|
||||
|
|
||||
LL | with_signature(x, |y| y)
|
||||
| ^^^^^
|
||||
| ^^^
|
||||
|
|
||||
= note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -18,11 +18,7 @@ note: no external requirements
|
|||
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
|
||||
LL | | where
|
||||
LL | | T: Debug,
|
||||
LL | | {
|
||||
... |
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^
|
||||
| |_____________^
|
||||
|
|
||||
= note: defining type: no_region::<'_#1r, T>
|
||||
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
note: external requirements
|
||||
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
|
||||
|
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| __________________________^
|
||||
LL | |
|
||||
LL | | //
|
||||
LL | | // See `correct_region`, which explains the point of this
|
||||
... |
|
||||
LL | | require(&x, &y)
|
||||
LL | | })
|
||||
| |_____^
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: no_region::<T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -23,14 +16,8 @@ LL | | })
|
|||
note: no external requirements
|
||||
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
|
||||
|
|
||||
LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
|
||||
LL | | with_signature(a, b, |x, y| {
|
||||
LL | |
|
||||
LL | | //
|
||||
... |
|
||||
LL | | })
|
||||
LL | | }
|
||||
| |_^
|
||||
LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: defining type: no_region::<T>
|
||||
|
||||
|
@ -55,15 +42,8 @@ LL | fn no_region<'a, T: 'a>(a: Cell<&'a ()>, b: T) {
|
|||
note: external requirements
|
||||
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26
|
||||
|
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| __________________________^
|
||||
LL | | // Key point of this test:
|
||||
LL | | //
|
||||
LL | | // The *closure* is being type-checked with all of its free
|
||||
... |
|
||||
LL | | require(&x, &y)
|
||||
LL | | })
|
||||
| |_____^
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -79,24 +59,15 @@ note: no external requirements
|
|||
LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
|
||||
LL | | where
|
||||
LL | | T: 'a,
|
||||
LL | | {
|
||||
... |
|
||||
LL | | })
|
||||
LL | | }
|
||||
| |_^
|
||||
| |__________^
|
||||
|
|
||||
= note: defining type: correct_region::<'_#1r, T>
|
||||
|
||||
note: external requirements
|
||||
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
|
||||
|
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| __________________________^
|
||||
LL | |
|
||||
LL | | // See `correct_region`
|
||||
LL | | require(&x, &y)
|
||||
LL | | })
|
||||
| |_____^
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -113,11 +84,7 @@ note: no external requirements
|
|||
LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
||||
LL | | where
|
||||
LL | | T: 'b,
|
||||
LL | | {
|
||||
... |
|
||||
LL | | })
|
||||
LL | | }
|
||||
| |_^
|
||||
| |__________^
|
||||
|
|
||||
= note: defining type: wrong_region::<'_#1r, T>
|
||||
|
||||
|
@ -140,12 +107,8 @@ LL | T: 'b + 'a,
|
|||
note: external requirements
|
||||
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26
|
||||
|
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| __________________________^
|
||||
LL | | // See `correct_region`
|
||||
LL | | require(&x, &y)
|
||||
LL | | })
|
||||
| |_____^
|
||||
LL | with_signature(a, b, |x, y| {
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
|
||||
i32,
|
||||
|
@ -162,10 +125,7 @@ LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
|
|||
LL | | where
|
||||
LL | | T: 'b,
|
||||
LL | | 'b: 'a,
|
||||
... |
|
||||
LL | | })
|
||||
LL | | }
|
||||
| |_^
|
||||
| |___________^
|
||||
|
|
||||
= note: defining type: outlives_region::<'_#1r, '_#2r, T>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue