Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1922,10 +1922,7 @@ impl<'test> TestCx<'test> {
// Allow tests to use internal and incomplete features.
compiler.args(&["-A", "internal_features"]);
// FIXME(#154168); temporarily exclude some directories to make the transition easier
if !input_file
.iter()
.any(|p| p == "traits" || p == "specialization" || p == "const-generics")
{
if !input_file.iter().any(|p| p == "specialization") {
compiler.args(&["-A", "incomplete_features"]);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ check-pass
#![feature(adt_const_params, lazy_type_alias)]
//~^ WARN: the feature `lazy_type_alias` is incomplete

pub type Matrix = [usize; 1];
const EMPTY_MATRIX: Matrix = [0; 1];
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#![feature(adt_const_params)]
#![feature(unsized_const_params)]
//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes

#[derive(Clone)]
struct S<const L: [u8]>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
error: free constant item without body
--> $DIR/unsized-anon-const-err-2.rs:10:1
--> $DIR/unsized-anon-const-err-2.rs:9:1
|
LL | const A: [u8];
| ^^^^^^^^^^^^^-
| |
| help: provide a definition for the constant: `= <expr>;`

warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/unsized-anon-const-err-2.rs:4:12
|
LL | #![feature(unsized_const_params)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #95174 <https://github.com/rust-lang/rust/issues/95174> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/unsized-anon-const-err-2.rs:10:10
--> $DIR/unsized-anon-const-err-2.rs:9:10
|
LL | const A: [u8];
| ^^^^ doesn't have a size known at compile-time
Expand All @@ -25,7 +16,7 @@ LL | const A: [u8];
= note: statics and constants must have a statically known size

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/unsized-anon-const-err-2.rs:14:31
--> $DIR/unsized-anon-const-err-2.rs:13:31
|
LL | impl<const N: i32> Copy for S<A> {}
| ^ doesn't have a size known at compile-time
Expand All @@ -34,7 +25,7 @@ LL | impl<const N: i32> Copy for S<A> {}
= note: statics and constants must have a statically known size

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/unsized-anon-const-err-2.rs:17:33
--> $DIR/unsized-anon-const-err-2.rs:16:33
|
LL | impl<const M: usize> Copy for S<A> {}
| ^ doesn't have a size known at compile-time
Expand All @@ -43,7 +34,7 @@ LL | impl<const M: usize> Copy for S<A> {}
= note: statics and constants must have a statically known size

error[E0207]: the const parameter `N` is not constrained by the impl trait, self type, or predicates
--> $DIR/unsized-anon-const-err-2.rs:14:6
--> $DIR/unsized-anon-const-err-2.rs:13:6
|
LL | impl<const N: i32> Copy for S<A> {}
| ^^^^^^^^^^^^ unconstrained const parameter
Expand All @@ -52,15 +43,15 @@ LL | impl<const N: i32> Copy for S<A> {}
= note: proving the result of expressions other than the parameter are unique is not supported

error[E0207]: the const parameter `M` is not constrained by the impl trait, self type, or predicates
--> $DIR/unsized-anon-const-err-2.rs:17:6
--> $DIR/unsized-anon-const-err-2.rs:16:6
|
LL | impl<const M: usize> Copy for S<A> {}
| ^^^^^^^^^^^^^^ unconstrained const parameter
|
= note: expressions using a const parameter must map each value to a distinct output value
= note: proving the result of expressions other than the parameter are unique is not supported

error: aborting due to 6 previous errors; 1 warning emitted
error: aborting due to 6 previous errors

Some errors have detailed explanations: E0207, E0277.
For more information about an error, try `rustc --explain E0207`.
2 changes: 0 additions & 2 deletions tests/ui/const-generics/defaults/concrete-const-param-type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
//~^ WARN the feature `generic_const_parameter_types` is incomplete
//~| WARN the feature `unsized_const_params` is incomplete
// Make sure that we test the const param type of default const parameters
// if both the type of the default and the type of the parameter are concrete.

Expand Down
21 changes: 2 additions & 19 deletions tests/ui/const-generics/defaults/concrete-const-param-type.stderr
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
warning: the feature `generic_const_parameter_types` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/concrete-const-param-type.rs:1:12
|
LL | #![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #137626 <https://github.com/rust-lang/rust/issues/137626> for more information
= note: `#[warn(incomplete_features)]` on by default

warning: the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/concrete-const-param-type.rs:1:43
|
LL | #![feature(generic_const_parameter_types, unsized_const_params, adt_const_params)]
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #95174 <https://github.com/rust-lang/rust/issues/95174> for more information

error: the constant `N` is not of type `u64`
--> $DIR/concrete-const-param-type.rs:9:26
--> $DIR/concrete-const-param-type.rs:7:26
|
LL | struct Foo<const N: u32, const M: u64 = N>;
| ^^^^^^^^^^^^^^^^ expected `u64`, found `u32`

error: aborting due to 1 previous error; 2 warnings emitted
error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// issue: rust-lang/rust#114463
// ICE cannot convert `ReFree ..` to a region vid
#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes

fn bug<'a>() {
[(); (|_: &'a u8| (), 0).1];
//~^ ERROR cannot capture late-bound lifetime in constant
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/cannot-convert-refree-ice-114463.rs:3:12
|
LL | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default

error: cannot capture late-bound lifetime in constant
--> $DIR/cannot-convert-refree-ice-114463.rs:6:16
|
Expand All @@ -15,5 +6,5 @@ LL | fn bug<'a>() {
LL | [(); (|_: &'a u8| (), 0).1];
| ^^

error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete

fn foo<T>() {
let _ = [0u8; { const { std::mem::size_of::<T>() } }];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/const-block-is-poly.rs:1:12
|
LL | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default

error: overly complex generic constant
--> $DIR/const-block-is-poly.rs:5:19
--> $DIR/const-block-is-poly.rs:4:19
|
LL | let _ = [0u8; { const { std::mem::size_of::<T>() } }];
| ^^----------------------------------^^
Expand All @@ -18,5 +9,5 @@ LL | let _ = [0u8; { const { std::mem::size_of::<T>() } }];
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future

error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use

pub fn y<'a, U: 'a>() -> impl IntoIterator<Item = impl IntoIterator<Item = [u8; { 1 + 2 }]> + 'a> {
[[[1, 2, 3]]]
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ build-pass

#![feature(generic_const_exprs)]
//~^ WARNING the feature `generic_const_exprs` is incomplete

trait Generic {
const ASSOC: usize;
Expand Down
11 changes: 0 additions & 11 deletions tests/ui/const-generics/generic_const_exprs/eval-try-unify.stderr

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass

#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]

pub struct Changes<const CHANGES: &'static [&'static str]>
where
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//@ check-pass

#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
//~^ WARN the feature `unsized_const_params` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]
//~^^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes [incomplete_features]

pub struct Changes<const CHANGES: &'static [&'static str]>
where
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete

trait B {
type U<T>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/mismatched-gat-subst-kind.rs:1:12
|
LL | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0747]: constant provided when a type was expected
--> $DIR/mismatched-gat-subst-kind.rs:8:13
--> $DIR/mismatched-gat-subst-kind.rs:7:13
|
LL | fn f<T: B<U<1i32> = ()>>() {}
| ^^^^

error: aborting due to 1 previous error; 1 warning emitted
error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0747`.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Regression test for #133271.
#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete

struct Foo;
impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
error[E0407]: method `unimplemented` is not a member of trait `std::ops::Add`
--> $DIR/post-analysis-user-facing-param-env.rs:12:5
--> $DIR/post-analysis-user-facing-param-env.rs:11:5
|
LL | / fn unimplemented(self, _: &Foo) -> Self::Output {
LL | |
LL | | loop {}
LL | | }
| |_____^ not a member of trait `std::ops::Add`

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/post-analysis-user-facing-param-env.rs:2:12
|
LL | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0046]: not all trait items implemented, missing: `Output`, `add`
--> $DIR/post-analysis-user-facing-param-env.rs:6:1
--> $DIR/post-analysis-user-facing-param-env.rs:5:1
|
LL | / impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
LL | |
Expand All @@ -30,15 +21,15 @@ LL | | [(); 1 + 0]: Sized,
= help: implement the missing item: `fn add(self, _: &'a Foo) -> <Self as Add<&'a Foo>>::Output { todo!() }`

error[E0207]: the const parameter `NUM` is not constrained by the impl trait, self type, or predicates
--> $DIR/post-analysis-user-facing-param-env.rs:6:10
--> $DIR/post-analysis-user-facing-param-env.rs:5:10
|
LL | impl<'a, const NUM: usize> std::ops::Add<&'a Foo> for Foo
| ^^^^^^^^^^^^^^^^ unconstrained const parameter
|
= note: expressions using a const parameter must map each value to a distinct output value
= note: proving the result of expressions other than the parameter are unique is not supported

error: aborting due to 3 previous errors; 1 warning emitted
error: aborting due to 3 previous errors

Some errors have detailed explanations: E0046, E0207, E0407.
For more information about an error, try `rustc --explain E0046`.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#![feature(with_negative_coherence)]
#![feature(min_specialization)]
#![feature(generic_const_exprs)]
//~^ WARNING the feature `generic_const_exprs` is incomplete

#![crate_type = "lib"]
trait Trait {}
Expand Down

This file was deleted.

Loading
Loading