Skip to content
Open
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
9 changes: 8 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1919,8 +1919,15 @@ impl<'test> TestCx<'test> {
compiler.args(&["-A", "unused", "-W", "unused_attributes"]);
}

// Allow tests to use internal features.
// 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")
{
compiler.args(&["-A", "incomplete_features"]);
}

// Allow tests to have unused parens and braces.
// Add #![deny(unused_parens, unused_braces)] to the test file if you want to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#![feature(generic_const_exprs)]
//~^ WARN the feature `generic_const_exprs` is incomplete
#![feature(min_generic_const_args)]
//~^ WARN the feature `min_generic_const_args` is incomplete
#![feature(inherent_associated_types)]
//~^ WARN the feature `inherent_associated_types` is incomplete

struct OnDiskDirEntry<'a>(&'a ());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/type-const-in-array-len-wrong-type.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

warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/type-const-in-array-len-wrong-type.rs:3:12
|
LL | #![feature(min_generic_const_args)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information

warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/type-const-in-array-len-wrong-type.rs:5:12
|
LL | #![feature(inherent_associated_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information

error: the constant `2` is not of type `usize`
--> $DIR/type-const-in-array-len-wrong-type.rs:13:26
--> $DIR/type-const-in-array-len-wrong-type.rs:10:26
|
LL | fn lfn_contents() -> [char; Self::LFN_FRAGMENT_LEN] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `i64`
|
= note: the length of array `[char; 2]` must be type `usize`

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

2 changes: 0 additions & 2 deletions tests/ui/associated-consts/type-const-in-array-len.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//@ check-pass

#![feature(min_generic_const_args)]
//~^ WARN the feature `min_generic_const_args` is incomplete
#![feature(inherent_associated_types)]
//~^ WARN the feature `inherent_associated_types` is incomplete

// Test case from #138226: generic impl with multiple type parameters
struct Foo<A, B>(A, B);
Expand Down
19 changes: 0 additions & 19 deletions tests/ui/associated-consts/type-const-in-array-len.stderr

This file was deleted.

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

// Regression test for #146467.
#![feature(inherent_associated_types)]
//~^ WARN the feature `inherent_associated_types` is incomplete

struct Foo<T>(T);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
warning: the feature `inherent_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:4:12
|
LL | #![feature(inherent_associated_types)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:9:6
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:8:6
|
LL | impl<'a> Foo<fn(&())> {
| ^^ unconstrained lifetime parameter

error[E0308]: mismatched types
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:14:11
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:13:11
|
LL | fn foo(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
Expand All @@ -23,12 +14,12 @@ LL | fn foo(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
found struct `Foo<for<'a> fn(&'a ())>`

error: higher-ranked subtype error
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:14:1
--> $DIR/hr-do-not-blame-outlives-static-ice.rs:13:1
|
LL | fn foo(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

Some errors have detailed explanations: E0207, E0308.
For more information about an error, try `rustc --explain E0207`.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ check-pass

#![feature(inherent_associated_types)]
//~^ WARN the feature `inherent_associated_types` is incomplete

struct D<T> {
a: T
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion tests/ui/associated-types/defaults-specialization.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Tests the interaction of associated type defaults and specialization.
#![feature(associated_type_defaults, specialization)]
//~^ WARN the feature `specialization` is incomplete

trait Tr {
type Ty = u8;
Expand Down
42 changes: 16 additions & 26 deletions tests/ui/associated-types/defaults-specialization.stderr
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/defaults-specialization.rs:3:38
|
LL | #![feature(associated_type_defaults, specialization)]
| ^^^^^^^^^^^^^^
|
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
= help: consider using `min_specialization` instead, which is more stable and complete
= note: `#[warn(incomplete_features)]` on by default

error[E0053]: method `make` has an incompatible type for trait
--> $DIR/defaults-specialization.rs:19:18
--> $DIR/defaults-specialization.rs:18:18
|
LL | fn make() -> u8 { 0 }
| ^^ expected associated type, found `u8`
|
note: type in trait
--> $DIR/defaults-specialization.rs:9:18
--> $DIR/defaults-specialization.rs:8:18
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^
Expand All @@ -28,7 +18,7 @@ LL + fn make() -> <A<T> as Tr>::Ty { 0 }
|

