1
Fork 0

Use def_span for external requirements.

This commit is contained in:
Camille GILLOT 2022-08-31 20:17:32 +02:00
parent 7712825cc0
commit 494af379c4
24 changed files with 137 additions and 421 deletions

View file

@ -389,8 +389,9 @@ pub(super) fn dump_annotation<'a, 'tcx>(
// viewing the intraprocedural state, the -Zdump-mir output is // viewing the intraprocedural state, the -Zdump-mir output is
// better. // 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 = 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); regioncx.annotate(tcx, &mut err);
@ -409,7 +410,7 @@ pub(super) fn dump_annotation<'a, 'tcx>(
err err
} else { } 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); regioncx.annotate(tcx, &mut err);
err err

View file

@ -2,7 +2,7 @@ note: no external requirements
--> $DIR/escape-argument-callee.rs:26:38 --> $DIR/escape-argument-callee.rs:26:38
| |
LL | let mut closure = expect_sig(|p, y| *p = y); LL | let mut closure = expect_sig(|p, y| *p = y);
| ^^^^^^^^^^^^^ | ^^^^^^
| |
= note: defining type: test::{closure#0} with closure substs [ = note: defining type: test::{closure#0} with closure substs [
i16, i16,
@ -22,14 +22,8 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
note: no external requirements note: no external requirements
--> $DIR/escape-argument-callee.rs:20:1 --> $DIR/escape-argument-callee.rs:20:1
| |
LL | / fn test() { LL | fn test() {
LL | | let x = 44; | ^^^^^^^^^
LL | | let mut p = &x;
LL | |
... |
LL | | deref(p);
LL | | }
| |_^
| |
= note: defining type: test = note: defining type: test

View file

@ -2,7 +2,7 @@ note: no external requirements
--> $DIR/escape-argument.rs:26:38 --> $DIR/escape-argument.rs:26:38
| |
LL | let mut closure = expect_sig(|p, y| *p = y); LL | let mut closure = expect_sig(|p, y| *p = y);
| ^^^^^^^^^^^^^ | ^^^^^^
| |
= note: defining type: test::{closure#0} with closure substs [ = note: defining type: test::{closure#0} with closure substs [
i16, i16,
@ -13,14 +13,8 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
note: no external requirements note: no external requirements
--> $DIR/escape-argument.rs:20:1 --> $DIR/escape-argument.rs:20:1
| |
LL | / fn test() { LL | fn test() {
LL | | let x = 44; | ^^^^^^^^^
LL | | let mut p = &x;
LL | |
... |
LL | | deref(p);
LL | | }
| |_^
| |
= note: defining type: test = note: defining type: test

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/escape-upvar-nested.rs:21:32 --> $DIR/escape-upvar-nested.rs:21:32
| |
LL | let mut closure1 = || p = &y; LL | let mut closure1 = || p = &y;
| ^^^^^^^^^ | ^^
| |
= note: defining type: test::{closure#0}::{closure#0} with closure substs [ = note: defining type: test::{closure#0}::{closure#0} with closure substs [
i16, i16,
@ -15,12 +15,8 @@ LL | let mut closure1 = || p = &y;
note: external requirements note: external requirements
--> $DIR/escape-upvar-nested.rs:20:27 --> $DIR/escape-upvar-nested.rs:20:27
| |
LL | let mut closure = || { LL | let mut closure = || {
| ___________________________^ | ^^
LL | | let mut closure1 = || p = &y;
LL | | closure1();
LL | | };
| |_________^
| |
= note: defining type: test::{closure#0} with closure substs [ = note: defining type: test::{closure#0} with closure substs [
i16, i16,
@ -33,14 +29,8 @@ LL | | };
note: no external requirements note: no external requirements
--> $DIR/escape-upvar-nested.rs:13:1 --> $DIR/escape-upvar-nested.rs:13:1
| |
LL | / fn test() { LL | fn test() {
LL | | let x = 44; | ^^^^^^^^^
LL | | let mut p = &x;
LL | |
... |
LL | | deref(p);
LL | | }
| |_^
| |
= note: defining type: test = note: defining type: test

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/escape-upvar-ref.rs:23:27 --> $DIR/escape-upvar-ref.rs:23:27
| |
LL | let mut closure = || p = &y; LL | let mut closure = || p = &y;
| ^^^^^^^^^ | ^^
| |
= note: defining type: test::{closure#0} with closure substs [ = note: defining type: test::{closure#0} with closure substs [
i16, i16,
@ -15,14 +15,8 @@ LL | let mut closure = || p = &y;
note: no external requirements note: no external requirements
--> $DIR/escape-upvar-ref.rs:17:1 --> $DIR/escape-upvar-ref.rs:17:1
| |
LL | / fn test() { LL | fn test() {
LL | | let x = 44; | ^^^^^^^^^
LL | | let mut p = &x;
LL | |
... |
LL | | deref(p);
LL | | }
| |_^
| |
= note: defining type: test = note: defining type: test

View file

@ -1,12 +1,8 @@
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-fail-no-postdom.rs:43:9 --> $DIR/propagate-approximated-fail-no-postdom.rs:43:9
| |
LL | / |_outlives1, _outlives2, _outlives3, x, y| { LL | |_outlives1, _outlives2, _outlives3, x, y| {
LL | | // Only works if 'x: 'y: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | | let p = x.get();
LL | | demand_y(x, y, p)
LL | | },
| |_________^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -31,14 +27,8 @@ LL | demand_y(x, y, p)
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-fail-no-postdom.rs:38:1 --> $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 | 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 | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,13 +1,8 @@
note: external requirements note: external requirements
--> $DIR/propagate-approximated-ref.rs:43:47 --> $DIR/propagate-approximated-ref.rs:43:47
| |
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 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 | | });
| |_____^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -22,14 +17,8 @@ LL | | });
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-ref.rs:42:1 --> $DIR/propagate-approximated-ref.rs:42:1
| |
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>) {
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 | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,12 +1,8 @@
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15
| |
LL | foo(cell, |cell_a, cell_x| { LL | foo(cell, |cell_a, cell_x| {
| _______________^ | ^^^^^^^^^^^^^^^^
LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
LL | |
LL | | })
| |_____^
| |
= note: defining type: case1::{closure#0} with closure substs [ = note: defining type: case1::{closure#0} with closure substs [
i32, i32,
@ -27,25 +23,16 @@ LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1
| |
LL | / fn case1() { LL | fn case1() {
LL | | let a = 0; | ^^^^^^^^^^
LL | | let cell = Cell::new(&a);
LL | | foo(cell, |cell_a, cell_x| {
... |
LL | | })
LL | | }
| |_^
| |
= note: defining type: case1 = note: defining type: case1
note: external requirements note: external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15
| |
LL | foo(cell, |cell_a, cell_x| { LL | foo(cell, |cell_a, cell_x| {
| _______________^ | ^^^^^^^^^^^^^^^^
LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error
LL | | })
| |_____^
| |
= note: defining type: case2::{closure#0} with closure substs [ = note: defining type: case2::{closure#0} with closure substs [
i32, i32,
@ -58,14 +45,8 @@ LL | | })
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1 --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
| |
LL | / fn case2() { LL | fn case2() {
LL | | let a = 0; | ^^^^^^^^^^
LL | | let cell = Cell::new(&a);
LL | |
... |
LL | | })
LL | | }
| |_^
| |
= note: defining type: case2 = note: defining type: case2

View file

@ -1,14 +1,8 @@
note: external requirements note: external requirements
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47
| |
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 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 | | });
| |_____^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -23,14 +17,8 @@ LL | | });
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1 --> $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 | 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 | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,14 +1,8 @@
note: external requirements note: external requirements
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:47 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:47
| |
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 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 | | });
| |_____^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -23,14 +17,8 @@ LL | | });
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:34:1 --> $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 | 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 | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,13 +1,8 @@
note: external requirements note: external requirements
--> $DIR/propagate-approximated-val.rs:36:45 --> $DIR/propagate-approximated-val.rs:36:45
| |
LL | establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| { 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 | | });
| |_____^
| |
= note: defining type: test::{closure#0} with closure substs [ = note: defining type: test::{closure#0} with closure substs [
i16, i16,
@ -22,14 +17,8 @@ LL | | });
note: no external requirements note: no external requirements
--> $DIR/propagate-approximated-val.rs:35:1 --> $DIR/propagate-approximated-val.rs:35:1
| |
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>) {
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 | | }
| |_^
| |
= note: defining type: test = note: defining type: test

