Skip to content

Commit 5a0baa5

Browse files
committed
Using unsized_local feature is not needed in these tests
1 parent 8385c1d commit 5a0baa5

File tree

5 files changed

+9
-30
lines changed

5 files changed

+9
-30
lines changed

Diff for: src/test/ui/unsized-locals/unsized-exprs.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
2-
//~^ WARN the feature `unsized_locals` is incomplete
1+
#![feature(unsized_tuple_coercion, unsized_fn_params)]
32

43
struct A<X: ?Sized>(X);
54

Diff for: src/test/ui/unsized-locals/unsized-exprs.stderr

+4-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/unsized-exprs.rs:1:36
3-
|
4-
LL | #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
5-
| ^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
= note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
9-
101
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
11-
--> $DIR/unsized-exprs.rs:23:26
2+
--> $DIR/unsized-exprs.rs:22:26
123
|
134
LL | udrop::<(i32, [u8])>((42, *foo()));
145
| ^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -19,7 +10,7 @@ LL | udrop::<(i32, [u8])>((42, *foo()));
1910
= note: tuples must have a statically known size to be initialized
2011

2112
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
22-
--> $DIR/unsized-exprs.rs:25:22
13+
--> $DIR/unsized-exprs.rs:24:22
2314
|
2415
LL | udrop::<A<[u8]>>(A { 0: *foo() });
2516
| ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -30,7 +21,7 @@ LL | udrop::<A<[u8]>>(A { 0: *foo() });
3021
= note: structs must have a statically known size to be initialized
3122

3223
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
33-
--> $DIR/unsized-exprs.rs:27:22
24+
--> $DIR/unsized-exprs.rs:26:22
3425
|
3526
LL | udrop::<A<[u8]>>(A(*foo()));
3627
| ^ doesn't have a size known at compile-time
@@ -40,6 +31,6 @@ LL | udrop::<A<[u8]>>(A(*foo()));
4031
= note: required because it appears within the type `A<[u8]>`
4132
= note: the return type of a function must have a statically known size
4233

43-
error: aborting due to 3 previous errors; 1 warning emitted
34+
error: aborting due to 3 previous errors
4435

4536
For more information about this error, try `rustc --explain E0277`.

Diff for: src/test/ui/unsized-locals/unsized-exprs2.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
2-
//~^ WARN the feature `unsized_locals` is incomplete
1+
#![feature(unsized_tuple_coercion, unsized_fn_params)]
32

43
struct A<X: ?Sized>(X);
54

Diff for: src/test/ui/unsized-locals/unsized-exprs2.stderr

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
warning: the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/unsized-exprs2.rs:1:36
3-
|
4-
LL | #![feature(unsized_tuple_coercion, unsized_locals, unsized_fn_params)]
5-
| ^^^^^^^^^^^^^^
6-
|
7-
= note: `#[warn(incomplete_features)]` on by default
8-
= note: see issue #48055 <https://github.com/rust-lang/rust/issues/48055> for more information
9-
101
error[E0508]: cannot move out of type `[u8]`, a non-copy slice
11-
--> $DIR/unsized-exprs2.rs:23:5
2+
--> $DIR/unsized-exprs2.rs:22:5
123
|
134
LL | udrop::<[u8]>(foo()[..]);
145
| ^^^^^^^^^^^^^^^^^^^^^^^^
156
| |
167
| cannot move out of here
178
| move occurs because value has type `[u8]`, which does not implement the `Copy` trait
189

19-
error: aborting due to previous error; 1 warning emitted
10+
error: aborting due to previous error
2011

2112
For more information about this error, try `rustc --explain E0508`.

Diff for: src/test/ui/unsized-locals/unsized-index.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// Tightening the bound now could be a breaking change. Although no crater
66
// regression were observed (https://github.com/rust-lang/rust/pull/59527),
77
// let's be conservative and just add a test for this.
8-
#![allow(incomplete_features)]
9-
#![feature(unsized_locals, unsized_fn_params)]
8+
#![feature(unsized_fn_params)]
109

1110
use std::ops;
1211

0 commit comments

Comments
 (0)