-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #52409 - estebank:move-cfail-ui, r=oli-obk
Move some `compile-fail` tests to `ui` Re: #44844.
- Loading branch information
Showing
1,137 changed files
with
9,577 additions
and
17 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
File renamed without changes.
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,14 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-10176.rs:12:5 | ||
| | ||
LL | fn f() -> isize { | ||
| ----- expected `isize` because of return type | ||
LL | (return 1, return 2) | ||
| ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple | ||
| | ||
= note: expected type `isize` | ||
found type `(!, !)` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
File renamed without changes.
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,9 @@ | ||
error[E0532]: expected tuple struct/variant, found function `foo` | ||
--> $DIR/issue-10200.rs:16:9 | ||
| | ||
LL | foo(x) //~ ERROR expected tuple struct/variant, found function `foo` | ||
| ^^^ did you mean `Foo`? | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0532`. |
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,14 @@ | ||
warning: not reporting region error due to nll | ||
--> $DIR/issue-10291.rs:13:9 | ||
| | ||
LL | x //~ ERROR E0312 | ||
| ^ | ||
|
||
error: unsatisfied lifetime constraints | ||
--> $DIR/issue-10291.rs:12:5 | ||
| | ||
LL | drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ free region requires that `'x` must outlive `'static` | ||
|
||
error: aborting due to previous error | ||
|
File renamed without changes.
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,23 @@ | ||
error[E0312]: lifetime of reference outlives lifetime of borrowed content... | ||
--> $DIR/issue-10291.rs:13:9 | ||
| | ||
LL | x //~ ERROR E0312 | ||
| ^ | ||
| | ||
note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 12:65... | ||
--> $DIR/issue-10291.rs:12:65 | ||
| | ||
LL | drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| { | ||
| _________________________________________________________________^ | ||
LL | | x //~ ERROR E0312 | ||
LL | | })); | ||
| |_____^ | ||
note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 11:9 | ||
--> $DIR/issue-10291.rs:11:9 | ||
| | ||
LL | fn test<'x>(x: &'x isize) { | ||
| ^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0312`. |
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,13 @@ | ||
error[E0382]: use of moved value: `x` | ||
--> $DIR/issue-10398.rs:17:14 | ||
| | ||
LL | let _a = x; | ||
| - value moved here | ||
LL | drop(x); | ||
| ^ value used here after move | ||
| | ||
= note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0382`. |
File renamed without changes.
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,13 @@ | ||
error[E0382]: use of moved value: `x` | ||
--> $DIR/issue-10398.rs:17:14 | ||
| | ||
LL | let _a = x; | ||
| -- value moved here | ||
LL | drop(x); | ||
| ^ value used here after move | ||
| | ||
= note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0382`. |
File renamed without changes.
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,16 @@ | ||
error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` | ||
--> $DIR/issue-10401.rs:13:5 | ||
| | ||
LL | a += { "b" }; | ||
| -^^^^^^^^^^^ | ||
| | | ||
| cannot use `+=` on type `&str` | ||
| `+` can't be used to concatenate two `&str` strings | ||
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | ||
| | ||
LL | a.to_owned() += { "b" }; | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0368`. |
File renamed without changes.
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,51 @@ | ||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:11:20 | ||
| | ||
LL | trait Serializable<'self, T> { //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:12:25 | ||
| | ||
LL | fn serialize(val : &'self T) -> Vec<u8>; //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:13:38 | ||
| | ||
LL | fn deserialize(repr : &[u8]) -> &'self T; //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:16:6 | ||
| | ||
LL | impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:16:36 | ||
| | ||
LL | impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:19:25 | ||
| | ||
LL | fn serialize(val : &'self str) -> Vec<u8> { //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error: lifetimes cannot use keyword names | ||
--> $DIR/issue-10412.rs:22:37 | ||
| | ||
LL | fn deserialize(repr: &[u8]) -> &'self str { //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^ | ||
|
||
error[E0106]: missing lifetime specifier | ||
--> $DIR/issue-10412.rs:16:13 | ||
| | ||
LL | impl<'self> Serializable<str> for &'self str { //~ ERROR lifetimes cannot use keyword names | ||
| ^^^^^^^^^^^^^^^^^ expected lifetime parameter | ||
|
||
error: aborting due to 8 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0106`. |
File renamed without changes.
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,13 @@ | ||
error[E0599]: no method named `foo` found for type `&b::B` in the current scope | ||
--> $DIR/issue-10465.rs:27:15 | ||
| | ||
LL | b.foo(); //~ ERROR: no method named `foo` found | ||
| ^^^ | ||
| | ||
= help: items from traits can only be used if the trait is in scope | ||
= note: the following trait is implemented but not in scope, perhaps add a `use` for it: | ||
`use a::A;` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0599`. |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: macros that expand to items must either be surrounded with braces or followed by a semicolon | ||
--> $DIR/issue-10536.rs:26:22 | ||
| | ||
LL | assert!({one! two()}); | ||
| ^^ | ||
|
||
error: expected `(` or `{`, found `}` | ||
--> $DIR/issue-10536.rs:31:22 | ||
| | ||
LL | assert!({one! two}); | ||
| ^ expected `(` or `{` | ||
|
||
error: aborting due to 2 previous errors | ||
|
File renamed without changes.
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,9 @@ | ||
error[E0603]: struct `S` is private | ||
--> $DIR/issue-10545.rs:17:11 | ||
| | ||
LL | fn foo(_: a::S) { //~ ERROR: struct `S` is private | ||
| ^^^^ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0603`. |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error: missing documentation for crate | ||
--> $DIR/issue-10656.rs:11:1 | ||
| | ||
LL | / #![deny(missing_docs)] | ||
LL | | #![crate_type="lib"] | ||
| |____________________^ | ||
| | ||
note: lint level defined here | ||
--> $DIR/issue-10656.rs:11:9 | ||
| | ||
LL | #![deny(missing_docs)] | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
File renamed without changes.
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,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-10764.rs:14:15 | ||
| | ||
LL | fn main() { f(bar) } | ||
| ^^^ expected "Rust" fn, found "C" fn | ||
| | ||
= note: expected type `fn()` | ||
found type `extern "C" fn() {bar}` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
File renamed without changes.
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,27 @@ | ||
error[E0130]: patterns aren't allowed in foreign function declarations | ||
--> $DIR/issue-10877.rs:13:12 | ||
| | ||
LL | fn foo(1: ()); | ||
| ^ pattern not allowed in foreign function | ||
|
||
error[E0130]: patterns aren't allowed in foreign function declarations | ||
--> $DIR/issue-10877.rs:15:12 | ||
| | ||
LL | fn bar((): isize); | ||
| ^^ pattern not allowed in foreign function | ||
|
||
error[E0130]: patterns aren't allowed in foreign function declarations | ||
--> $DIR/issue-10877.rs:17:12 | ||
| | ||
LL | fn baz(Foo { x }: isize); | ||
| ^^^^^^^^^ pattern not allowed in foreign function | ||
|
||
error[E0130]: patterns aren't allowed in foreign function declarations | ||
--> $DIR/issue-10877.rs:19:12 | ||
| | ||
LL | fn qux((x,y): ()); | ||
| ^^^^^ pattern not allowed in foreign function | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0130`. |
File renamed without changes.
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[E0605]: non-primitive cast: `()` as `usize` | ||
--> $DIR/issue-10991.rs:13:14 | ||
| | ||
LL | let _t = nil as usize; //~ ERROR: non-primitive cast: `()` as `usize` | ||
| ^^^^^^^^^^^^ | ||
| | ||
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0605`. |
File renamed without changes.
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,6 @@ | ||
error: cannot prefer dynamic linking when performing LTO | ||
|
||
note: only 'staticlib', 'bin', and 'cdylib' outputs are supported with LTO | ||
|
||
error: aborting due to previous error | ||
|
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,18 @@ | ||
error[E0502]: cannot borrow `*ptr` as immutable because it is also borrowed as mutable | ||
--> $DIR/issue-11192.rs:30:10 | ||
| | ||
LL | let mut test = |foo: &Foo| { | ||
| ----------- mutable borrow occurs here | ||
LL | println!("access {}", foo.x); | ||
LL | ptr = box Foo { x: ptr.x + 1 }; | ||
| --- previous borrow occurs due to use of `ptr` in closure | ||
... | ||
LL | test(&*ptr); | ||
| -----^^^^^- | ||
| | | | ||
| | immutable borrow occurs here | ||
| borrow later used here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0502`. |
File renamed without changes.
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,18 @@ | ||
error[E0502]: cannot borrow `*ptr` as immutable because `ptr` is also borrowed as mutable | ||
--> $DIR/issue-11192.rs:30:11 | ||
| | ||
LL | let mut test = |foo: &Foo| { | ||
| ----------- mutable borrow occurs here | ||
LL | println!("access {}", foo.x); | ||
LL | ptr = box Foo { x: ptr.x + 1 }; | ||
| --- previous borrow occurs due to use of `ptr` in closure | ||
... | ||
LL | test(&*ptr); | ||
| ^^^^ immutable borrow occurs here | ||
LL | //~^ ERROR: cannot borrow `*ptr` as immutable | ||
LL | } | ||
| - mutable borrow ends here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0502`. |
File renamed without changes.
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,15 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-11374.rs:36:15 | ||
| | ||
LL | c.read_to(v); //~ ERROR E0308 | ||
| ^ | ||
| | | ||
| expected &mut [u8], found struct `std::vec::Vec` | ||
| help: consider mutably borrowing here: `&mut v` | ||
| | ||
= note: expected type `&mut [u8]` | ||
found type `std::vec::Vec<_>` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |
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,16 @@ | ||
error[E0597]: borrowed value does not live long enough (Ast) | ||
--> $DIR/issue-11493.rs:20:35 | ||
| | ||
LL | let y = x.as_ref().unwrap_or(&id(5)); | ||
| ^^^^^ - temporary value dropped here while still borrowed | ||
| | | ||
| temporary value does not live long enough | ||
... | ||
LL | } | ||
| - temporary value needs to live until here | ||
| | ||
= note: consider using a `let` binding to increase its lifetime | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0597`. |
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,16 @@ | ||
error[E0597]: borrowed value does not live long enough (Ast) | ||
--> $DIR/issue-11493.rs:20:35 | ||
| | ||
LL | let y = x.as_ref().unwrap_or(&id(5)); | ||
| ^^^^^ - temporary value dropped here while still borrowed | ||
| | | ||
| temporary value does not live long enough | ||
... | ||
LL | } | ||
| - temporary value needs to live until here | ||
| | ||
= note: consider using a `let` binding to increase its lifetime | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0597`. |
Oops, something went wrong.