error[E0053]: method `make` has an incompatible type for trait
--> $DIR/defaults-specialization.rs:35:18
--> $DIR/defaults-specialization.rs:34:18
|
LL | default type Ty = bool;
| --------------- associated type is `default` and may be overridden
Expand All @@ -37,7 +27,7 @@ LL | fn make() -> bool { true }
| ^^^^ expected associated type, found `bool`
|
note: type in trait
--> $DIR/defaults-specialization.rs:9:18
--> $DIR/defaults-specialization.rs:8:18
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^
Expand All @@ -50,7 +40,7 @@ LL + fn make() -> <B<T> as Tr>::Ty { true }
|

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:10:9
--> $DIR/defaults-specialization.rs:9:9
|
LL | type Ty = u8;
| ------- associated type defaults can't be assumed inside the trait defining them
Expand All @@ -64,7 +54,7 @@ LL | 0u8
found type `u8`

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:26:29
--> $DIR/defaults-specialization.rs:25:29
|
LL | fn make() -> Self::Ty { 0u8 }
| -------- ^^^ expected associated type, found `u8`
Expand All @@ -79,7 +69,7 @@ LL | fn make() -> Self::Ty { 0u8 }
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:44:29
--> $DIR/defaults-specialization.rs:43:29
|
LL | default type Ty = bool;
| --------------- associated type is `default` and may be overridden
Expand All @@ -95,7 +85,7 @@ LL | fn make() -> Self::Ty { true }
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:87:32
--> $DIR/defaults-specialization.rs:86:32
|
LL | let _: <B<()> as Tr>::Ty = 0u8;
| ----------------- ^^^ expected associated type, found `u8`
Expand All @@ -105,13 +95,13 @@ LL | let _: <B<()> as Tr>::Ty = 0u8;
= note: expected associated type `<B<()> as Tr>::Ty`
found type `u8`
help: a method is available that returns `<B<()> as Tr>::Ty`
--> $DIR/defaults-specialization.rs:9:5
--> $DIR/defaults-specialization.rs:8:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:88:32
--> $DIR/defaults-specialization.rs:87:32
|
LL | let _: <B<()> as Tr>::Ty = true;
| ----------------- ^^^^ expected associated type, found `bool`
Expand All @@ -121,15 +111,15 @@ LL | let _: <B<()> as Tr>::Ty = true;
= note: expected associated type `<B<()> as Tr>::Ty`
found type `bool`
help: a method is available that returns `<B<()> as Tr>::Ty`
--> $DIR/defaults-specialization.rs:9:5
--> $DIR/defaults-specialization.rs:8:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
= note: the associated type `<B<()> as Tr>::Ty` is defined as `bool` in the implementation, but the where-bound `B<()>` shadows this definition
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:89:33
--> $DIR/defaults-specialization.rs:88:33
|
LL | let _: <B2<()> as Tr>::Ty = 0u8;
| ------------------ ^^^ expected associated type, found `u8`
Expand All @@ -139,13 +129,13 @@ LL | let _: <B2<()> as Tr>::Ty = 0u8;
= note: expected associated type `<B2<()> as Tr>::Ty`
found type `u8`
help: a method is available that returns `<B2<()> as Tr>::Ty`
--> $DIR/defaults-specialization.rs:9:5
--> $DIR/defaults-specialization.rs:8:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`

error[E0308]: mismatched types
--> $DIR/defaults-specialization.rs:90:33
--> $DIR/defaults-specialization.rs:89:33
|
LL | let _: <B2<()> as Tr>::Ty = true;
| ------------------ ^^^^ expected associated type, found `bool`
Expand All @@ -155,14 +145,14 @@ LL | let _: <B2<()> as Tr>::Ty = true;
= note: expected associated type `<B2<()> as Tr>::Ty`
found type `bool`
help: a method is available that returns `<B2<()> as Tr>::Ty`
--> $DIR/defaults-specialization.rs:9:5
--> $DIR/defaults-specialization.rs:8:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
= note: the associated type `<B2<()> as Tr>::Ty` is defined as `bool` in the implementation, but the where-bound `B2<()>` shadows this definition
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information

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

Some errors have detailed explanations: E0053, E0308.
For more information about an error, try `rustc --explain E0053`.
1 change: 0 additions & 1 deletion tests/ui/async-await/async-drop/foreign-fundamental.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ edition: 2018

#![feature(async_drop)]
//~^ WARN the feature `async_drop` is incomplete

use std::future::AsyncDrop;
use std::pin::Pin;
Expand Down
15 changes: 3 additions & 12 deletions tests/ui/async-await/async-drop/foreign-fundamental.stderr
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
warning: the feature `async_drop` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/foreign-fundamental.rs:3:12
|
LL | #![feature(async_drop)]
| ^^^^^^^^^^
|
= note: see issue #126482 <https://github.com/rust-lang/rust/issues/126482> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0120]: the `AsyncDrop` trait may only be implemented for local structs, enums, and unions
--> $DIR/foreign-fundamental.rs:11:20
--> $DIR/foreign-fundamental.rs:10:20
|
LL | impl AsyncDrop for &Foo {
| ^^^^ must be a struct, enum, or union in the current crate

error[E0120]: the `AsyncDrop` trait may only be implemented for local structs, enums, and unions
--> $DIR/foreign-fundamental.rs:16:20
--> $DIR/foreign-fundamental.rs:15:20
|
LL | impl AsyncDrop for Pin<Foo> {
| ^^^^^^^^ must be a struct, enum, or union in the current crate

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

For more information about this error, try `rustc --explain E0120`.
11 changes: 1 addition & 10 deletions tests/ui/async-await/dyn/mut-is-pointer-like.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/mut-is-pointer-like.rs:6:12
|
LL | #![feature(async_fn_in_dyn_trait)]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #133119 <https://github.com/rust-lang/rust/issues/133119> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0038]: the trait `AsyncTrait` is not dyn compatible
--> $DIR/mut-is-pointer-like.rs:35:29
|
Expand All @@ -24,6 +15,6 @@ LL | async fn async_dispatch(self: Pin<&mut Self>) -> Self::Output;
| ^^^^^^^^^^^^^^ ...because method `async_dispatch` is `async`
= help: consider moving `async_dispatch` to another trait

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 E0038`.
11 changes: 1 addition & 10 deletions tests/ui/async-await/dyn/works.stderr
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/works.rs:6:12
|
LL | #![feature(async_fn_in_dyn_trait)]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #133119 <https://github.com/rust-lang/rust/issues/133119> for more information
= note: `#[warn(incomplete_features)]` on by default

error[E0038]: the trait `AsyncTrait` is not dyn compatible
--> $DIR/works.rs:27:21
|
Expand All @@ -24,6 +15,6 @@ LL | async fn async_dispatch(&self);
= help: consider moving `async_dispatch` to another trait
= help: only type `&'static str` implements `AsyncTrait`; consider using it directly instead.

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 E0038`.
Loading
Loading