Skip to content

Commit 9d6f4e5

Browse files
committed
Auto merge of #52409 - estebank:move-cfail-ui, r=oli-obk
Move some `compile-fail` tests to `ui` Re: #44844.
2 parents 31263f3 + 82fd8d7 commit 9d6f4e5

File tree

1,137 files changed

+9577
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,137 files changed

+9577
-17
lines changed

src/test/compile-fail/issue-26548.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern: cycle detected when computing layout of
12-
// note-pattern: ...which requires computing layout of
13-
// note-pattern: ...which again requires computing layout of
11+
//~^^^^^^^^^^ ERROR cycle detected when computing layout of
12+
//~| NOTE ...which requires computing layout of
13+
//~| NOTE ...which again requires computing layout of
14+
//~| NOTE cycle used when compile_codegen_unit
1415

1516
trait Mirror { type It: ?Sized; }
1617
impl<T: ?Sized> Mirror for T { type It = Self; }
File renamed without changes.

src/test/ui/issue-10176.stderr

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-10176.rs:12:5
3+
|
4+
LL | fn f() -> isize {
5+
| ----- expected `isize` because of return type
6+
LL | (return 1, return 2)
7+
| ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
8+
|
9+
= note: expected type `isize`
10+
found type `(!, !)`
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0308`.
File renamed without changes.

src/test/ui/issue-10200.stderr

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0532]: expected tuple struct/variant, found function `foo`
2+
--> $DIR/issue-10200.rs:16:9
3+
|
4+
LL | foo(x) //~ ERROR expected tuple struct/variant, found function `foo`
5+
| ^^^ did you mean `Foo`?
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0532`.

src/test/ui/issue-10291.nll.stderr

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
warning: not reporting region error due to nll
2+
--> $DIR/issue-10291.rs:13:9
3+
|
4+
LL | x //~ ERROR E0312
5+
| ^
6+
7+
error: unsatisfied lifetime constraints
8+
--> $DIR/issue-10291.rs:12:5
9+
|
10+
LL | drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ free region requires that `'x` must outlive `'static`
12+
13+
error: aborting due to previous error
14+
File renamed without changes.

src/test/ui/issue-10291.stderr

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2+
--> $DIR/issue-10291.rs:13:9
3+
|
4+
LL | x //~ ERROR E0312
5+
| ^
6+
|
7+
note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 12:65...
8+
--> $DIR/issue-10291.rs:12:65
9+
|
10+
LL | drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
11+
| _________________________________________________________________^
12+
LL | | x //~ ERROR E0312
13+
LL | | }));
14+
| |_____^
15+
note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 11:9
16+
--> $DIR/issue-10291.rs:11:9
17+
|
18+
LL | fn test<'x>(x: &'x isize) {
19+
| ^^
20+
21+
error: aborting due to previous error
22+
23+
For more information about this error, try `rustc --explain E0312`.

src/test/ui/issue-10398.nll.stderr

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0382]: use of moved value: `x`
2+
--> $DIR/issue-10398.rs:17:14
3+
|
4+
LL | let _a = x;
5+
| - value moved here
6+
LL | drop(x);
7+
| ^ value used here after move
8+
|
9+
= note: move occurs because `x` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
10+
11+
error: aborting due to previous error
12+
13+
For more information about this error, try `rustc --explain E0382`.
File renamed without changes.

0 commit comments

Comments
 (0)