about summary refs log tree commit diff
path: root/src/test/ui/nll
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-12-06 05:50:49 -0500
committerNiko Matsakis <niko@alum.mit.edu>2017-12-15 10:27:54 -0500
commit0d6bd42abb0b6082d23e7fe84b0121dfa0476b78 (patch)
tree75c4dc8d332f554c027475a004d040ea56574086 /src/test/ui/nll
parenta118afe7ca742872f2064e26ddf97394d091ce3b (diff)
downloadrust-0d6bd42abb0b6082d23e7fe84b0121dfa0476b78.tar.gz
rust-0d6bd42abb0b6082d23e7fe84b0121dfa0476b78.zip
make `blame_span` deterministic
Diffstat (limited to 'src/test/ui/nll')
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs2
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr10
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr4
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs3
-rw-r--r--src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr30
7 files changed, 29 insertions, 28 deletions
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
index c2f071cc029..50d7877de50 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
@@ -54,8 +54,8 @@ fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell
             // Only works if 'x: 'y:
             let p = x.get();
             //~^ WARN not reporting region error due to -Znll
+            //~| ERROR free region `'_#5r` does not outlive free region `'_#6r`
             demand_y(x, y, p)
-            //~^ ERROR free region `'_#5r` does not outlive free region `'_#6r`
         },
     );
 }
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
index cdda8ab5392..f90bc7c175a 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.stderr
@@ -5,10 +5,10 @@ warning: not reporting region error due to -Znll
    |                     ^^^^^^^
 
 error: free region `'_#5r` does not outlive free region `'_#6r`
-  --> $DIR/propagate-approximated-fail-no-postdom.rs:57:25
+  --> $DIR/propagate-approximated-fail-no-postdom.rs:55:17
    |
-57 |             demand_y(x, y, p)
-   |                         ^
+55 |             let p = x.get();
+   |                 ^
 
 note: No external requirements
   --> $DIR/propagate-approximated-fail-no-postdom.rs:53:9
@@ -17,8 +17,8 @@ note: No external requirements
 54 | |             // Only works if 'x: 'y:
 55 | |             let p = x.get();
 56 | |             //~^ WARN not reporting region error due to -Znll
-57 | |             demand_y(x, y, p)
-58 | |             //~^ ERROR free region `'_#5r` does not outlive free region `'_#6r`
+57 | |             //~| ERROR free region `'_#5r` does not outlive free region `'_#6r`
+58 | |             demand_y(x, y, p)
 59 | |         },
    | |_________^
    |
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
index 717cf481a01..4bae29ad326 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-ref.stderr
@@ -24,10 +24,10 @@ note: External requirements
    = note: where '_#1r: '_#2r
 
 error: free region `'_#1r` does not outlive free region `'_#2r`
-  --> $DIR/propagate-approximated-ref.rs:53:38
+  --> $DIR/propagate-approximated-ref.rs:53:29
    |
 53 |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
-   |                                      ^^^^^^^
+   |                             ^^^^^^^
 
 note: No external requirements
   --> $DIR/propagate-approximated-ref.rs:52:1
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr
index e8dc8a13f87..502b344c89e 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-to-empty.stderr
@@ -5,10 +5,10 @@ warning: not reporting region error due to -Znll
    |         ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: free region `'_#6r` does not outlive free region `'_#4r`
-  --> $DIR/propagate-approximated-to-empty.rs:41:21
+  --> $DIR/propagate-approximated-to-empty.rs:41:18
    |
 41 |         demand_y(x, y, x.get())
-   |                     ^
+   |                  ^
 
 note: No external requirements
   --> $DIR/propagate-approximated-to-empty.rs:39:47
diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
index 43464bfb2b9..43d61fdf1b5 100644
--- a/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-approximated-val.stderr
@@ -24,10 +24,10 @@ note: External requirements
    = note: where '_#1r: '_#2r
 
 error: free region `'_#1r` does not outlive free region `'_#2r`
-  --> $DIR/propagate-approximated-val.rs:46:37
+  --> $DIR/propagate-approximated-val.rs:46:29
    |
 46 |     establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {
-   |                                     ^^^^^^
+   |                             ^^^^^^
 
 note: No external requirements
   --> $DIR/propagate-approximated-val.rs:45:1
diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs
index d5bd4b60118..a5be2b43f04 100644
--- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs
+++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs
@@ -40,6 +40,8 @@ where
     T: Trait<'a>,
 {
     establish_relationships(value, |value| {
+        //~^ ERROR failed type test
+
         // This function call requires that
         //
         // (a) T: Trait<'a>
@@ -52,7 +54,6 @@ where
 
         require(value);
         //~^ WARNING not reporting region error due to -Znll
-        //~| ERROR failed type test
     });
 }
 
diff --git a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
index eb415ec8d1a..e81c45ef7ed 100644
--- a/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
+++ b/src/test/ui/nll/closure-requirements/propagate-from-trait-match.stderr
@@ -1,7 +1,7 @@
 warning: not reporting region error due to -Znll
-  --> $DIR/propagate-from-trait-match.rs:53:9
+  --> $DIR/propagate-from-trait-match.rs:55:9
    |
-53 |         require(value);
+55 |         require(value);
    |         ^^^^^^^
 
 note: External requirements
@@ -9,12 +9,12 @@ note: External requirements
    |
 42 |       establish_relationships(value, |value| {
    |  ____________________________________^
-43 | |         // This function call requires that
-44 | |         //
-45 | |         // (a) T: Trait<'a>
+43 | |         //~^ ERROR failed type test
+44 | |
+45 | |         // This function call requires that
 ...  |
-55 | |         //~| ERROR failed type test
-56 | |     });
+56 | |         //~^ WARNING not reporting region error due to -Znll
+57 | |     });
    | |_____^
    |
    = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [
@@ -26,17 +26,17 @@ note: External requirements
    = note: number of external vids: 2
    = note: where T: '_#1r
 
-error: failed type test: TypeTest { generic_kind: T/#1, lower_bound: '_#3r, point: bb0[3], span: $DIR/propagate-from-trait-match.rs:42:36: 56:6, test: IsOutlivedByAnyRegionIn(['_#2r]) }
+error: failed type test: TypeTest { generic_kind: T/#1, lower_bound: '_#3r, point: bb0[3], span: $DIR/propagate-from-trait-match.rs:42:36: 57:6, test: IsOutlivedByAnyRegionIn(['_#2r]) }
   --> $DIR/propagate-from-trait-match.rs:42:36
    |
 42 |       establish_relationships(value, |value| {
    |  ____________________________________^
-43 | |         // This function call requires that
-44 | |         //
-45 | |         // (a) T: Trait<'a>
+43 | |         //~^ ERROR failed type test
+44 | |
+45 | |         // This function call requires that
 ...  |
-55 | |         //~| ERROR failed type test
-56 | |     });
+56 | |         //~^ WARNING not reporting region error due to -Znll
+57 | |     });
    | |_____^
 
 note: No external requirements
@@ -47,8 +47,8 @@ note: No external requirements
 40 | |     T: Trait<'a>,
 41 | | {
 ...  |
-56 | |     });
-57 | | }
+57 | |     });
+58 | | }
    | |_^
    |
    = note: defining type: DefId(0/0:6 ~ propagate_from_trait_match[317d]::supply[0]) with substs [