Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #60171 - matthewjasper:full-nll-compare-mode, r=pnkfelix
- Loading branch information
Showing
496 changed files
with
5,202 additions
and
964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
// run-pass | ||
#![feature(nll)] | ||
#![deny(unused_mut)] | ||
|
||
#[derive(Debug)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// run-pass | ||
#![allow(unreachable_code)] | ||
#![feature(nll)] | ||
|
||
fn main() { | ||
let mut v = Vec::new(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(nll)] | ||
|
||
pub struct DescriptorSet<'a> { | ||
pub slots: Vec<AttachInfo<'a, Resources>> | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(nll)] | ||
#![deny(unused_mut)] | ||
|
||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(nll)] | ||
#![deny(unused_mut)] | ||
|
||
struct Foo { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(nll)] | ||
#![allow(unused_variables)] | ||
|
||
pub trait TryTransform { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// run-pass | ||
|
||
#![feature(nll)] | ||
|
||
struct List<T> { | ||
value: T, | ||
next: Option<Box<List<T>>>, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/test/ui/associated-types/associated-types-project-from-hrtb-in-fn-body.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:29 | ||
| | ||
LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>( | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | let z: I::A = if cond { x } else { y }; | ||
| ^ assignment requires that `'a` must outlive `'b` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/associated-types-project-from-hrtb-in-fn-body.rs:22:40 | ||
| | ||
LL | fn bar<'a, 'b, I : for<'x> Foo<&'x isize>>( | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | let z: I::A = if cond { x } else { y }; | ||
| ^ assignment requires that `'b` must outlive `'a` | ||
|
||
error: aborting due to 2 previous errors | ||
|
24 changes: 24 additions & 0 deletions
24
src/test/ui/associated-types/associated-types-subtyping-1.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/associated-types-subtyping-1.rs:24:12 | ||
| | ||
LL | fn method2<'a,'b,T>(x: &'a T, y: &'b T) | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | let a: <T as Trait<'a>>::Type = make_any(); | ||
| ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/associated-types-subtyping-1.rs:35:13 | ||
| | ||
LL | fn method3<'a,'b,T>(x: &'a T, y: &'b T) | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | let _c: <T as Trait<'a>>::Type = b; | ||
| ^^^^^^^^^^^^^^^^^^^^^^ type annotation requires that `'b` must outlive `'a` | ||
|
||
error: aborting due to 2 previous errors | ||
|
24 changes: 24 additions & 0 deletions
24
src/test/ui/associated-types/cache/project-fn-ret-contravariant.krisskross.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-contravariant.rs:45:4 | ||
| | ||
LL | fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | (a, b) | ||
| ^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-contravariant.rs:45:4 | ||
| | ||
LL | fn transmute<'a,'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | (a, b) | ||
| ^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` | ||
|
||
error: aborting due to 2 previous errors | ||
|
10 changes: 10 additions & 0 deletions
10
src/test/ui/associated-types/cache/project-fn-ret-contravariant.transmute.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-contravariant.rs:38:4 | ||
| | ||
LL | fn baz<'a,'b>(x: &'a u32) -> &'static u32 { | ||
| -- lifetime `'a` defined here | ||
LL | bar(foo, x) | ||
| ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` | ||
|
||
error: aborting due to previous error | ||
|
24 changes: 24 additions & 0 deletions
24
src/test/ui/associated-types/cache/project-fn-ret-invariant.krisskross.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-invariant.rs:55:4 | ||
| | ||
LL | fn transmute<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | (a, b) | ||
| ^^^^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-invariant.rs:55:4 | ||
| | ||
LL | fn transmute<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | (a, b) | ||
| ^^^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` | ||
|
||
error: aborting due to 2 previous errors | ||
|
24 changes: 24 additions & 0 deletions
24
src/test/ui/associated-types/cache/project-fn-ret-invariant.oneuse.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-invariant.rs:38:12 | ||
| | ||
LL | fn baz<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
LL | let f = foo; // <-- No consistent type can be inferred for `f` here. | ||
LL | let a = bar(f, x); | ||
| ^^^^^^^^^ argument requires that `'a` must outlive `'b` | ||
|
||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-invariant.rs:39:12 | ||
| | ||
LL | fn baz<'a,'b>(x: Type<'a>, y: Type<'b>) -> (Type<'a>, Type<'b>) { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
... | ||
LL | let b = bar(f, y); | ||
| ^^^^^^^^^ argument requires that `'b` must outlive `'a` | ||
|
||
error: aborting due to 2 previous errors | ||
|
11 changes: 11 additions & 0 deletions
11
src/test/ui/associated-types/cache/project-fn-ret-invariant.transmute.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/project-fn-ret-invariant.rs:48:4 | ||
| | ||
LL | fn baz<'a,'b>(x: Type<'a>) -> Type<'static> { | ||
| -- lifetime `'a` defined here | ||
... | ||
LL | bar(foo, x) | ||
| ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static` | ||
|
||
error: aborting due to previous error | ||
|
40 changes: 40 additions & 0 deletions
40
src/test/ui/borrowck/borrowck-anon-fields-variant.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
error[E0503]: cannot use `y` because it was mutably borrowed | ||
--> $DIR/borrowck-anon-fields-variant.rs:17:7 | ||
| | ||
LL | Foo::Y(ref mut a, _) => a, | ||
| --------- borrow of `y.0` occurs here | ||
... | ||
LL | Foo::Y(_, ref mut b) => b, | ||
| ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0` | ||
... | ||
LL | *a += 1; | ||
| ------- borrow later used here | ||
|
||
error[E0503]: cannot use `y` because it was mutably borrowed | ||
--> $DIR/borrowck-anon-fields-variant.rs:37:7 | ||
| | ||
LL | Foo::Y(ref mut a, _) => a, | ||
| --------- borrow of `y.0` occurs here | ||
... | ||
LL | Foo::Y(ref mut b, _) => b, | ||
| ^^^^^^^^^^^^^^^^^^^^ use of borrowed `y.0` | ||
... | ||
LL | *a += 1; | ||
| ------- borrow later used here | ||
|
||
error[E0499]: cannot borrow `y.0` as mutable more than once at a time | ||
--> $DIR/borrowck-anon-fields-variant.rs:37:14 | ||
| | ||
LL | Foo::Y(ref mut a, _) => a, | ||
| --------- first mutable borrow occurs here | ||
... | ||
LL | Foo::Y(ref mut b, _) => b, | ||
| ^^^^^^^^^ second mutable borrow occurs here | ||
... | ||
LL | *a += 1; | ||
| ------- first borrow later used here | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
Some errors have detailed explanations: E0499, E0503. | ||
For more information about an error, try `rustc --explain E0499`. |
Oops, something went wrong.