diff options
| author | Florian Hartwig <florian.j.hartwig@gmail.com> | 2017-05-17 21:27:58 +0200 |
|---|---|---|
| committer | Florian Hartwig <florian.j.hartwig@gmail.com> | 2017-05-18 00:21:57 +0200 |
| commit | eb703f78515db10854d290b2f16e332cbc1c510d (patch) | |
| tree | 1779096c3626a445f0fed498df3be702e0a81a6f /src/test/ui/lifetime-errors | |
| parent | 2b6ed3a05149325448a42a119a3174093caa41f3 (diff) | |
Fix off-by-one error in column number in `explain_span`.
Diffstat (limited to 'src/test/ui/lifetime-errors')
6 files changed, 12 insertions, 12 deletions
diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr index 55723ee8cd9..f325d10b548 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else.stderr @@ -4,14 +4,14 @@ error[E0312]: lifetime of reference outlives lifetime of borrowed content... 12 | if x > y { x } else { y } | ^ | -note: ...the reference is valid for the lifetime 'a as defined on the function body at 11:0... +note: ...the reference is valid for the lifetime 'a as defined on the function body at 11:1... --> $DIR/ex1-return-one-existing-name-if-else.rs:11:1 | 11 | / fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { 12 | | if x > y { x } else { y } 13 | | } | |_^ -note: ...but the borrowed content is only valid for the anonymous lifetime #1 defined on the function body at 11:0 +note: ...but the borrowed content is only valid for the anonymous lifetime #1 defined on the function body at 11:1 --> $DIR/ex1-return-one-existing-name-if-else.rs:11:1 | 11 | / fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { diff --git a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr index b7d985feca9..df484a14927 100644 --- a/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr +++ b/src/test/ui/lifetime-errors/ex2a-push-one-existing-name.stderr @@ -6,14 +6,14 @@ error[E0308]: mismatched types | = note: expected type `Ref<'a, _>` found type `Ref<'_, _>` -note: the anonymous lifetime #2 defined on the function body at 15:0... +note: the anonymous lifetime #2 defined on the function body at 15:1... --> $DIR/ex2a-push-one-existing-name.rs:15:1 | 15 | / fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) { 16 | | x.push(y); 17 | | } | |_^ -note: ...does not necessarily outlive the lifetime 'a as defined on the function body at 15:0 +note: ...does not necessarily outlive the lifetime 'a as defined on the function body at 15:1 --> $DIR/ex2a-push-one-existing-name.rs:15:1 | 15 | / fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) { diff --git a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr index 3a6e94f2b1c..6764c58f4bb 100644 --- a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr +++ b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.stderr @@ -6,14 +6,14 @@ error[E0308]: mismatched types | = note: expected type `Ref<'_, _>` found type `Ref<'_, _>` -note: the anonymous lifetime #3 defined on the function body at 15:0... +note: the anonymous lifetime #3 defined on the function body at 15:1... --> $DIR/ex2b-push-no-existing-names.rs:15:1 | 15 | / fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) { 16 | | x.push(y); 17 | | } | |_^ -note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 15:0 +note: ...does not necessarily outlive the anonymous lifetime #2 defined on the function body at 15:1 --> $DIR/ex2b-push-no-existing-names.rs:15:1 | 15 | / fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) { diff --git a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr index 3d7064a4f71..7356fc11862 100644 --- a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr @@ -4,7 +4,7 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` d 16 | let z = Ref { data: y.data }; | ^^^ | -note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:0... +note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:1... --> $DIR/ex2c-push-inference-variable.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { @@ -17,7 +17,7 @@ note: ...so that reference does not outlive borrowed content | 16 | let z = Ref { data: y.data }; | ^^^^^^ -note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:0... +note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:1... --> $DIR/ex2c-push-inference-variable.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { diff --git a/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr b/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr index aced855bf66..38b0acf9339 100644 --- a/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr +++ b/src/test/ui/lifetime-errors/ex2d-push-inference-variable-2.stderr @@ -4,7 +4,7 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` d 17 | let b = Ref { data: y.data }; | ^^^ | -note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:0... +note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:1... --> $DIR/ex2d-push-inference-variable-2.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { @@ -18,7 +18,7 @@ note: ...so that reference does not outlive borrowed content | 17 | let b = Ref { data: y.data }; | ^^^^^^ -note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:0... +note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:1... --> $DIR/ex2d-push-inference-variable-2.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { diff --git a/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr b/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr index 07e2316b63d..035e516e862 100644 --- a/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr +++ b/src/test/ui/lifetime-errors/ex2e-push-inference-variable-3.stderr @@ -4,7 +4,7 @@ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` d 17 | let b = Ref { data: y.data }; | ^^^ | -note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:0... +note: first, the lifetime cannot outlive the lifetime 'c as defined on the function body at 15:1... --> $DIR/ex2e-push-inference-variable-3.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { @@ -18,7 +18,7 @@ note: ...so that reference does not outlive borrowed content | 17 | let b = Ref { data: y.data }; | ^^^^^^ -note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:0... +note: but, the lifetime must be valid for the lifetime 'b as defined on the function body at 15:1... --> $DIR/ex2e-push-inference-variable-3.rs:15:1 | 15 | / fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { |
