Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move compile-fail/unsized-locals under ui as per #44844.
- Loading branch information
Showing
7 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
src/test/ui/unsized-locals/by-value-trait-object-safety.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,8 @@ | ||
error: the `foo` method cannot be invoked on a trait object | ||
--> $DIR/by-value-trait-object-safety.rs:28:7 | ||
| | ||
LL | x.foo(); | ||
| ^^^ | ||
|
||
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,25 @@ | ||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time | ||
--> $DIR/unsized-exprs.rs:32:26 | ||
| | ||
LL | udrop::<(i32, [u8])>((42, *foo())); | ||
| ^^^^^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: within `({integer}, [u8])`, the trait `std::marker::Sized` is not implemented for `[u8]` | ||
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> | ||
= note: required because it appears within the type `({integer}, [u8])` | ||
= note: tuples must have a statically known size to be initialized | ||
|
||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time | ||
--> $DIR/unsized-exprs.rs:34:22 | ||
| | ||
LL | udrop::<A<[u8]>>(A { 0: *foo() }); | ||
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: within `A<[u8]>`, the trait `std::marker::Sized` is not implemented for `[u8]` | ||
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait> | ||
= note: required because it appears within the type `A<[u8]>` | ||
= note: structs must have a statically known size to be initialized | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
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,19 @@ | ||
error[E0508]: cannot move out of type `[u8]`, a non-copy slice | ||
--> $DIR/unsized-exprs2.rs:32:19 | ||
| | ||
LL | udrop::<[u8]>(foo()[..]); | ||
| ^^^^^^^^^ cannot move out of here | ||
|
||
error[E0507]: cannot move out of data in a `&` reference | ||
--> $DIR/unsized-exprs2.rs:32:19 | ||
| | ||
LL | udrop::<[u8]>(foo()[..]); | ||
| ^^^^^^^^^ | ||
| | | ||
| cannot move out of data in a `&` reference | ||
| cannot move | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors occurred: E0507, E0508. | ||
For more information about an error, try `rustc --explain E0507`. |
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[E0507]: cannot move out of indexed content | ||
--> $DIR/unsized-exprs2.rs:32:19 | ||
| | ||
LL | udrop::<[u8]>(foo()[..]); | ||
| ^^^^^^^^^ cannot move out of indexed content | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0507`. |