sym::raw_dylib,
sym::const_trait_impl,
sym::const_trait_bound_opt_out,
+ sym::specialization,
];
//! 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;
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/defaults-specialization.rs:3:38
+ |
+LL | #![feature(associated_type_defaults, specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0053]: method `make` has an incompatible type for trait
- --> $DIR/defaults-specialization.rs:18:18
+ --> $DIR/defaults-specialization.rs:19:18
|
LL | fn make() -> Self::Ty {
| -------- type in trait
found fn pointer `fn() -> u8`
error[E0053]: method `make` has an incompatible type for trait
- --> $DIR/defaults-specialization.rs:34:18
+ --> $DIR/defaults-specialization.rs:35:18
|
LL | fn make() -> Self::Ty {
| -------- type in trait
found fn pointer `fn() -> bool`
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:9:9
+ --> $DIR/defaults-specialization.rs:10:9
|
LL | type Ty = u8;
| ------------- associated type defaults can't be assumed inside the trait defining them
found type `u8`
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:25:29
+ --> $DIR/defaults-specialization.rs:26:29
|
LL | fn make() -> Self::Ty { 0u8 }
| -------- ^^^ expected associated type, found `u8`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:43:29
+ --> $DIR/defaults-specialization.rs:44:29
|
LL | default type Ty = bool;
| ----------------------- expected this associated type
found type `bool`
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:86:32
+ --> $DIR/defaults-specialization.rs:87:32
|
LL | let _: <B<()> as Tr>::Ty = 0u8;
| ----------------- ^^^ expected associated type, found `u8`
= 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:8:5
+ --> $DIR/defaults-specialization.rs:9:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:87:32
+ --> $DIR/defaults-specialization.rs:88:32
|
LL | let _: <B<()> as Tr>::Ty = true;
| ----------------- ^^^^ expected associated type, found `bool`
= 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:8:5
+ --> $DIR/defaults-specialization.rs:9:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:88:33
+ --> $DIR/defaults-specialization.rs:89:33
|
LL | let _: <B2<()> as Tr>::Ty = 0u8;
| ------------------ ^^^ expected associated type, found `u8`
= 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:8:5
+ --> $DIR/defaults-specialization.rs:9:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
error[E0308]: mismatched types
- --> $DIR/defaults-specialization.rs:89:33
+ --> $DIR/defaults-specialization.rs:90:33
|
LL | let _: <B2<()> as Tr>::Ty = true;
| ------------------ ^^^^ expected associated type, found `bool`
= 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:8:5
+ --> $DIR/defaults-specialization.rs:9:5
|
LL | fn make() -> Self::Ty {
| ^^^^^^^^^^^^^^^^^^^^^ consider calling `Tr::make`
-error: aborting due to 9 previous errors
+error: aborting due to 9 previous errors; 1 warning emitted
Some errors have detailed explanations: E0053, E0308.
For more information about an error, try `rustc --explain E0053`.
// Tests that specialization does not cause optimizations running on polymorphic MIR to resolve
// to a `default` implementation.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Marker {}
--- /dev/null
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/trait_specialization.rs:8:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo: std::fmt::Debug + Eq {}
--- /dev/null
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/equality-rpass.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo: Copy + ToString {}
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/equality.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0308]: mismatched types
--> $DIR/equality.rs:15:5
|
|
= help: the trait `std::ops::Add<impl Foo>` is not implemented for `u32`
-error: aborting due to 2 previous errors
+error: aborting due to 2 previous errors; 1 warning emitted
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo: Copy + ToString {}
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/equality2.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0308]: mismatched types
--> $DIR/equality2.rs:25:18
|
= note: expected opaque type `impl Foo` (`i32`)
found opaque type `impl Foo` (`u32`)
-error: aborting due to 4 previous errors
+error: aborting due to 4 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
// run-pass
#![feature(marker_trait_attr)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
#[marker]
trait MyMarker {}
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/overlap-doesnt-conflict-with-specialization.rs:4:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
fn main() {}
| |
| `default` because of this
-error: aborting due to 6 previous errors
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/trait-item-with-defaultness-fail-semantic.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+error: aborting due to 6 previous errors; 1 warning emitted
// Make sure we don't crash with a cycle error during coherence.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Trait<T> {
type Assoc;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/assoc-ty-graph-cycle.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// aux-build:cross_crates_defaults.rs
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
extern crate cross_crates_defaults;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/cross-crate-defaults.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// aux-build:go_trait.rs
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
extern crate go_trait;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/allowed-cross-crate.rs:8:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// Test that you can list the more specific impl before the more general one.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
type Out;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/out-of-order.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// projections involve specialization, so long as the associated type is
// provided by the most specialized impl.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Assoc {
type Output;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/overlap-projection.rs:7:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
#![allow(dead_code)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Make sure we *can* project non-defaulted associated types
// cf compile-fail/specialization-default-projection.rs
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/projection.rs:4:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Check a number of scenarios in which one impl tries to override another,
// without correctly using `default`.
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-no-default.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
--> $DIR/specialization-no-default.rs:20:5
|
|
= note: to specialize, `redundant` in the parent `impl` must be marked `default`
-error: aborting due to 5 previous errors
+error: aborting due to 5 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0520`.
// Tests that we can combine a default impl that supplies one method with a
// full impl that supplies the other, and they can invoke one another.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
fn foo_one(&self) -> &'static str;
--- /dev/null
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/specialization-trait-item-not-implemented-rpass.rs:6:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// Tests that default impls do not have to supply all items but regular impls do.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
fn foo_one(&self) -> &'static str;
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/specialization-trait-item-not-implemented.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0046]: not all trait items implemented, missing: `foo_two`
--> $DIR/specialization-trait-item-not-implemented.rs:18:1
|
LL | impl Foo for MyStruct {}
| ^^^^^^^^^^^^^^^^^^^^^ missing `foo_two` in implementation
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0046`.
// - default impls do not have to supply all items and
// - a default impl does not count as an impl (in this case, an incomplete default impl).
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
fn foo_one(&self) -> &'static str;
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/specialization-trait-not-implemented.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0599]: no method named `foo_one` found for struct `MyStruct` in the current scope
--> $DIR/specialization-trait-not-implemented.rs:22:29
|
LL | trait Foo {
| ^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0599`.
// Tests that a default impl still has to have a WF trait ref.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo<'a, T: Eq + 'a> { }
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-wfcheck.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0277]: the trait bound `U: std::cmp::Eq` is not satisfied
--> $DIR/specialization-wfcheck.rs:7:17
|
LL | default impl<U: std::cmp::Eq> Foo<'static, U> for () {}
| ^^^^^^^^^^^^^^
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.
#![feature(negative_impls)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
struct S;
struct Z;
|
= note: only trait implementations may be annotated with `default`
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/validation.rs:2:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error: impls of auto traits cannot be default
--> $DIR/validation.rs:9:21
|
LL | default impl !Tr for S {}
| ^^^^^^^ ^
-error: aborting due to 5 previous errors
+error: aborting due to 5 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0750`.
// check-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
pub struct Cloned<I>(I);
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-36804.rs:2:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Regression test for a specialization-related ICE (#39448).
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-39448.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0275]: overflow evaluating the requirement `T: FromA<U>`
--> $DIR/issue-39448.rs:45:13
|
= note: required because of the requirements on the impl of `FromA<U>` for `T`
= note: required because of the requirements on the impl of `ToA<T>` for `U`
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0275`.
// check-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
fn foo(&self);
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-39618.rs:7:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
pub trait Foo {
fn foo();
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-50452.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Regression test for #52050: when inserting the blanket impl `I`
// into the tree, we had to replace the child node for `Foo`, which
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-52050.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0119]: conflicting implementations of trait `IntoPyDictPointer` for type `()`:
--> $DIR/issue-52050.rs:28:1
|
|
= note: upstream crates may add a new impl of trait `std::iter::Iterator` for type `()` in future versions
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.
// check-pass
// edition:2018
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
fn main() {}
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-63716-parse-async.rs:7:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// check-pass
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/issue-70442.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
#![feature(specialization, associated_type_defaults)]
+//~^ WARN the feature `specialization` is incomplete
// Test that attempting to override a non-default method or one not in the
// parent impl causes an error.
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/non-defaulted-item-fail.rs:1:12
+ |
+LL | #![feature(specialization, associated_type_defaults)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
- --> $DIR/non-defaulted-item-fail.rs:29:5
+ --> $DIR/non-defaulted-item-fail.rs:30:5
|
LL | / impl<T> Foo for Box<T> {
LL | | type Ty = bool;
= note: to specialize, `Ty` in the parent `impl` must be marked `default`
error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
- --> $DIR/non-defaulted-item-fail.rs:31:5
+ --> $DIR/non-defaulted-item-fail.rs:32:5
|
LL | / impl<T> Foo for Box<T> {
LL | | type Ty = bool;
= note: to specialize, `CONST` in the parent `impl` must be marked `default`
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
- --> $DIR/non-defaulted-item-fail.rs:33:5
+ --> $DIR/non-defaulted-item-fail.rs:34:5
|
LL | / impl<T> Foo for Box<T> {
LL | | type Ty = bool;
= note: to specialize, `foo` in the parent `impl` must be marked `default`
error[E0520]: `Ty` specializes an item from a parent `impl`, but that item is not marked `default`
- --> $DIR/non-defaulted-item-fail.rs:45:5
+ --> $DIR/non-defaulted-item-fail.rs:46:5
|
LL | impl<T> Foo for Vec<T> {}
| ------------------------- parent `impl` is here
= note: to specialize, `Ty` in the parent `impl` must be marked `default`
error[E0520]: `CONST` specializes an item from a parent `impl`, but that item is not marked `default`
- --> $DIR/non-defaulted-item-fail.rs:47:5
+ --> $DIR/non-defaulted-item-fail.rs:48:5
|
LL | impl<T> Foo for Vec<T> {}
| ------------------------- parent `impl` is here
= note: to specialize, `CONST` in the parent `impl` must be marked `default`
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
- --> $DIR/non-defaulted-item-fail.rs:49:5
+ --> $DIR/non-defaulted-item-fail.rs:50:5
|
LL | impl<T> Foo for Vec<T> {}
| ------------------------- parent `impl` is here
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
-error: aborting due to 6 previous errors
+error: aborting due to 6 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0520`.
// aux-build:go_trait.rs
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
extern crate go_trait;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-allowed-cross-crate.rs:8:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// Test that non-method associated functions can be specialized
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
fn mk() -> Self;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-assoc-fns.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Tests a variety of basic specialization scenarios and method
// dispatch for them.
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-basics.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// aux-build:specialization_cross_crate.rs
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
extern crate specialization_cross_crate;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-cross-crate.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Test that default methods are cascaded correctly
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-default-methods.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Make sure we can't project defaulted associated types
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-default-projection.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0308]: mismatched types
--> $DIR/specialization-default-projection.rs:21:5
|
= help: consider constraining the associated type `<() as Foo>::Assoc` to `()`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
-error: aborting due to 2 previous errors
+error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
// associated type in the impl defining it -- otherwise, what happens
// if it's overridden?
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Example {
type Output;
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-default-types.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0308]: mismatched types
--> $DIR/specialization-default-types.rs:15:9
|
= help: consider constraining the associated type `<T as Example>::Output` to `std::boxed::Box<T>`
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
-error: aborting due to 2 previous errors
+error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Check a number of scenarios in which one impl tries to override another,
// without correctly using `default`.
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-no-default.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
--> $DIR/specialization-no-default.rs:20:5
|
|
= note: to specialize, `redundant` in the parent `impl` must be marked `default`
-error: aborting due to 5 previous errors
+error: aborting due to 5 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0520`.
// run-pass
#![allow(dead_code)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Ensure that specialization works for impls defined directly on a projection
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-on-projection.rs:4:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// Test that you can list the more specific impl before the more general one.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo {
type Out;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-out-of-order.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
#![feature(negative_impls)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait MyTrait {}
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-overlap-negative.rs:2:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0751]: found both positive and negative implementation of trait `std::marker::Send` for type `TestType<_>`:
--> $DIR/specialization-overlap-negative.rs:9:1
|
LL | impl<T: MyTrait> !Send for TestType<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
// projections involve specialization, so long as the associated type is
// provided by the most specialized impl.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Assoc {
type Output;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-overlap-projection.rs:7:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Foo { fn foo() {} }
impl<T: Clone> Foo for T {}
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-overlap.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0119]: conflicting implementations of trait `Foo` for type `std::vec::Vec<_>`:
--> $DIR/specialization-overlap.rs:5:1
|
LL | impl<T: Eq> Qux for T {}
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
-error: aborting due to 4 previous errors
+error: aborting due to 4 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.
#![feature(optin_builtin_traits)]
#![feature(negative_impls)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
auto trait Foo {}
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-polarity.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0751]: found both positive and negative implementation of trait `Foo` for type `u8`:
--> $DIR/specialization-polarity.rs:10:1
|
LL | impl Bar for u8 {}
| ^^^^^^^^^^^^^^^ positive implementation here
-error: aborting due to 2 previous errors
+error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
#![allow(dead_code)]
#![allow(unused_variables)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Regression test for ICE when combining specialized associated types and type
// aliases
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-projection-alias.rs:5:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
#![allow(dead_code)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Make sure we *can* project non-defaulted associated types
// cf compile-fail/specialization-default-projection.rs
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-projection.rs:4:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
// Test that you can specialize via an explicit trait hierarchy
--- /dev/null
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/specialization-super-traits.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Iterator {
fn next(&self);
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-translate-projections-with-lifetimes.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// type parameters *and* rely on projections, and the type parameters are input
// types on the trait.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Trait<T> {
fn convert(&self) -> T;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-translate-projections-with-params.rs:7:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
// Ensure that provided items are inherited properly even when impls vary in
// type parameters *and* rely on projections.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
use std::convert::Into;
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/specialization-translate-projections.rs:6:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
#![feature(negative_impls)]
#![feature(specialization)]
+//~^ WARN the feature `specialization` is incomplete
trait MyTrait {
type Foo;
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/negative-default-impls.rs:2:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0750]: negative impls cannot be default impls
- --> $DIR/negative-default-impls.rs:8:1
+ --> $DIR/negative-default-impls.rs:9:1
|
LL | default impl !MyTrait for u32 {}
| ^^^^^^^ ^
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0750`.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
#![feature(negative_impls)]
// Test a negative impl that "specializes" another negative impl.
--- /dev/null
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/negative-specializes-negative.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
#![feature(negative_impls)]
// Negative impl for u32 cannot "specialize" the base impl.
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/negative-specializes-positive-item.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0751]: found both positive and negative implementation of trait `MyTrait` for type `u32`:
--> $DIR/negative-specializes-positive-item.rs:11:1
|
LL | impl !MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
#![feature(negative_impls)]
// Negative impl for u32 cannot "specialize" the base impl.
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/negative-specializes-positive.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0751]: found both positive and negative implementation of trait `MyTrait` for type `u32`:
--> $DIR/negative-specializes-positive.rs:7:1
|
LL | impl !MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^^ negative implementation here
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
#![feature(negative_impls)]
trait MyTrait {}
+warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
+ --> $DIR/positive-specializes-negative.rs:1:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
error[E0751]: found both positive and negative implementation of trait `MyTrait` for type `u32`:
--> $DIR/positive-specializes-negative.rs:7:1
|
LL | impl MyTrait for u32 {}
| ^^^^^^^^^^^^^^^^^^^^ positive implementation here
-error: aborting due to previous error
+error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0751`.
// run-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
trait Specializable { type Output; }
--- /dev/null
+warning: the feature `specialization` is incomplete and may be unsafe to use and/or cause compiler crashes
+ --> $DIR/transmute-specialization.rs:3:12
+ |
+LL | #![feature(specialization)]
+ | ^^^^^^^^^^^^^^
+ |
+ = note: `#[warn(incomplete_features)]` on by default
+ = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+
+warning: 1 warning emitted
+