summaryrefslogtreecommitdiffstats
path: root/tests/ui/span
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/span')
-rw-r--r--tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr3
-rw-r--r--tests/ui/span/borrowck-let-suggestion-suffixes.rs1
-rw-r--r--tests/ui/span/borrowck-let-suggestion-suffixes.stderr11
-rw-r--r--tests/ui/span/coerce-suggestions.stderr6
-rw-r--r--tests/ui/span/destructor-restrictions.stderr2
-rw-r--r--tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs12
-rw-r--r--tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr93
-rw-r--r--tests/ui/span/dropck-object-cycle.stderr2
-rw-r--r--tests/ui/span/dropck_arr_cycle_checked.stderr9
-rw-r--r--tests/ui/span/dropck_direct_cycle_with_drop.stderr5
-rw-r--r--tests/ui/span/dropck_misc_variants.stderr6
-rw-r--r--tests/ui/span/dropck_vec_cycle_checked.stderr9
-rw-r--r--tests/ui/span/issue-107353.rs9
-rw-r--r--tests/ui/span/issue-23338-locals-die-before-temps-of-body.stderr4
-rw-r--r--tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr3
-rw-r--r--tests/ui/span/issue-24805-dropck-trait-has-items.stderr9
-rw-r--r--tests/ui/span/issue-24895-copy-clone-dropck.stderr3
-rw-r--r--tests/ui/span/issue-25199.stderr2
-rw-r--r--tests/ui/span/issue-26656.stderr3
-rw-r--r--tests/ui/span/issue-29106.stderr6
-rw-r--r--tests/ui/span/issue-33884.stderr2
-rw-r--r--tests/ui/span/issue-34264.stderr18
-rw-r--r--tests/ui/span/issue-36537.stderr2
-rw-r--r--tests/ui/span/issue-37767.stderr12
-rw-r--r--tests/ui/span/issue-39018.stderr2
-rw-r--r--tests/ui/span/issue-40157.stderr9
-rw-r--r--tests/ui/span/issue-42234-unknown-receiver-type.full.stderr2
-rw-r--r--tests/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr2
-rw-r--r--tests/ui/span/issue28498-reject-lifetime-param.stderr3
-rw-r--r--tests/ui/span/issue28498-reject-passed-to-fn.stderr3
-rw-r--r--tests/ui/span/issue28498-reject-trait-bound.stderr3
-rw-r--r--tests/ui/span/missing-unit-argument.stderr4
-rw-r--r--tests/ui/span/mut-ptr-cant-outlive-ref.stderr2
-rw-r--r--tests/ui/span/range-2.stderr8
-rw-r--r--tests/ui/span/regionck-unboxed-closure-lifetimes.stderr2
-rw-r--r--tests/ui/span/regions-close-over-type-parameter-2.stderr2
-rw-r--r--tests/ui/span/regions-escape-loop-via-variable.stderr4
-rw-r--r--tests/ui/span/regions-escape-loop-via-vec.stderr13
-rw-r--r--tests/ui/span/regions-infer-borrow-scope-within-loop.stderr3
-rw-r--r--tests/ui/span/send-is-not-static-ensures-scoping.stderr1
-rw-r--r--tests/ui/span/send-is-not-static-std-sync-2.stderr6
-rw-r--r--tests/ui/span/send-is-not-static-std-sync.stderr15
-rw-r--r--tests/ui/span/type-annotations-needed-expr.stderr2
-rw-r--r--tests/ui/span/vec-must-not-hide-type-from-dropck.stderr6
-rw-r--r--tests/ui/span/vec_refs_data_with_early_death.stderr6
-rw-r--r--tests/ui/span/wf-method-late-bound-regions.stderr1
46 files changed, 186 insertions, 145 deletions
diff --git a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
index 48b42bc78..9711dad80 100644
--- a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
+++ b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
@@ -47,6 +47,9 @@ LL | foo(f);
error[E0505]: cannot move out of `f` because it is borrowed
--> $DIR/borrowck-call-is-borrow-issue-12224.rs:55:16
|
+LL | let mut f = move |g: Box<dyn FnMut(isize)>, b: isize| {
+ | ----- binding `f` declared here
+...
LL | f(Box::new(|a| {
| - ^^^ move out of `f` occurs here
| |
diff --git a/tests/ui/span/borrowck-let-suggestion-suffixes.rs b/tests/ui/span/borrowck-let-suggestion-suffixes.rs
index 18abfb5c3..ad556f281 100644
--- a/tests/ui/span/borrowck-let-suggestion-suffixes.rs
+++ b/tests/ui/span/borrowck-let-suggestion-suffixes.rs
@@ -8,6 +8,7 @@ fn f() {
{
let young = ['y']; // statement 3
+ //~^ NOTE binding `young` declared here
v2.push(&young[0]); // statement 4
//~^ ERROR `young[_]` does not live long enough
diff --git a/tests/ui/span/borrowck-let-suggestion-suffixes.stderr b/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
index 2dc29a78d..545b235a5 100644
--- a/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
+++ b/tests/ui/span/borrowck-let-suggestion-suffixes.stderr
@@ -1,6 +1,9 @@
error[E0597]: `young[_]` does not live long enough
- --> $DIR/borrowck-let-suggestion-suffixes.rs:12:17
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:13:17
|
+LL | let young = ['y']; // statement 3
+ | ----- binding `young` declared here
+...
LL | v2.push(&young[0]); // statement 4
| ^^^^^^^^^ borrowed value does not live long enough
...
@@ -11,7 +14,7 @@ LL | (v1, v2, v3, /* v4 is above. */ v5).use_ref();
| -- borrow later used here
error[E0716]: temporary value dropped while borrowed
- --> $DIR/borrowck-let-suggestion-suffixes.rs:19:14
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:20:14
|
LL | v3.push(&id('x')); // statement 6
| ^^^^^^^ - temporary value is freed at the end of this statement
@@ -28,7 +31,7 @@ LL ~ v3.push(&binding); // statement 6
|
error[E0716]: temporary value dropped while borrowed
- --> $DIR/borrowck-let-suggestion-suffixes.rs:29:18
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:30:18
|
LL | v4.push(&id('y'));
| ^^^^^^^ - temporary value is freed at the end of this statement
@@ -41,7 +44,7 @@ LL | v4.use_ref();
= note: consider using a `let` binding to create a longer lived value
error[E0716]: temporary value dropped while borrowed
- --> $DIR/borrowck-let-suggestion-suffixes.rs:40:14
+ --> $DIR/borrowck-let-suggestion-suffixes.rs:41:14
|
LL | v5.push(&id('z'));
| ^^^^^^^ - temporary value is freed at the end of this statement
diff --git a/tests/ui/span/coerce-suggestions.stderr b/tests/ui/span/coerce-suggestions.stderr
index db784d5fe..bb30f000e 100644
--- a/tests/ui/span/coerce-suggestions.stderr
+++ b/tests/ui/span/coerce-suggestions.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/coerce-suggestions.rs:7:20
|
LL | let x: usize = String::new();
- | ----- ^^^^^^^^^^^^^ expected `usize`, found struct `String`
+ | ----- ^^^^^^^^^^^^^ expected `usize`, found `String`
| |
| expected due to this
@@ -12,7 +12,7 @@ error[E0308]: mismatched types
LL | let x: &str = String::new();
| ---- ^^^^^^^^^^^^^
| | |
- | | expected `&str`, found struct `String`
+ | | expected `&str`, found `String`
| | help: consider borrowing here: `&String::new()`
| expected due to this
@@ -63,7 +63,7 @@ error[E0308]: mismatched types
--> $DIR/coerce-suggestions.rs:21:9
|
LL | s = format!("foo");
- | ^^^^^^^^^^^^^^ expected `&mut String`, found struct `String`
+ | ^^^^^^^^^^^^^^ expected `&mut String`, found `String`
|
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/span/destructor-restrictions.stderr b/tests/ui/span/destructor-restrictions.stderr
index 53c940462..281248626 100644
--- a/tests/ui/span/destructor-restrictions.stderr
+++ b/tests/ui/span/destructor-restrictions.stderr
@@ -1,6 +1,8 @@
error[E0597]: `*a` does not live long enough
--> $DIR/destructor-restrictions.rs:8:10
|
+LL | let a = Box::new(RefCell::new(4));
+ | - binding `a` declared here
LL | *a.borrow() + 1
| ^^^^^^^^^^
| |
diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
index 4559da91e..f20024e75 100644
--- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
+++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs
@@ -3,16 +3,10 @@
pub struct A {}
impl A {
- async fn create(path: impl AsRef<std::path::Path>) { //~ ERROR `async fn` is not permitted in Rust 2015
- //~^ WARN changes to closure capture in Rust 2021 will affect drop order [rust_2021_incompatible_closure_captures]
+ async fn create(path: impl AsRef<std::path::Path>) {
;
- crate(move || {} ).await //~ ERROR expected function, found module `crate`
+ crate(move || {} ).await
}
}
-trait C{async fn new(val: T) {} //~ ERROR `async fn` is not permitted in Rust 2015
-//~^ ERROR functions in traits cannot be declared `async`
-//~| ERROR cannot find type `T` in this scope
-//~| WARN changes to closure capture in Rust 2021 will affect drop order [rust_2021_incompatible_closure_captures]
-
-//~ ERROR this file contains an unclosed delimiter
+trait C{async fn new(val: T) {} //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
index df1cafdb7..1ec8ca427 100644
--- a/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
+++ b/tests/ui/span/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.stderr
@@ -1,95 +1,8 @@
error: this file contains an unclosed delimiter
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:18:53
+ --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:12:85
|
LL | trait C{async fn new(val: T) {}
- | - unclosed delimiter
-...
-LL |
- | ^
+ | - unclosed delimiter ^
-error[E0670]: `async fn` is not permitted in Rust 2015
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:6:5
- |
-LL | async fn create(path: impl AsRef<std::path::Path>) {
- | ^^^^^ to use `async fn`, switch to Rust 2018 or later
- |
- = help: pass `--edition 2021` to `rustc`
- = note: for more on editions, read https://doc.rust-lang.org/edition-guide
-
-error[E0670]: `async fn` is not permitted in Rust 2015
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:9
- |
-LL | trait C{async fn new(val: T) {}
- | ^^^^^ to use `async fn`, switch to Rust 2018 or later
- |
- = help: pass `--edition 2021` to `rustc`
- = note: for more on editions, read https://doc.rust-lang.org/edition-guide
-
-error[E0412]: cannot find type `T` in this scope
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:27
- |
-LL | pub struct A {}
- | ------------ similarly named struct `A` defined here
-...
-LL | trait C{async fn new(val: T) {}
- | ^ help: a struct with a similar name exists: `A`
-
-error[E0706]: functions in traits cannot be declared `async`
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:9
- |
-LL | trait C{async fn new(val: T) {}
- | -----^^^^^^^^^^^^^^^
- | |
- | `async` because of this
- |
- = note: `async` trait functions are not currently supported
- = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
- = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
- = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
-
-error[E0423]: expected function, found module `crate`
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:9:5
- |
-LL | crate(move || {} ).await
- | ^^^^^ not a function
-
-warning: changes to closure capture in Rust 2021 will affect drop order
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:6:57
- |
-LL | async fn create(path: impl AsRef<std::path::Path>) {
- | _____________________----_____________________________-__^
- | | | |
- | | | in Rust 2018, `path` is dropped here along with the closure, but in Rust 2021 `path` is not part of the closure
- | | in Rust 2018, this causes the closure to capture `path`, but in Rust 2021, it has no effect
-LL | |
-LL | | ;
-LL | | crate(move || {} ).await
-LL | | }
- | |_____^
- |
- = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
- = note: requested on the command line with `-W rust-2021-incompatible-closure-captures`
-help: add a dummy let to cause `path` to be fully captured
- |
-LL | async fn create(path: impl AsRef<std::path::Path>) { let _ = &path;
- | ++++++++++++++
-
-warning: changes to closure capture in Rust 2021 will affect drop order
- --> $DIR/drop-location-span-error-rust-2021-incompatible-closure-captures-93117.rs:13:30
- |
-LL | trait C{async fn new(val: T) {}
- | --- - ^^
- | | |
- | | in Rust 2018, `val` is dropped here along with the closure, but in Rust 2021 `val` is not part of the closure
- | in Rust 2018, this causes the closure to capture `val`, but in Rust 2021, it has no effect
- |
- = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html>
-help: add a dummy let to cause `val` to be fully captured
- |
-LL | trait C{async fn new(val: T) { let _ = &val;}
- | +++++++++++++
-
-error: aborting due to 6 previous errors; 2 warnings emitted
+error: aborting due to previous error
-Some errors have detailed explanations: E0412, E0423, E0670, E0706.
-For more information about an error, try `rustc --explain E0412`.
diff --git a/tests/ui/span/dropck-object-cycle.stderr b/tests/ui/span/dropck-object-cycle.stderr
index 229d17e1c..097fb6219 100644
--- a/tests/ui/span/dropck-object-cycle.stderr
+++ b/tests/ui/span/dropck-object-cycle.stderr
@@ -1,6 +1,8 @@
error[E0597]: `*m` does not live long enough
--> $DIR/dropck-object-cycle.rs:27:31
|
+LL | let m : Box<dyn Trait+'static> = make_val();
+ | - binding `m` declared here
LL | assert_eq!(object_invoke1(&*m), (4,5));
| ^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/dropck_arr_cycle_checked.stderr b/tests/ui/span/dropck_arr_cycle_checked.stderr
index 068c779ae..23ebc8d59 100644
--- a/tests/ui/span/dropck_arr_cycle_checked.stderr
+++ b/tests/ui/span/dropck_arr_cycle_checked.stderr
@@ -1,6 +1,9 @@
error[E0597]: `b2` does not live long enough
--> $DIR/dropck_arr_cycle_checked.rs:93:24
|
+LL | let (b1, b2, b3);
+ | -- binding `b2` declared here
+...
LL | b1.a[0].v.set(Some(&b2));
| ^^^ borrowed value does not live long enough
...
@@ -15,6 +18,9 @@ LL | }
error[E0597]: `b3` does not live long enough
--> $DIR/dropck_arr_cycle_checked.rs:95:24
|
+LL | let (b1, b2, b3);
+ | -- binding `b3` declared here
+...
LL | b1.a[1].v.set(Some(&b3));
| ^^^ borrowed value does not live long enough
...
@@ -29,6 +35,9 @@ LL | }
error[E0597]: `b1` does not live long enough
--> $DIR/dropck_arr_cycle_checked.rs:99:24
|
+LL | let (b1, b2, b3);
+ | -- binding `b1` declared here
+...
LL | b3.a[0].v.set(Some(&b1));
| ^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/dropck_direct_cycle_with_drop.stderr b/tests/ui/span/dropck_direct_cycle_with_drop.stderr
index 07ae138ac..1e75e3b2f 100644
--- a/tests/ui/span/dropck_direct_cycle_with_drop.stderr
+++ b/tests/ui/span/dropck_direct_cycle_with_drop.stderr
@@ -1,6 +1,8 @@
error[E0597]: `d2` does not live long enough
--> $DIR/dropck_direct_cycle_with_drop.rs:36:19
|
+LL | let (d1, d2) = (D::new(format!("d1")), D::new(format!("d2")));
+ | -- binding `d2` declared here
LL | d1.p.set(Some(&d2));
| ^^^ borrowed value does not live long enough
...
@@ -15,6 +17,9 @@ LL | }
error[E0597]: `d1` does not live long enough
--> $DIR/dropck_direct_cycle_with_drop.rs:38:19
|
+LL | let (d1, d2) = (D::new(format!("d1")), D::new(format!("d2")));
+ | -- binding `d1` declared here
+...
LL | d2.p.set(Some(&d1));
| ^^^ borrowed value does not live long enough
LL |
diff --git a/tests/ui/span/dropck_misc_variants.stderr b/tests/ui/span/dropck_misc_variants.stderr
index 76e90574c..24a2c9089 100644
--- a/tests/ui/span/dropck_misc_variants.stderr
+++ b/tests/ui/span/dropck_misc_variants.stderr
@@ -1,6 +1,9 @@
error[E0597]: `bomb` does not live long enough
--> $DIR/dropck_misc_variants.rs:23:36
|
+LL | let (_w, bomb);
+ | ---- binding `bomb` declared here
+LL | bomb = vec![""];
LL | _w = Wrap::<&[&str]>(NoisyDrop(&bomb));
| ^^^^^ borrowed value does not live long enough
LL | }
@@ -14,6 +17,9 @@ LL | }
error[E0597]: `v` does not live long enough
--> $DIR/dropck_misc_variants.rs:31:27
|
+LL | let (_w,v);
+ | - binding `v` declared here
+...
LL | let u = NoisyDrop(&v);
| ^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/dropck_vec_cycle_checked.stderr b/tests/ui/span/dropck_vec_cycle_checked.stderr
index 7ff991c0c..5817439c0 100644
--- a/tests/ui/span/dropck_vec_cycle_checked.stderr
+++ b/tests/ui/span/dropck_vec_cycle_checked.stderr
@@ -1,6 +1,9 @@
error[E0597]: `c2` does not live long enough
--> $DIR/dropck_vec_cycle_checked.rs:98:24
|
+LL | let (mut c1, mut c2, mut c3);
+ | ------ binding `c2` declared here
+...
LL | c1.v[0].v.set(Some(&c2));
| ^^^ borrowed value does not live long enough
...
@@ -15,6 +18,9 @@ LL | }
error[E0597]: `c3` does not live long enough
--> $DIR/dropck_vec_cycle_checked.rs:100:24
|
+LL | let (mut c1, mut c2, mut c3);
+ | ------ binding `c3` declared here
+...
LL | c1.v[1].v.set(Some(&c3));
| ^^^ borrowed value does not live long enough
...
@@ -29,6 +35,9 @@ LL | }
error[E0597]: `c1` does not live long enough
--> $DIR/dropck_vec_cycle_checked.rs:104:24
|
+LL | let (mut c1, mut c2, mut c3);
+ | ------ binding `c1` declared here
+...
LL | c3.v[0].v.set(Some(&c1));
| ^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/issue-107353.rs b/tests/ui/span/issue-107353.rs
new file mode 100644
index 000000000..943f7f0eb
--- /dev/null
+++ b/tests/ui/span/issue-107353.rs
@@ -0,0 +1,9 @@
+// ignore-tidy-linelength
+// Verify that span interning correctly handles having a span of exactly MAX_LEN length.
+// compile-flags: --crate-type=lib
+// check-pass
+
+#![allow(dead_code)]
+fn a<'a, T>() -> &'a T {
+todo!()////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+}
diff --git a/tests/ui/span/issue-23338-locals-die-before-temps-of-body.stderr b/tests/ui/span/issue-23338-locals-die-before-temps-of-body.stderr
index 3c2022748..e1a377203 100644
--- a/tests/ui/span/issue-23338-locals-die-before-temps-of-body.stderr
+++ b/tests/ui/span/issue-23338-locals-die-before-temps-of-body.stderr
@@ -1,6 +1,8 @@
error[E0597]: `y` does not live long enough
--> $DIR/issue-23338-locals-die-before-temps-of-body.rs:10:5
|
+LL | let y = x;
+ | - binding `y` declared here
LL | y.borrow().clone()
| ^^^^^^^^^^
| |
@@ -22,6 +24,8 @@ LL | let x = y.borrow().clone(); x
error[E0597]: `y` does not live long enough
--> $DIR/issue-23338-locals-die-before-temps-of-body.rs:17:9
|
+LL | let y = x;
+ | - binding `y` declared here
LL | y.borrow().clone()
| ^^^^^^^^^^
| |
diff --git a/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr b/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr
index 809e60a8c..c3b6d7580 100644
--- a/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr
+++ b/tests/ui/span/issue-24805-dropck-child-has-items-via-parent.stderr
@@ -1,6 +1,9 @@
error[E0597]: `d1` does not live long enough
--> $DIR/issue-24805-dropck-child-has-items-via-parent.rs:28:18
|
+LL | let (_d, d1);
+ | -- binding `d1` declared here
+...
LL | _d = D_Child(&d1);
| ^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/issue-24805-dropck-trait-has-items.stderr b/tests/ui/span/issue-24805-dropck-trait-has-items.stderr
index 2e2170669..e52c57d9a 100644
--- a/tests/ui/span/issue-24805-dropck-trait-has-items.stderr
+++ b/tests/ui/span/issue-24805-dropck-trait-has-items.stderr
@@ -1,6 +1,9 @@
error[E0597]: `d1` does not live long enough
--> $DIR/issue-24805-dropck-trait-has-items.rs:37:26
|
+LL | let (_d, d1);
+ | -- binding `d1` declared here
+LL | d1 = D_HasSelfMethod(1);
LL | _d = D_HasSelfMethod(&d1);
| ^^^ borrowed value does not live long enough
LL | }
@@ -14,6 +17,9 @@ LL | }
error[E0597]: `d1` does not live long enough
--> $DIR/issue-24805-dropck-trait-has-items.rs:43:33
|
+LL | let (_d, d1);
+ | -- binding `d1` declared here
+LL | d1 = D_HasMethodWithSelfArg(1);
LL | _d = D_HasMethodWithSelfArg(&d1);
| ^^^ borrowed value does not live long enough
LL | }
@@ -27,6 +33,9 @@ LL | }
error[E0597]: `d1` does not live long enough
--> $DIR/issue-24805-dropck-trait-has-items.rs:49:20
|
+LL | let (_d, d1);
+ | -- binding `d1` declared here
+LL | d1 = D_HasType(1);
LL | _d = D_HasType(&d1);
| ^^^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/issue-24895-copy-clone-dropck.stderr b/tests/ui/span/issue-24895-copy-clone-dropck.stderr
index 18a3dc9e6..83db4d509 100644
--- a/tests/ui/span/issue-24895-copy-clone-dropck.stderr
+++ b/tests/ui/span/issue-24895-copy-clone-dropck.stderr
@@ -1,6 +1,9 @@
error[E0597]: `d1` does not live long enough
--> $DIR/issue-24895-copy-clone-dropck.rs:27:14
|
+LL | let (d2, d1);
+ | -- binding `d1` declared here
+LL | d1 = D(34, "d1");
LL | d2 = D(S(&d1, "inner"), "d2");
| ^^^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/issue-25199.stderr b/tests/ui/span/issue-25199.stderr
index d70a4afc1..1e0276f0c 100644
--- a/tests/ui/span/issue-25199.stderr
+++ b/tests/ui/span/issue-25199.stderr
@@ -1,6 +1,8 @@
error[E0597]: `container` does not live long enough
--> $DIR/issue-25199.rs:70:27
|
+LL | let container = Container::new();
+ | --------- binding `container` declared here
LL | let test = Test{test: &container};
| ^^^^^^^^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/issue-26656.stderr b/tests/ui/span/issue-26656.stderr
index 1e939c484..fea6e0012 100644
--- a/tests/ui/span/issue-26656.stderr
+++ b/tests/ui/span/issue-26656.stderr
@@ -1,6 +1,9 @@
error[E0597]: `ticking` does not live long enough
--> $DIR/issue-26656.rs:40:35
|
+LL | let (mut zook, ticking);
+ | ------- binding `ticking` declared here
+...
LL | zook.button = B::BigRedButton(&ticking);
| ^^^^^^^^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/issue-29106.stderr b/tests/ui/span/issue-29106.stderr
index 71fbd60ee..28ee7acd9 100644
--- a/tests/ui/span/issue-29106.stderr
+++ b/tests/ui/span/issue-29106.stderr
@@ -1,6 +1,9 @@
error[E0597]: `x` does not live long enough
--> $DIR/issue-29106.rs:16:26
|
+LL | let (y, x);
+ | - binding `x` declared here
+LL | x = "alive".to_string();
LL | y = Arc::new(Foo(&x));
| ^^ borrowed value does not live long enough
LL | }
@@ -14,6 +17,9 @@ LL | }
error[E0597]: `x` does not live long enough
--> $DIR/issue-29106.rs:23:25
|
+LL | let (y, x);
+ | - binding `x` declared here
+LL | x = "alive".to_string();
LL | y = Rc::new(Foo(&x));
| ^^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/issue-33884.stderr b/tests/ui/span/issue-33884.stderr
index aee153085..8cece07cd 100644
--- a/tests/ui/span/issue-33884.stderr
+++ b/tests/ui/span/issue-33884.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/issue-33884.rs:6:22
|
LL | stream.write_fmt(format!("message received"))
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `Arguments`, found struct `String`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Arguments<'_>`, found `String`
|
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/span/issue-34264.stderr b/tests/ui/span/issue-34264.stderr
index 15179954a..f0dea66f6 100644
--- a/tests/ui/span/issue-34264.stderr
+++ b/tests/ui/span/issue-34264.stderr
@@ -54,17 +54,16 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/issue-34264.rs:7:5
|
LL | foo(Some(42), 2, "");
- | ^^^ -- argument of type `&'static str` unexpected
+ | ^^^ ----
+ | | |
+ | | unexpected argument of type `&'static str`
+ | help: remove the extra argument
|
note: function defined here
--> $DIR/issue-34264.rs:1:4
|
LL | fn foo(Option<i32>, String) {}
| ^^^ ----------- ------
-help: remove the extra argument
- |
-LL | foo(Some(42), 2);
- | ~~~~~~~~~~~~~
error[E0308]: mismatched types
--> $DIR/issue-34264.rs:8:13
@@ -84,17 +83,16 @@ error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/issue-34264.rs:10:5
|
LL | bar(1, 2, 3);
- | ^^^ - argument of type `{integer}` unexpected
+ | ^^^ ---
+ | | |
+ | | unexpected argument of type `{integer}`
+ | help: remove the extra argument
|
note: function defined here
--> $DIR/issue-34264.rs:3:4
|
LL | fn bar(x, y: usize) {}
| ^^^ - --------
-help: remove the extra argument
- |
-LL | bar(1, 2);
- | ~~~~~~
error: aborting due to 6 previous errors
diff --git a/tests/ui/span/issue-36537.stderr b/tests/ui/span/issue-36537.stderr
index 79a0ebaeb..6c330c1a0 100644
--- a/tests/ui/span/issue-36537.stderr
+++ b/tests/ui/span/issue-36537.stderr
@@ -1,6 +1,8 @@
error[E0597]: `a` does not live long enough
--> $DIR/issue-36537.rs:5:13
|
+LL | let a = 42;
+ | - binding `a` declared here
LL | p = &a;
| ^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/issue-37767.stderr b/tests/ui/span/issue-37767.stderr
index f7732847a..b612fdf16 100644
--- a/tests/ui/span/issue-37767.stderr
+++ b/tests/ui/span/issue-37767.stderr
@@ -14,11 +14,11 @@ note: candidate #2 is defined in the trait `B`
|
LL | fn foo(&mut self) {}
| ^^^^^^^^^^^^^^^^^
-help: disambiguate the associated function for candidate #1
+help: disambiguate the method for candidate #1
|
LL | A::foo(&a)
| ~~~~~~~~~~
-help: disambiguate the associated function for candidate #2
+help: disambiguate the method for candidate #2
|
LL | B::foo(&a)
| ~~~~~~~~~~
@@ -39,11 +39,11 @@ note: candidate #2 is defined in the trait `D`
|
LL | fn foo(&self) {}
| ^^^^^^^^^^^^^
-help: disambiguate the associated function for candidate #1
+help: disambiguate the method for candidate #1
|
LL | C::foo(&a)
| ~~~~~~~~~~
-help: disambiguate the associated function for candidate #2
+help: disambiguate the method for candidate #2
|
LL | D::foo(&a)
| ~~~~~~~~~~
@@ -64,11 +64,11 @@ note: candidate #2 is defined in the trait `F`
|
LL | fn foo(self) {}
| ^^^^^^^^^^^^
-help: disambiguate the associated function for candidate #1
+help: disambiguate the method for candidate #1
|
LL | E::foo(a)
| ~~~~~~~~~
-help: disambiguate the associated function for candidate #2
+help: disambiguate the method for candidate #2
|
LL | F::foo(a)
| ~~~~~~~~~
diff --git a/tests/ui/span/issue-39018.stderr b/tests/ui/span/issue-39018.stderr
index 5d4d692b2..771f21c45 100644
--- a/tests/ui/span/issue-39018.stderr
+++ b/tests/ui/span/issue-39018.stderr
@@ -80,7 +80,7 @@ error[E0308]: mismatched types
LL | let _ = a + b;
| ^
| |
- | expected `&str`, found struct `String`
+ | expected `&str`, found `String`
| help: consider borrowing here: `&b`
error[E0369]: cannot add `String` to `&String`
diff --git a/tests/ui/span/issue-40157.stderr b/tests/ui/span/issue-40157.stderr
index 57f80214a..a0afd33f7 100644
--- a/tests/ui/span/issue-40157.stderr
+++ b/tests/ui/span/issue-40157.stderr
@@ -2,11 +2,10 @@ error[E0597]: `foo` does not live long enough
--> $DIR/issue-40157.rs:2:53
|
LL | {println!("{:?}", match { let foo = vec![1, 2]; foo.get(1) } { x => x });}
- | ------------------------^^^^^^^^^^--
- | | | |
- | | | `foo` dropped here while still borrowed
- | | borrowed value does not live long enough
- | borrow later used here
+ | --- ^^^^^^^^^^ - `foo` dropped here while still borrowed
+ | | |
+ | | borrowed value does not live long enough
+ | binding `foo` declared here
error: aborting due to previous error
diff --git a/tests/ui/span/issue-42234-unknown-receiver-type.full.stderr b/tests/ui/span/issue-42234-unknown-receiver-type.full.stderr
index 2b1789908..e01e1edab 100644
--- a/tests/ui/span/issue-42234-unknown-receiver-type.full.stderr
+++ b/tests/ui/span/issue-42234-unknown-receiver-type.full.stderr
@@ -15,7 +15,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-42234-unknown-receiver-type.rs:15:10
|
LL | .sum::<_>()
- | ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
+ | ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
|
help: consider specifying the generic argument
|
diff --git a/tests/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr b/tests/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr
index d93d54e87..a4b652565 100644
--- a/tests/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr
+++ b/tests/ui/span/issue-42234-unknown-receiver-type.generic_arg.stderr
@@ -15,7 +15,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-42234-unknown-receiver-type.rs:15:10
|
LL | .sum::<_>()
- | ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
+ | ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
|
help: consider specifying the generic argument
|
diff --git a/tests/ui/span/issue28498-reject-lifetime-param.stderr b/tests/ui/span/issue28498-reject-lifetime-param.stderr
index 3119ddd03..94c450c7b 100644
--- a/tests/ui/span/issue28498-reject-lifetime-param.stderr
+++ b/tests/ui/span/issue28498-reject-lifetime-param.stderr
@@ -1,6 +1,9 @@
error[E0597]: `first_dropped` does not live long enough
--> $DIR/issue28498-reject-lifetime-param.rs:32:19
|
+LL | let (foo1, first_dropped);
+ | ------------- binding `first_dropped` declared here
+...
LL | foo1 = Foo(1, &first_dropped);
| ^^^^^^^^^^^^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/issue28498-reject-passed-to-fn.stderr b/tests/ui/span/issue28498-reject-passed-to-fn.stderr
index 60e8a648c..e133f75d5 100644
--- a/tests/ui/span/issue28498-reject-passed-to-fn.stderr
+++ b/tests/ui/span/issue28498-reject-passed-to-fn.stderr
@@ -1,6 +1,9 @@
error[E0597]: `first_dropped` does not live long enough
--> $DIR/issue28498-reject-passed-to-fn.rs:34:19
|
+LL | let (foo1, first_dropped);
+ | ------------- binding `first_dropped` declared here
+...
LL | foo1 = Foo(1, &first_dropped, Box::new(callback));
| ^^^^^^^^^^^^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/issue28498-reject-trait-bound.stderr b/tests/ui/span/issue28498-reject-trait-bound.stderr
index 22e4a8205..9ab3cdd13 100644
--- a/tests/ui/span/issue28498-reject-trait-bound.stderr
+++ b/tests/ui/span/issue28498-reject-trait-bound.stderr
@@ -1,6 +1,9 @@
error[E0597]: `first_dropped` does not live long enough
--> $DIR/issue28498-reject-trait-bound.rs:34:19
|
+LL | let (foo1, first_dropped);
+ | ------------- binding `first_dropped` declared here
+...
LL | foo1 = Foo(1, &first_dropped);
| ^^^^^^^^^^^^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/missing-unit-argument.stderr b/tests/ui/span/missing-unit-argument.stderr
index ef4d732b5..ff89f7753 100644
--- a/tests/ui/span/missing-unit-argument.stderr
+++ b/tests/ui/span/missing-unit-argument.stderr
@@ -65,7 +65,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
LL | S.baz();
| ^^^-- an argument of type `()` is missing
|
-note: associated function defined here
+note: method defined here
--> $DIR/missing-unit-argument.rs:6:8
|
LL | fn baz(self, (): ()) { }
@@ -81,7 +81,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
LL | S.generic::<()>();
| ^^^^^^^^^^^^^-- an argument of type `()` is missing
|
-note: associated function defined here
+note: method defined here
--> $DIR/missing-unit-argument.rs:7:8
|
LL | fn generic<T>(self, _: T) { }
diff --git a/tests/ui/span/mut-ptr-cant-outlive-ref.stderr b/tests/ui/span/mut-ptr-cant-outlive-ref.stderr
index 4d976a7bb..be56f9489 100644
--- a/tests/ui/span/mut-ptr-cant-outlive-ref.stderr
+++ b/tests/ui/span/mut-ptr-cant-outlive-ref.stderr
@@ -1,6 +1,8 @@
error[E0597]: `b` does not live long enough
--> $DIR/mut-ptr-cant-outlive-ref.rs:8:15
|
+LL | let b = m.borrow();
+ | - binding `b` declared here
LL | p = &*b;
| ^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/range-2.stderr b/tests/ui/span/range-2.stderr
index 8ca8156b0..d7084b00b 100644
--- a/tests/ui/span/range-2.stderr
+++ b/tests/ui/span/range-2.stderr
@@ -3,7 +3,9 @@ error[E0597]: `a` does not live long enough
|
LL | let r = {
| - borrow later stored here
-...
+LL | let a = 42;
+ | - binding `a` declared here
+LL | let b = 42;
LL | &a..&b
| ^^ borrowed value does not live long enough
LL | };
@@ -14,7 +16,9 @@ error[E0597]: `b` does not live long enough
|
LL | let r = {
| - borrow later stored here
-...
+LL | let a = 42;
+LL | let b = 42;
+ | - binding `b` declared here
LL | &a..&b
| ^^ borrowed value does not live long enough
LL | };
diff --git a/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr b/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr
index 0b985de60..fb3fad6ae 100644
--- a/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr
+++ b/tests/ui/span/regionck-unboxed-closure-lifetimes.stderr
@@ -1,6 +1,8 @@
error[E0597]: `c` does not live long enough
--> $DIR/regionck-unboxed-closure-lifetimes.rs:8:21
|
+LL | let c = 1;
+ | - binding `c` declared here
LL | let c_ref = &c;
| ^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/regions-close-over-type-parameter-2.stderr b/tests/ui/span/regions-close-over-type-parameter-2.stderr
index 2e584d9a8..fed40a4fd 100644
--- a/tests/ui/span/regions-close-over-type-parameter-2.stderr
+++ b/tests/ui/span/regions-close-over-type-parameter-2.stderr
@@ -1,6 +1,8 @@
error[E0597]: `tmp0` does not live long enough
--> $DIR/regions-close-over-type-parameter-2.rs:23:20
|
+LL | let tmp0 = 3;
+ | ---- binding `tmp0` declared here
LL | let tmp1 = &tmp0;
| ^^^^^ borrowed value does not live long enough
LL | repeater3(tmp1)
diff --git a/tests/ui/span/regions-escape-loop-via-variable.stderr b/tests/ui/span/regions-escape-loop-via-variable.stderr
index 42df66852..e5c7d8b26 100644
--- a/tests/ui/span/regions-escape-loop-via-variable.stderr
+++ b/tests/ui/span/regions-escape-loop-via-variable.stderr
@@ -2,7 +2,9 @@ error[E0597]: `x` does not live long enough
--> $DIR/regions-escape-loop-via-variable.rs:11:13
|
LL | let x = 1 + *p;
- | -- borrow later used here
+ | - -- borrow later used here
+ | |
+ | binding `x` declared here
LL | p = &x;
| ^^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/regions-escape-loop-via-vec.stderr b/tests/ui/span/regions-escape-loop-via-vec.stderr
index 2b6493077..532ac3606 100644
--- a/tests/ui/span/regions-escape-loop-via-vec.stderr
+++ b/tests/ui/span/regions-escape-loop-via-vec.stderr
@@ -2,7 +2,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/regions-escape-loop-via-vec.rs:5:11
|
LL | let mut _y = vec![&mut x];
- | ------ borrow of `x` occurs here
+ | ------ `x` is borrowed here
LL | while x < 10 {
| ^ use of borrowed `x`
LL | let mut z = x;
@@ -13,7 +13,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/regions-escape-loop-via-vec.rs:6:21
|
LL | let mut _y = vec![&mut x];
- | ------ borrow of `x` occurs here
+ | ------ `x` is borrowed here
LL | while x < 10 {
LL | let mut z = x;
| ^ use of borrowed `x`
@@ -23,11 +23,10 @@ LL | _y.push(&mut z);
error[E0597]: `z` does not live long enough
--> $DIR/regions-escape-loop-via-vec.rs:7:17
|
+LL | let mut z = x;
+ | ----- binding `z` declared here
LL | _y.push(&mut z);
- | --------^^^^^^-
- | | |
- | | borrowed value does not live long enough
- | borrow later used here
+ | ^^^^^^ borrowed value does not live long enough
...
LL | }
| - `z` dropped here while still borrowed
@@ -36,7 +35,7 @@ error[E0503]: cannot use `x` because it was mutably borrowed
--> $DIR/regions-escape-loop-via-vec.rs:9:9
|
LL | let mut _y = vec![&mut x];
- | ------ borrow of `x` occurs here
+ | ------ `x` is borrowed here
...
LL | _y.push(&mut z);
| --------------- borrow later used here
diff --git a/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr b/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr
index fd67c65c4..47931db84 100644
--- a/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr
+++ b/tests/ui/span/regions-infer-borrow-scope-within-loop.stderr
@@ -1,6 +1,9 @@
error[E0597]: `*x` does not live long enough
--> $DIR/regions-infer-borrow-scope-within-loop.rs:13:20
|
+LL | let x = make_box();
+ | - binding `x` declared here
+...
LL | y = borrow(&*x);
| ^^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/send-is-not-static-ensures-scoping.stderr b/tests/ui/span/send-is-not-static-ensures-scoping.stderr
index 65d10c130..bae0befca 100644
--- a/tests/ui/span/send-is-not-static-ensures-scoping.stderr
+++ b/tests/ui/span/send-is-not-static-ensures-scoping.stderr
@@ -4,6 +4,7 @@ error[E0597]: `x` does not live long enough
LL | let bad = {
| --- borrow later stored here
LL | let x = 1;
+ | - binding `x` declared here
LL | let y = &x;
| ^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/send-is-not-static-std-sync-2.stderr b/tests/ui/span/send-is-not-static-std-sync-2.stderr
index bcd07e116..b0267fa6f 100644
--- a/tests/ui/span/send-is-not-static-std-sync-2.stderr
+++ b/tests/ui/span/send-is-not-static-std-sync-2.stderr
@@ -4,6 +4,7 @@ error[E0597]: `x` does not live long enough
LL | let lock = {
| ---- borrow later stored here
LL | let x = 1;
+ | - binding `x` declared here
LL | Mutex::new(&x)
| ^^ borrowed value does not live long enough
LL | };
@@ -15,6 +16,7 @@ error[E0597]: `x` does not live long enough
LL | let lock = {
| ---- borrow later stored here
LL | let x = 1;
+ | - binding `x` declared here
LL | RwLock::new(&x)
| ^^ borrowed value does not live long enough
LL | };
@@ -25,7 +27,9 @@ error[E0597]: `x` does not live long enough
|
LL | let (_tx, rx) = {
| --- borrow later used here
-...
+LL | let x = 1;
+ | - binding `x` declared here
+LL | let (tx, rx) = mpsc::channel();
LL | let _ = tx.send(&x);
| ^^ borrowed value does not live long enough
LL | (tx, rx)
diff --git a/tests/ui/span/send-is-not-static-std-sync.stderr b/tests/ui/span/send-is-not-static-std-sync.stderr
index 5d493a3e4..7dfe94bca 100644
--- a/tests/ui/span/send-is-not-static-std-sync.stderr
+++ b/tests/ui/span/send-is-not-static-std-sync.stderr
@@ -1,6 +1,9 @@
error[E0505]: cannot move out of `y` because it is borrowed
--> $DIR/send-is-not-static-std-sync.rs:13:10
|
+LL | let y = Box::new(1);
+ | - binding `y` declared here
+LL | let lock = Mutex::new(&x);
LL | *lock.lock().unwrap() = &*y;
| --- borrow of `*y` occurs here
LL | drop(y);
@@ -12,6 +15,8 @@ LL | *lock.lock().unwrap() = &z;
error[E0597]: `z` does not live long enough
--> $DIR/send-is-not-static-std-sync.rs:16:33
|
+LL | let z = 2;
+ | - binding `z` declared here
LL | *lock.lock().unwrap() = &z;
| ^^ borrowed value does not live long enough
LL | }
@@ -23,6 +28,9 @@ LL | lock.use_ref(); // (Mutex is #[may_dangle] so its dtor does not use `z`
error[E0505]: cannot move out of `y` because it is borrowed
--> $DIR/send-is-not-static-std-sync.rs:27:10
|
+LL | let y = Box::new(1);
+ | - binding `y` declared here
+LL | let lock = RwLock::new(&x);
LL | *lock.write().unwrap() = &*y;
| --- borrow of `*y` occurs here
LL | drop(y);
@@ -34,6 +42,8 @@ LL | *lock.write().unwrap() = &z;
error[E0597]: `z` does not live long enough
--> $DIR/send-is-not-static-std-sync.rs:30:34
|
+LL | let z = 2;
+ | - binding `z` declared here
LL | *lock.write().unwrap() = &z;
| ^^ borrowed value does not live long enough
LL | }
@@ -45,6 +55,9 @@ LL | lock.use_ref(); // (RwLock is #[may_dangle] so its dtor does not use `z
error[E0505]: cannot move out of `y` because it is borrowed
--> $DIR/send-is-not-static-std-sync.rs:43:10
|
+LL | let y = Box::new(1);
+ | - binding `y` declared here
+...
LL | tx.send(&*y);
| --- borrow of `*y` occurs here
LL | drop(y);
@@ -56,6 +69,8 @@ LL | tx.send(&z).unwrap();
error[E0597]: `z` does not live long enough
--> $DIR/send-is-not-static-std-sync.rs:46:17
|
+LL | let z = 2;
+ | - binding `z` declared here
LL | tx.send(&z).unwrap();
| ^^ borrowed value does not live long enough
LL | }
diff --git a/tests/ui/span/type-annotations-needed-expr.stderr b/tests/ui/span/type-annotations-needed-expr.stderr
index 9dff6c64d..65a90318a 100644
--- a/tests/ui/span/type-annotations-needed-expr.stderr
+++ b/tests/ui/span/type-annotations-needed-expr.stderr
@@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/type-annotations-needed-expr.rs:2:39
|
LL | let _ = (vec![1,2,3]).into_iter().sum() as f64;
- | ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
+ | ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
|
help: consider specifying the generic argument
|
diff --git a/tests/ui/span/vec-must-not-hide-type-from-dropck.stderr b/tests/ui/span/vec-must-not-hide-type-from-dropck.stderr
index f87c32d1a..f2fefca41 100644
--- a/tests/ui/span/vec-must-not-hide-type-from-dropck.stderr
+++ b/tests/ui/span/vec-must-not-hide-type-from-dropck.stderr
@@ -1,6 +1,9 @@
error[E0597]: `c2` does not live long enough
--> $DIR/vec-must-not-hide-type-from-dropck.rs:117:24
|
+LL | let (mut c1, mut c2);
+ | ------ binding `c2` declared here
+...
LL | c1.v[0].v.set(Some(&c2));
| ^^^ borrowed value does not live long enough
...
@@ -15,6 +18,9 @@ LL | }
error[E0597]: `c1` does not live long enough
--> $DIR/vec-must-not-hide-type-from-dropck.rs:119:24
|
+LL | let (mut c1, mut c2);
+ | ------ binding `c1` declared here
+...
LL | c2.v[0].v.set(Some(&c1));
| ^^^ borrowed value does not live long enough
LL |
diff --git a/tests/ui/span/vec_refs_data_with_early_death.stderr b/tests/ui/span/vec_refs_data_with_early_death.stderr
index 684e78453..73f27144a 100644
--- a/tests/ui/span/vec_refs_data_with_early_death.stderr
+++ b/tests/ui/span/vec_refs_data_with_early_death.stderr
@@ -1,6 +1,9 @@
error[E0597]: `x` does not live long enough
--> $DIR/vec_refs_data_with_early_death.rs:17:12
|
+LL | let x: i8 = 3;
+ | - binding `x` declared here
+...
LL | v.push(&x);
| ^^ borrowed value does not live long enough
...
@@ -15,6 +18,9 @@ LL | }
error[E0597]: `y` does not live long enough
--> $DIR/vec_refs_data_with_early_death.rs:19:12
|
+LL | let y: i8 = 4;
+ | - binding `y` declared here
+...
LL | v.push(&y);
| ^^ borrowed value does not live long enough
...
diff --git a/tests/ui/span/wf-method-late-bound-regions.stderr b/tests/ui/span/wf-method-late-bound-regions.stderr
index 6b0b00820..64c2d0f16 100644
--- a/tests/ui/span/wf-method-late-bound-regions.stderr
+++ b/tests/ui/span/wf-method-late-bound-regions.stderr
@@ -4,6 +4,7 @@ error[E0597]: `pointer` does not live long enough
LL | let dangling = {
| -------- borrow later stored here
LL | let pointer = Box::new(42);
+ | ------- binding `pointer` declared here
LL | f2.xmute(&pointer)
| ^^^^^^^^ borrowed value does not live long enough
LL | };