View file

@ -1,12 +1,8 @@
note: external requirements note: external requirements
--> $DIR/propagate-despite-same-free-region.rs:42:9 --> $DIR/propagate-despite-same-free-region.rs:42:9
| |
LL | / |_outlives1, _outlives2, x, y| { LL | |_outlives1, _outlives2, x, y| {
LL | | // Only works if 'x: 'y: | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | | let p = x.get();
LL | | demand_y(x, y, p)
LL | | },
| |_________^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -20,14 +16,8 @@ LL | | },
note: no external requirements note: no external requirements
--> $DIR/propagate-despite-same-free-region.rs:39:1 --> $DIR/propagate-despite-same-free-region.rs:39:1
| |
LL | / fn supply<'a>(cell_a: Cell<&'a u32>) { LL | fn supply<'a>(cell_a: Cell<&'a u32>) {
LL | | establish_relationships( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | | cell_a,
LL | | |_outlives1, _outlives2, x, y| {
... |
LL | | );
LL | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,13 +1,8 @@
note: no external requirements note: no external requirements
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:35:47 --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:35:47
| |
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 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 | | });
| |_____^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -31,14 +26,8 @@ LL | demand_y(x, y, x.get())
note: no external requirements note: no external requirements
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:34:1 --> $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 | 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 | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,13 +1,8 @@
note: no external requirements note: no external requirements
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:39:47 --> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:39:47
| |
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 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 | | });
| |_____^
| |
= note: defining type: supply::{closure#0} with closure substs [ = note: defining type: supply::{closure#0} with closure substs [
i16, i16,
@ -31,14 +26,8 @@ LL | demand_y(x, y, x.get())
note: no external requirements note: no external requirements
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:38:1 --> $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 | 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 | | }
| |_^
| |
= note: defining type: supply = note: defining type: supply

View file

@ -1,15 +1,8 @@
note: external requirements note: external requirements
--> $DIR/propagate-from-trait-match.rs:32:36 --> $DIR/propagate-from-trait-match.rs:32:36
| |
LL | establish_relationships(value, |value| { LL | establish_relationships(value, |value| {
| ____________________________________^ | ^^^^^^^
LL | |
LL | |
LL | | // This function call requires that
... |
LL | | require(value);
LL | | });
| |_____^
| |
= note: defining type: supply::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: supply::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -25,11 +18,7 @@ note: no external requirements
LL | / fn supply<'a, T>(value: T) LL | / fn supply<'a, T>(value: T)
LL | | where LL | | where
LL | | T: Trait<'a>, LL | | T: Trait<'a>,
LL | | { | |_________________^
... |
LL | | });
LL | | }
| |_^
| |
= note: defining type: supply::<'_#1r, T> = note: defining type: supply::<'_#1r, T>

View file

@ -2,7 +2,7 @@ note: no external requirements
--> $DIR/return-wrong-bound-region.rs:11:16 --> $DIR/return-wrong-bound-region.rs:11:16
| |
LL | expect_sig(|a, b| b); // ought to return `a` LL | expect_sig(|a, b| b); // ought to return `a`
| ^^^^^^^^ | ^^^^^^
| |
= note: defining type: test::{closure#0} with closure substs [ = note: defining type: test::{closure#0} with closure substs [
i16, i16,
@ -22,11 +22,8 @@ LL | expect_sig(|a, b| b); // ought to return `a`
note: no external requirements note: no external requirements
--> $DIR/return-wrong-bound-region.rs:10:1 --> $DIR/return-wrong-bound-region.rs:10:1
| |
LL | / fn test() { LL | fn test() {
LL | | expect_sig(|a, b| b); // ought to return `a` | ^^^^^^^^^
LL | |
LL | | }
| |_^
| |
= note: defining type: test = note: defining type: test

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/projection-no-regions-closure.rs:25:23 --> $DIR/projection-no-regions-closure.rs:25:23
| |
LL | with_signature(x, |mut y| Box::new(y.next())) LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^
| |
= note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -18,11 +18,7 @@ note: no external requirements
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where LL | | where
LL | | T: Iterator, LL | | T: Iterator,
LL | | { | |________________^
LL | | with_signature(x, |mut y| Box::new(y.next()))
LL | |
LL | | }
| |_^
| |
= note: defining type: no_region::<'_#1r, T> = note: defining type: no_region::<'_#1r, T>
@ -39,7 +35,7 @@ note: external requirements
--> $DIR/projection-no-regions-closure.rs:34:23 --> $DIR/projection-no-regions-closure.rs:34:23
| |
LL | with_signature(x, |mut y| Box::new(y.next())) LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^
| |
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -55,10 +51,7 @@ note: no external requirements
LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a> LL | / fn correct_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where LL | | where
LL | | T: 'a + Iterator, LL | | T: 'a + Iterator,
LL | | { | |_____________________^
LL | | with_signature(x, |mut y| Box::new(y.next()))
LL | | }
| |_^
| |
= note: defining type: correct_region::<'_#1r, T> = note: defining type: correct_region::<'_#1r, T>
@ -66,7 +59,7 @@ note: external requirements
--> $DIR/projection-no-regions-closure.rs:42:23 --> $DIR/projection-no-regions-closure.rs:42:23
| |
LL | with_signature(x, |mut y| Box::new(y.next())) LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^
| |
= note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: wrong_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -82,11 +75,7 @@ note: no external requirements
LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a> LL | / fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where LL | | where
LL | | T: 'b + Iterator, 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> = note: defining type: wrong_region::<'_#1r, '_#2r, T>
@ -103,7 +92,7 @@ note: external requirements
--> $DIR/projection-no-regions-closure.rs:52:23 --> $DIR/projection-no-regions-closure.rs:52:23
| |
LL | with_signature(x, |mut y| Box::new(y.next())) LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^
| |
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -120,10 +109,7 @@ LL | / fn outlives_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>
LL | | where LL | | where
LL | | T: 'b + Iterator, LL | | T: 'b + Iterator,
LL | | 'b: 'a, LL | | 'b: 'a,
LL | | { | |___________^
LL | | with_signature(x, |mut y| Box::new(y.next()))
LL | | }
| |_^
| |
= note: defining type: outlives_region::<'_#1r, '_#2r, T> = note: defining type: outlives_region::<'_#1r, '_#2r, T>

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/projection-one-region-closure.rs:45:29 --> $DIR/projection-one-region-closure.rs:45:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -20,11 +20,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | { | |____________________^
... |
LL | |
LL | | }
| |_^
| |
= note: defining type: no_relationships_late::<'_#1r, T> = note: defining type: no_relationships_late::<'_#1r, T>
@ -56,7 +52,7 @@ note: external requirements
--> $DIR/projection-one-region-closure.rs:56:29 --> $DIR/projection-one-region-closure.rs:56:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -74,10 +70,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | 'a: 'a, LL | | 'a: 'a,
... | | |___________^
LL | |
LL | | }
| |_^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T> = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>
@ -109,7 +102,7 @@ note: external requirements
--> $DIR/projection-one-region-closure.rs:70:29 --> $DIR/projection-one-region-closure.rs:70:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -126,10 +119,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | T::AssocType: 'a, LL | | T::AssocType: 'a,
... | | |_____________________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, T> = note: defining type: projection_outlives::<'_#1r, '_#2r, T>
@ -137,7 +127,7 @@ note: external requirements
--> $DIR/projection-one-region-closure.rs:80:29 --> $DIR/projection-one-region-closure.rs:80:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -155,10 +145,8 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | T: 'a, LL | | T: 'a,
... | LL | | 'b: 'a,
LL | | with_signature(cell, t, |cell, t| require(cell, t)); | |___________^
LL | | }
| |_^
| |
= note: defining type: elements_outlive::<'_#1r, '_#2r, T> = note: defining type: elements_outlive::<'_#1r, '_#2r, T>

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/projection-one-region-trait-bound-closure.rs:37:29 --> $DIR/projection-one-region-trait-bound-closure.rs:37:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -19,11 +19,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, 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> = 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 --> $DIR/projection-one-region-trait-bound-closure.rs:47:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -61,10 +57,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | 'a: 'a, LL | | 'a: 'a,
... | | |___________^
LL | |
LL | | }
| |_^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-one-region-trait-bound-closure.rs:60:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -102,10 +95,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | T::AssocType: 'a, LL | | T::AssocType: 'a,
... | | |_____________________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-one-region-trait-bound-closure.rs:69:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -130,10 +120,7 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | 'b: 'a, LL | | 'b: 'a,
LL | | { | |___________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: elements_outlive::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-one-region-trait-bound-closure.rs:81:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -157,11 +144,7 @@ note: no external requirements
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'a>, LL | | T: Anything<'a>,
LL | | { | |____________________^
... |
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: one_region::<'_#1r, T> = note: defining type: one_region::<'_#1r, T>

View file

@ -2,7 +2,7 @@ note: no external requirements
--> $DIR/projection-one-region-trait-bound-static-closure.rs:36:29 --> $DIR/projection-one-region-trait-bound-static-closure.rs:36:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_late::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -17,10 +17,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | { | |____________________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: no_relationships_late::<'_#1r, T> = 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 --> $DIR/projection-one-region-trait-bound-static-closure.rs:45:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_early::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -43,10 +40,7 @@ LL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | 'a: 'a, LL | | 'a: 'a,
LL | | { | |___________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-one-region-trait-bound-static-closure.rs:64:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: projection_outlives::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -69,10 +63,7 @@ LL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | T::AssocType: 'a, LL | | T::AssocType: 'a,
... | | |_____________________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-one-region-trait-bound-static-closure.rs:73:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: elements_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -95,10 +86,7 @@ LL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b>, LL | | T: Anything<'b>,
LL | | 'b: 'a, LL | | 'b: 'a,
LL | | { | |___________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: elements_outlive::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-one-region-trait-bound-static-closure.rs:85:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -120,11 +108,7 @@ note: no external requirements
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'a>, LL | | T: Anything<'a>,
LL | | { | |____________________^
... |
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: one_region::<'_#1r, T> = note: defining type: one_region::<'_#1r, T>

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:38:29 --> $DIR/projection-two-region-trait-bound-closure.rs:38:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: no_relationships_late::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: no_relationships_late::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -19,11 +19,7 @@ note: no external requirements
LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T) LL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'c>, 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> = 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 --> $DIR/projection-two-region-trait-bound-closure.rs:48:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); 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 [ = note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32, i32,
@ -57,10 +53,7 @@ LL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'c>, LL | | T: Anything<'b, 'c>,
LL | | 'a: 'a, LL | | 'a: 'a,
... | | |___________^
LL | |
LL | | }
| |_^
| |
= note: defining type: no_relationships_early::<'_#1r, '_#2r, '_#3r, T> = 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 --> $DIR/projection-two-region-trait-bound-closure.rs:61:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [ = note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32, i32,
@ -94,10 +87,7 @@ LL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'c>, LL | | T: Anything<'b, 'c>,
LL | | T::AssocType: 'a, LL | | T::AssocType: 'a,
... | | |_____________________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: projection_outlives::<'_#1r, '_#2r, '_#3r, T> = 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 --> $DIR/projection-two-region-trait-bound-closure.rs:70:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [ = note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32, i32,
@ -122,10 +112,7 @@ LL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'c>, LL | | T: Anything<'b, 'c>,
LL | | 'b: 'a, LL | | 'b: 'a,
LL | | { | |___________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: elements_outlive1::<'_#1r, '_#2r, '_#3r, T> = 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 --> $DIR/projection-two-region-trait-bound-closure.rs:79:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [ = note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T>::{closure#0} with closure substs [
i32, i32,
@ -150,10 +137,7 @@ LL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'c>, LL | | T: Anything<'b, 'c>,
LL | | 'c: 'a, LL | | 'c: 'a,
LL | | { | |___________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: elements_outlive2::<'_#1r, '_#2r, '_#3r, T> = 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 --> $DIR/projection-two-region-trait-bound-closure.rs:87:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: two_regions::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: two_regions::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -178,11 +162,7 @@ note: no external requirements
LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T) LL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'b>, 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> = note: defining type: two_regions::<'_#1r, T>
@ -203,7 +183,7 @@ note: external requirements
--> $DIR/projection-two-region-trait-bound-closure.rs:97:29 --> $DIR/projection-two-region-trait-bound-closure.rs:97:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: two_regions_outlive::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -220,10 +200,7 @@ LL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'b, 'b>, LL | | T: Anything<'b, 'b>,
LL | | 'b: 'a, LL | | 'b: 'a,
LL | | { | |___________^
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: two_regions_outlive::<'_#1r, '_#2r, T> = 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 --> $DIR/projection-two-region-trait-bound-closure.rs:109:29
| |
LL | with_signature(cell, t, |cell, t| require(cell, t)); LL | with_signature(cell, t, |cell, t| require(cell, t));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^
| |
= note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: one_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -247,11 +224,7 @@ note: no external requirements
LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T) LL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)
LL | | where LL | | where
LL | | T: Anything<'a, 'a>, LL | | T: Anything<'a, 'a>,
LL | | { | |________________________^
... |
LL | | with_signature(cell, t, |cell, t| require(cell, t));
LL | | }
| |_^
| |
= note: defining type: one_region::<'_#1r, T> = note: defining type: one_region::<'_#1r, T>

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24 --> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24
| |
LL | twice(cell, value, |a, b| invoke(a, b)); LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^
| |
= note: defining type: generic::<T>::{closure#0} with closure substs [ = note: defining type: generic::<T>::{closure#0} with closure substs [
i16, i16,
@ -15,11 +15,8 @@ LL | twice(cell, value, |a, b| invoke(a, b));
note: no external requirements note: no external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1 --> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
| |
LL | / fn generic<T>(value: T) { LL | fn generic<T>(value: T) {
LL | | let cell = Cell::new(&()); | ^^^^^^^^^^^^^^^^^^^^^^^
LL | | twice(cell, value, |a, b| invoke(a, b));
LL | | }
| |_^
| |
= note: defining type: generic::<T> = note: defining type: generic::<T>
@ -27,7 +24,7 @@ note: external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
| |
LL | twice(cell, value, |a, b| invoke(a, b)); LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^
| |
= note: defining type: generic_fail::<T>::{closure#0} with closure substs [ = note: defining type: generic_fail::<T>::{closure#0} with closure substs [
i16, i16,
@ -41,11 +38,8 @@ LL | twice(cell, value, |a, b| invoke(a, b));
note: no external requirements note: no external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1 --> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
| |
LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { LL | fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
LL | | twice(cell, value, |a, b| invoke(a, b)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | |
LL | | }
| |_^
| |
= note: defining type: generic_fail::<T> = note: defining type: generic_fail::<T>

View file

@ -2,7 +2,7 @@ note: external requirements
--> $DIR/ty-param-closure-outlives-from-return-type.rs:26:23 --> $DIR/ty-param-closure-outlives-from-return-type.rs:26:23
| |
LL | with_signature(x, |y| y) LL | with_signature(x, |y| y)
| ^^^^^ | ^^^
| |
= note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: no_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -18,11 +18,7 @@ note: no external requirements
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a> LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
LL | | where LL | | where
LL | | T: Debug, LL | | T: Debug,
LL | | { | |_____________^
... |
LL | |
LL | | }
| |_^
| |
= note: defining type: no_region::<'_#1r, T> = note: defining type: no_region::<'_#1r, T>

View file

@ -1,15 +1,8 @@
note: external requirements note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:27:26
| |
LL | with_signature(a, b, |x, y| { LL | with_signature(a, b, |x, y| {
| __________________________^ | ^^^^^^
LL | |
LL | | //
LL | | // See `correct_region`, which explains the point of this
... |
LL | | require(&x, &y)
LL | | })
| |_____^
| |
= note: defining type: no_region::<T>::{closure#0} with closure substs [ = note: defining type: no_region::<T>::{closure#0} with closure substs [
i32, i32,
@ -23,14 +16,8 @@ LL | | })
note: no external requirements note: no external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:26:1
| |
LL | / fn no_region<'a, T>(a: Cell<&'a ()>, b: T) { LL | fn no_region<'a, T>(a: Cell<&'a ()>, b: T) {
LL | | with_signature(a, b, |x, y| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | |
LL | | //
... |
LL | | })
LL | | }
| |_^
| |
= note: defining type: no_region::<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 note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:43:26
| |
LL | with_signature(a, b, |x, y| { 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 | | })
| |_____^
| |
= note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: correct_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -79,24 +59,15 @@ note: no external requirements
LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T) LL | / fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)
LL | | where LL | | where
LL | | T: 'a, LL | | T: 'a,
LL | | { | |__________^
... |
LL | | })
LL | | }
| |_^
| |
= note: defining type: correct_region::<'_#1r, T> = note: defining type: correct_region::<'_#1r, T>
note: external requirements note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:64:26
| |
LL | with_signature(a, b, |x, y| { LL | with_signature(a, b, |x, y| {
| __________________________^ | ^^^^^^
LL | |
LL | | // See `correct_region`
LL | | require(&x, &y)
LL | | })
| |_____^
| |
= note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [ = note: defining type: wrong_region::<'_#1r, T>::{closure#0} with closure substs [
i32, i32,
@ -113,11 +84,7 @@ note: no external requirements
LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T) LL | / fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
LL | | where LL | | where
LL | | T: 'b, LL | | T: 'b,
LL | | { | |__________^
... |
LL | | })
LL | | }
| |_^
| |
= note: defining type: wrong_region::<'_#1r, T> = note: defining type: wrong_region::<'_#1r, T>
@ -140,12 +107,8 @@ LL | T: 'b + 'a,
note: external requirements note: external requirements
--> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26 --> $DIR/ty-param-closure-outlives-from-where-clause.rs:77:26
| |
LL | with_signature(a, b, |x, y| { LL | with_signature(a, b, |x, y| {
| __________________________^ | ^^^^^^
LL | | // See `correct_region`
LL | | require(&x, &y)
LL | | })
| |_____^
| |
= note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [ = note: defining type: outlives_region::<'_#1r, '_#2r, T>::{closure#0} with closure substs [
i32, i32,
@ -162,10 +125,7 @@ LL | / fn outlives_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)
LL | | where LL | | where
LL | | T: 'b, LL | | T: 'b,
LL | | 'b: 'a, LL | | 'b: 'a,
... | | |___________^
LL | | })
LL | | }
| |_^
| |
= note: defining type: outlives_region::<'_#1r, '_#2r, T> = note: defining type: outlives_region::<'_#1r, '_#2r, T>