]> git.lizzy.rs Git - rust.git/commitdiff
warn against 'specialization' feature
authorRalf Jung <post@ralfj.de>
Sun, 17 May 2020 08:22:48 +0000 (10:22 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 16 Jun 2020 07:39:34 +0000 (09:39 +0200)
107 files changed:
src/librustc_feature/active.rs
src/test/ui/associated-types/defaults-specialization.rs
src/test/ui/associated-types/defaults-specialization.stderr
src/test/ui/consts/trait_specialization.rs
src/test/ui/consts/trait_specialization.stderr [new file with mode: 0644]
src/test/ui/impl-trait/equality-rpass.rs
src/test/ui/impl-trait/equality-rpass.stderr [new file with mode: 0644]
src/test/ui/impl-trait/equality.rs
src/test/ui/impl-trait/equality.stderr
src/test/ui/impl-trait/equality2.rs
src/test/ui/impl-trait/equality2.stderr
src/test/ui/overlap-doesnt-conflict-with-specialization.rs
src/test/ui/overlap-doesnt-conflict-with-specialization.stderr [new file with mode: 0644]
src/test/ui/parser/trait-item-with-defaultness-fail-semantic.rs
src/test/ui/parser/trait-item-with-defaultness-fail-semantic.stderr
src/test/ui/specialization/assoc-ty-graph-cycle.rs
src/test/ui/specialization/assoc-ty-graph-cycle.stderr [new file with mode: 0644]
src/test/ui/specialization/cross-crate-defaults.rs
src/test/ui/specialization/cross-crate-defaults.stderr [new file with mode: 0644]
src/test/ui/specialization/defaultimpl/allowed-cross-crate.rs
src/test/ui/specialization/defaultimpl/allowed-cross-crate.stderr [new file with mode: 0644]
src/test/ui/specialization/defaultimpl/out-of-order.rs
src/test/ui/specialization/defaultimpl/out-of-order.stderr [new file with mode: 0644]
src/test/ui/specialization/defaultimpl/overlap-projection.rs
src/test/ui/specialization/defaultimpl/overlap-projection.stderr [new file with mode: 0644]
src/test/ui/specialization/defaultimpl/projection.rs
src/test/ui/specialization/defaultimpl/projection.stderr [new file with mode: 0644]
src/test/ui/specialization/defaultimpl/specialization-no-default.rs
src/test/ui/specialization/defaultimpl/specialization-no-default.stderr
src/test/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.rs
src/test/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.stderr [new file with mode: 0644]
src/test/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.rs
src/test/ui/specialization/defaultimpl/specialization-trait-item-not-implemented.stderr
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.rs
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
src/test/ui/specialization/defaultimpl/specialization-wfcheck.rs
src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr
src/test/ui/specialization/defaultimpl/validation.rs
src/test/ui/specialization/defaultimpl/validation.stderr
src/test/ui/specialization/issue-36804.rs
src/test/ui/specialization/issue-36804.stderr [new file with mode: 0644]
src/test/ui/specialization/issue-39448.rs
src/test/ui/specialization/issue-39448.stderr
src/test/ui/specialization/issue-39618.rs
src/test/ui/specialization/issue-39618.stderr [new file with mode: 0644]
src/test/ui/specialization/issue-50452.rs
src/test/ui/specialization/issue-50452.stderr [new file with mode: 0644]
src/test/ui/specialization/issue-52050.rs
src/test/ui/specialization/issue-52050.stderr
src/test/ui/specialization/issue-63716-parse-async.rs
src/test/ui/specialization/issue-63716-parse-async.stderr [new file with mode: 0644]
src/test/ui/specialization/issue-70442.rs
src/test/ui/specialization/issue-70442.stderr [new file with mode: 0644]
src/test/ui/specialization/non-defaulted-item-fail.rs
src/test/ui/specialization/non-defaulted-item-fail.stderr
src/test/ui/specialization/specialization-allowed-cross-crate.rs
src/test/ui/specialization/specialization-allowed-cross-crate.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-assoc-fns.rs
src/test/ui/specialization/specialization-assoc-fns.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-basics.rs
src/test/ui/specialization/specialization-basics.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-cross-crate.rs
src/test/ui/specialization/specialization-cross-crate.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-default-methods.rs
src/test/ui/specialization/specialization-default-methods.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-default-projection.rs
src/test/ui/specialization/specialization-default-projection.stderr
src/test/ui/specialization/specialization-default-types.rs
src/test/ui/specialization/specialization-default-types.stderr
src/test/ui/specialization/specialization-no-default.rs
src/test/ui/specialization/specialization-no-default.stderr
src/test/ui/specialization/specialization-on-projection.rs
src/test/ui/specialization/specialization-on-projection.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-out-of-order.rs
src/test/ui/specialization/specialization-out-of-order.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-overlap-negative.rs
src/test/ui/specialization/specialization-overlap-negative.stderr
src/test/ui/specialization/specialization-overlap-projection.rs
src/test/ui/specialization/specialization-overlap-projection.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-overlap.rs
src/test/ui/specialization/specialization-overlap.stderr
src/test/ui/specialization/specialization-polarity.rs
src/test/ui/specialization/specialization-polarity.stderr
src/test/ui/specialization/specialization-projection-alias.rs
src/test/ui/specialization/specialization-projection-alias.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-projection.rs
src/test/ui/specialization/specialization-projection.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-super-traits.rs
src/test/ui/specialization/specialization-super-traits.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-translate-projections-with-lifetimes.rs
src/test/ui/specialization/specialization-translate-projections-with-lifetimes.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-translate-projections-with-params.rs
src/test/ui/specialization/specialization-translate-projections-with-params.stderr [new file with mode: 0644]
src/test/ui/specialization/specialization-translate-projections.rs
src/test/ui/specialization/specialization-translate-projections.stderr [new file with mode: 0644]
src/test/ui/traits/negative-impls/negative-default-impls.rs
src/test/ui/traits/negative-impls/negative-default-impls.stderr
src/test/ui/traits/negative-impls/negative-specializes-negative.rs
src/test/ui/traits/negative-impls/negative-specializes-negative.stderr [new file with mode: 0644]
src/test/ui/traits/negative-impls/negative-specializes-positive-item.rs
src/test/ui/traits/negative-impls/negative-specializes-positive-item.stderr
src/test/ui/traits/negative-impls/negative-specializes-positive.rs
src/test/ui/traits/negative-impls/negative-specializes-positive.stderr
src/test/ui/traits/negative-impls/positive-specializes-negative.rs
src/test/ui/traits/negative-impls/positive-specializes-negative.stderr
src/test/ui/transmute-specialization.rs
src/test/ui/transmute-specialization.stderr [new file with mode: 0644]

index d186f35a12b5a1f9566ea39b2aa4e05a532af4d0..7aadf58243f31574d9f4ae0c78a6e90590df79cb 100644 (file)
@@ -596,4 +596,5 @@ pub fn set(&self, features: &mut Features, span: Span) {
     sym::raw_dylib,
     sym::const_trait_impl,
     sym::const_trait_bound_opt_out,
+    sym::specialization,
 ];
index d0ed718b839230c6465a6057f86b090fc29ec179..553705b2a4fab39c944dbae4802093ac3439ff66 100644 (file)
@@ -1,6 +1,7 @@
 //! 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;
index 37a4d9b60fdfdc48beab55a685755c2494406f4a..d71b8045352677ad136b80a067dc099cae4af5d4 100644 (file)
@@ -1,5 +1,14 @@
+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
@@ -11,7 +20,7 @@ LL |     fn make() -> u8 { 0 }
               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
@@ -26,7 +35,7 @@ LL |     fn make() -> bool { true }
               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
@@ -40,7 +49,7 @@ LL |         0u8
                          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`
@@ -53,7 +62,7 @@ LL |     fn make() -> Self::Ty { 0u8 }
    = 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
@@ -67,7 +76,7 @@ LL |     fn make() -> Self::Ty { true }
                          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`
@@ -77,13 +86,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: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`
@@ -93,13 +102,13 @@ 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: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`
@@ -109,13 +118,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: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`
@@ -125,12 +134,12 @@ 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: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`.
index 8010d2fe1aee933983eb901a15c14c686385e70a..3adbbb53046340abf7193be415f7eda66ffcad23 100644 (file)
@@ -5,7 +5,7 @@
 // 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 {}
 
diff --git a/src/test/ui/consts/trait_specialization.stderr b/src/test/ui/consts/trait_specialization.stderr
new file mode 100644 (file)
index 0000000..03da7d5
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 05c9e4173b0e4d51d6948f3f37c2bfa8392bff9e..607b4a49661cc6cb8014cbb565f3dd748d860b2e 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Foo: std::fmt::Debug + Eq {}
 
diff --git a/src/test/ui/impl-trait/equality-rpass.stderr b/src/test/ui/impl-trait/equality-rpass.stderr
new file mode 100644 (file)
index 0000000..1abf05d
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 14b0eeb739ae5b0a4359d8e3f832b077388ae5b4..828b5aac896beff3d71fb276d3dc3b0785502dfd 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Foo: Copy + ToString {}
 
index 9178358b60a9c140a8f19870d3ac1f5225898865..628dfb13d4ca8834bc6c32f2ffbbf282a00dce3e 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -24,7 +33,7 @@ LL |         n + sum_to(n - 1)
    |
    = 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`.
index abce8c8c204bd2d8d1f06363883a55565fe0bf7f..2e325867da86ee999dcfd87719630c995a3a2857 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Foo: Copy + ToString {}
 
index 2454c218ffc8ba4e6805dbe60971998f655b97bc..1780931efc5415790de6efab2b5c47be4694e680 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -58,6 +67,6 @@ LL |          x.0);
    = 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`.
index dd09d68367ec3f5037647bcaa97e90c4d1c1d1f5..1e413120a371730bb854e0823c77a9c50e8ac612 100644 (file)
@@ -1,7 +1,7 @@
 // run-pass
 
 #![feature(marker_trait_attr)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 #[marker]
 trait MyMarker {}
diff --git a/src/test/ui/overlap-doesnt-conflict-with-specialization.stderr b/src/test/ui/overlap-doesnt-conflict-with-specialization.stderr
new file mode 100644 (file)
index 0000000..d49e97b
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 09f967f161ede7b2ee5cad3375d6959085292fa5..34aee7f69359ee2c0d63ddd6f77c5c99c1d39c3d 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 fn main() {}
 
index 6bb946d5b647095b518e539efb86c504763d93cb..e8ff93f63237da3e779aecefef2816d9563d0936 100644 (file)
@@ -46,5 +46,14 @@ LL |     default fn f2() {}
    |     |
    |     `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
 
index 54d51492ab3494b6ca0147ff1dca4b216da25fd1..fc39b553a61ac31cef08b8161cd2a66d01c2d859 100644 (file)
@@ -2,7 +2,7 @@
 
 // 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;
diff --git a/src/test/ui/specialization/assoc-ty-graph-cycle.stderr b/src/test/ui/specialization/assoc-ty-graph-cycle.stderr
new file mode 100644 (file)
index 0000000..a7bd37e
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 79cb6594397214f51400d18b7f3af403ba7749dc..fc28d0c815eb3366dbc62e206e5d0a18aa90b4ef 100644 (file)
@@ -2,7 +2,7 @@
 
 // aux-build:cross_crates_defaults.rs
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 extern crate cross_crates_defaults;
 
diff --git a/src/test/ui/specialization/cross-crate-defaults.stderr b/src/test/ui/specialization/cross-crate-defaults.stderr
new file mode 100644 (file)
index 0000000..6ab4db3
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 15550bcce2a8a95f3e4616b49ea1f25c231fcea9..5d67160eb96ad8f2114c424ee0f778fa535818f8 100644 (file)
@@ -5,7 +5,7 @@
 
 // aux-build:go_trait.rs
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 extern crate go_trait;
 
diff --git a/src/test/ui/specialization/defaultimpl/allowed-cross-crate.stderr b/src/test/ui/specialization/defaultimpl/allowed-cross-crate.stderr
new file mode 100644 (file)
index 0000000..0966de8
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index f9c73a19cfa4665e64f0d83c2de3ecb9ae2dc184..13258ac8c9fe670ba2f39aa6e7e20efe2bcedab4 100644 (file)
@@ -2,7 +2,7 @@
 
 // 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;
diff --git a/src/test/ui/specialization/defaultimpl/out-of-order.stderr b/src/test/ui/specialization/defaultimpl/out-of-order.stderr
new file mode 100644 (file)
index 0000000..2901272
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index ed38bb3fc3a12e36a39f679cf3988443afe17c6b..0add4d5516c7b3433980eb8b0676daeb8213bb3a 100644 (file)
@@ -4,7 +4,7 @@
 // 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;
diff --git a/src/test/ui/specialization/defaultimpl/overlap-projection.stderr b/src/test/ui/specialization/defaultimpl/overlap-projection.stderr
new file mode 100644 (file)
index 0000000..2453009
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 897a7aade2fe1dd9c5c6784f66a2c8f94ffb45bb..4a9140969324dd46b94ae8cc22ef55313e8b844e 100644 (file)
@@ -1,7 +1,7 @@
 // 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
diff --git a/src/test/ui/specialization/defaultimpl/projection.stderr b/src/test/ui/specialization/defaultimpl/projection.stderr
new file mode 100644 (file)
index 0000000..0fd5ba0
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 37005f839d4889225f682689417af88a55fc234d..661724eef8a4386a7edc2de3c191074e9d54a74a 100644 (file)
@@ -1,4 +1,4 @@
-#![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`.
index 13636b28b126c675f5e54eb7ea75b733a3e0310d..6cbaae7edbc79803fd7ee401823a9c5620ec6245 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -65,6 +74,6 @@ LL |       fn redundant(&self) {}
    |
    = 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`.
index 2b8ca6bb1ddbbed1a5ac924ffa7c7ed8b557cd61..89fef5b5ef9692838a27c0756ace6c2a623543ba 100644 (file)
@@ -3,7 +3,7 @@
 // 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;
diff --git a/src/test/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.stderr b/src/test/ui/specialization/defaultimpl/specialization-trait-item-not-implemented-rpass.stderr
new file mode 100644 (file)
index 0000000..dc377dd
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 2a121e61aaa977c7524e25ad7f9d0eaf4a254a9f..3c5414469fac2ef6a5c2146d6c0c3d4cc98faea4 100644 (file)
@@ -1,6 +1,6 @@
 // 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;
index b862a937066d4f2659f86af1b4a3f35212c7aea5..9d1eca1d6af76d4403bdee7ad868b3f2cb34384a 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -7,6 +16,6 @@ LL |     fn foo_two(&self) -> &'static str;
 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`.
index 5c104449fe9c0b4ce69b3a4c7515010f54c3bff9..35e3b8725a82a522ff3ac19e1a812e211a4319f0 100644 (file)
@@ -2,7 +2,7 @@
 // - 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;
index a55d79ee03534ee5746fbb4823ea108c9c52e443..6b8e559bc36343ed23eb191681bcc8c2fd2a019e 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -19,6 +28,6 @@ note: `Foo` defines an item `foo_one`, perhaps you need to implement it
 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`.
index 232338d9d4d99134e6c47ed2c846d62c98de40d2..afd634725e365adfcfe9eeee34096d7fa0cf3d15 100644 (file)
@@ -1,6 +1,6 @@
 // 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> { }
 
index f499c1f5698595e1de2a708386d8d5605265e67a..5eeb07f992ea91413fd372859b33a5b46444df2d 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -12,6 +21,6 @@ help: consider restricting type parameter `U`
 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`.
index 8134333c58f7305bc366d7dd83ed1ae9d78a4ebc..8558a1efb82f3694167495e620a56af2cffafe90 100644 (file)
@@ -1,5 +1,5 @@
 #![feature(negative_impls)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 struct S;
 struct Z;
index 254eaf51a646b8e7a396a9354f11b0d0edb1ea86..0752614674dcde2ade1d472034e903bcb8b968eb 100644 (file)
@@ -8,6 +8,15 @@ LL | default impl S {}
    |
    = 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
    |
@@ -36,6 +45,6 @@ error[E0750]: negative impls cannot be default impls
 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`.
index 9546a5dd5f51699d64f466a3c9c94b2c4198ad2c..89350602f3652bc58710e4c2d8387bb01c3c77ad 100644 (file)
@@ -1,5 +1,5 @@
 // check-pass
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 pub struct Cloned<I>(I);
 
diff --git a/src/test/ui/specialization/issue-36804.stderr b/src/test/ui/specialization/issue-36804.stderr
new file mode 100644 (file)
index 0000000..9be2888
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 8ac6d8e9311fc5a9c079eb314ef9cb556e2b4d4b..9dd47a4a17e434b054255396fa66209ba3e329ce 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 // Regression test for a specialization-related ICE (#39448).
 
index 861a1d9e8fc661a8b13229485435c03c551e02bc..886b2e1e8d450b172fc116146e22d6bcf5bbbc4a 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -7,6 +16,6 @@ LL |     x.foo(y.to()).to()
    = 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`.
index 20e81e4359bacf0e177b28c8971796f4553c31d2..72630ee9c7055c7020511533e4a3b682d37f72aa 100644 (file)
@@ -4,7 +4,7 @@
 
 // check-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Foo {
     fn foo(&self);
diff --git a/src/test/ui/specialization/issue-39618.stderr b/src/test/ui/specialization/issue-39618.stderr
new file mode 100644 (file)
index 0000000..1712b4a
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 93f081d9558199ddd7f55bcc5310d9656e972b8c..29fc12066e8752d4d59d2e620e074fb0de6ed6b9 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 pub trait Foo {
     fn foo();
diff --git a/src/test/ui/specialization/issue-50452.stderr b/src/test/ui/specialization/issue-50452.stderr
new file mode 100644 (file)
index 0000000..efae48d
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 1e1bfe9cf0755cec1035e40bfe117df5e70c7818..8046587020661b57a0ad2f63450a9d9068a3c86b 100644 (file)
@@ -1,4 +1,4 @@
-#![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
index 36f96b011983f0db757362adbeb9d23edc7d15a4..bf95b0a3faa5c6fa04e416cf1ff5825d06cfcea0 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -13,6 +22,6 @@ LL |   impl IntoPyDictPointer for ()
    |
    = 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`.
index c3764ffaab83fd1f74867914e25fb7411d013be6..10f185c335144a198833f417d9f7f214f581947a 100644 (file)
@@ -4,7 +4,7 @@
 // check-pass
 // edition:2018
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 fn main() {}
 
diff --git a/src/test/ui/specialization/issue-63716-parse-async.stderr b/src/test/ui/specialization/issue-63716-parse-async.stderr
new file mode 100644 (file)
index 0000000..4c2bf69
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 4371dd2e16747784fc67047d13384ac5a8cccbe0..d41b5355c2cded91a2db374db9e96214be95a947 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 // check-pass
 
diff --git a/src/test/ui/specialization/issue-70442.stderr b/src/test/ui/specialization/issue-70442.stderr
new file mode 100644 (file)
index 0000000..1f846cc
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 403f718d7dd9fbf8350a772ebd46b8ba91faace6..b7d6ac829dd1482115632309389b38940af10805 100644 (file)
@@ -1,4 +1,5 @@
 #![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.
index e6c5fc1441b2f4a934fb5644bcb0727a31b11d04..084266205b63774da1c3d894f728f90262ad7228 100644 (file)
@@ -1,5 +1,14 @@
+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;
@@ -14,7 +23,7 @@ LL |       type Ty = Vec<()>;
    = 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;
@@ -29,7 +38,7 @@ LL |       const CONST: u8 = 42;
    = 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;
@@ -44,7 +53,7 @@ LL |       fn foo(&self) -> bool { true }
    = 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
@@ -55,7 +64,7 @@ LL |     type Ty = Vec<()>;
    = 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
@@ -66,7 +75,7 @@ LL |     const CONST: u8 = 42;
    = 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
@@ -76,6 +85,6 @@ LL |     fn foo(&self) -> bool { true }
    |
    = 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`.
index 15550bcce2a8a95f3e4616b49ea1f25c231fcea9..5d67160eb96ad8f2114c424ee0f778fa535818f8 100644 (file)
@@ -5,7 +5,7 @@
 
 // aux-build:go_trait.rs
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 extern crate go_trait;
 
diff --git a/src/test/ui/specialization/specialization-allowed-cross-crate.stderr b/src/test/ui/specialization/specialization-allowed-cross-crate.stderr
new file mode 100644 (file)
index 0000000..734e90b
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index b6a7a48972ac2691714c1fb161993c1f5daf22b4..cbfcb4719f6a495e14ecd30121eaf1b11473fafa 100644 (file)
@@ -2,7 +2,7 @@
 
 // Test that non-method associated functions can be specialized
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Foo {
     fn mk() -> Self;
diff --git a/src/test/ui/specialization/specialization-assoc-fns.stderr b/src/test/ui/specialization/specialization-assoc-fns.stderr
new file mode 100644 (file)
index 0000000..1ad3ea8
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 6c359e51bc2e49c23a21b582911fc24a99a5cff8..721c934dbfab96cbb06b2a63cb0260c2db581cc0 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 // Tests a variety of basic specialization scenarios and method
 // dispatch for them.
diff --git a/src/test/ui/specialization/specialization-basics.stderr b/src/test/ui/specialization/specialization-basics.stderr
new file mode 100644 (file)
index 0000000..37b586f
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index fa63c86632985ae3c37e90dd67a0f6d6fc25c779..4171505aa374c7d1066450bf9c73fb27789d08de 100644 (file)
@@ -2,7 +2,7 @@
 
 // aux-build:specialization_cross_crate.rs
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 extern crate specialization_cross_crate;
 
diff --git a/src/test/ui/specialization/specialization-cross-crate.stderr b/src/test/ui/specialization/specialization-cross-crate.stderr
new file mode 100644 (file)
index 0000000..fd853db
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 9ae3d1e9f3931cb58b3dd1f0e595a1a306903b4c..dcf68afa945bf2ff83408a44447e61e702c5aca5 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 // Test that default methods are cascaded correctly
 
diff --git a/src/test/ui/specialization/specialization-default-methods.stderr b/src/test/ui/specialization/specialization-default-methods.stderr
new file mode 100644 (file)
index 0000000..4e069e8
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index e9343f2360170fc1282fb581459e890d35217dc9..7f3ae951287ca3daf1aab119c55a6b2409497764 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 // Make sure we can't project defaulted associated types
 
index ac15ab0681a028c7ce328ca2ba041bf6e502137b..695102a18787e89f1039e0de984cf95bec1a6da1 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -28,6 +37,6 @@ LL |     generic::<()>()
    = 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`.
index acb86d889d43c0c8f533c820435ce769ee0be101..346471f11e4a8d5c7c34ecac81502da8d70392a2 100644 (file)
@@ -2,7 +2,7 @@
 // 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;
index 7233387eba1fabcdeba657c874762056c91af620..7fe2366f7814ecd25ee3a2b3de1ccd7be0dd314c 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -24,6 +33,6 @@ LL |     Example::generate(t)
    = 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`.
index 57346b26d24ec2d8e85544aee516d8261e75dd1d..ae739b2358d5869074269f32e064e4a68e6c90fe 100644 (file)
@@ -1,4 +1,4 @@
-#![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`.
index 992e9abbd4ce2e4db90a339393e1dc94e95bf2b9..0222cba2ba657f53b63d6403eb1e644301ee48ff 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -65,6 +74,6 @@ LL |       default fn redundant(&self) {}
    |
    = 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`.
index 5606eaea3073dfb23dcecc911d725a89f6757e6c..be8dcc4232e7b7c96aad6fdf8866be7d4665c05a 100644 (file)
@@ -1,7 +1,7 @@
 // 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
 
diff --git a/src/test/ui/specialization/specialization-on-projection.stderr b/src/test/ui/specialization/specialization-on-projection.stderr
new file mode 100644 (file)
index 0000000..173f9ee
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 94e764f76366ee86bcd7c899f60122643682c067..cb7563e2760c2d4cc1f0162571cc1ca8668f0bcb 100644 (file)
@@ -2,7 +2,7 @@
 
 // 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;
diff --git a/src/test/ui/specialization/specialization-out-of-order.stderr b/src/test/ui/specialization/specialization-out-of-order.stderr
new file mode 100644 (file)
index 0000000..27d5d85
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 90dbef3075b7f54f8e3e4fdf7f7b718e8542c54f..550d37082953990ee21f23d69f4fba62f5ff9fa6 100644 (file)
@@ -1,5 +1,5 @@
 #![feature(negative_impls)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait MyTrait {}
 
index e2616534d20412679359a1147a8a2f52500c16af..a28f961c03c6896b7e9de77041df6ec9b281e4fe 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -6,6 +15,6 @@ LL | unsafe impl<T: Clone> Send for TestType<T> {}
 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`.
index 00b83c7e7a1b8eddd7d2328677901477c2973f55..b07efb2a5c1cdd631c3d664f70e83f31a1383f36 100644 (file)
@@ -4,7 +4,7 @@
 // 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;
diff --git a/src/test/ui/specialization/specialization-overlap-projection.stderr b/src/test/ui/specialization/specialization-overlap-projection.stderr
new file mode 100644 (file)
index 0000000..10952ed
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index c8ef8d61c1e8f0ebc0ab4ceb70815b883b31d2a4..6bee22ceb8b645a2c923941cc2fe09b1edbb478a 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Foo { fn foo() {} }
 impl<T: Clone> Foo for T {}
index 4275e7bdd85e27a2ca7f89b999d0e9b70852d94e..7cc865b62adee314134d9d581e0cb8b18bffbdc0 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -30,6 +39,6 @@ LL | impl<T: Clone> Qux for T {}
 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`.
index e78035f171075c5016a8a525ee4dc907325fe5d3..17897d8b803d9a967ed33c674e93e7f9a172dd53 100644 (file)
@@ -2,7 +2,7 @@
 
 #![feature(optin_builtin_traits)]
 #![feature(negative_impls)]
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 auto trait Foo {}
 
index 44e60cad67aa4b3fe8f1af5430be8871aa066cc6..7d269fe32939757196e8db1f3b0eca9d0595ff1b 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -14,6 +23,6 @@ LL | impl<T> !Bar for T {}
 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`.
index 0081ed455c96044b546e4d5891b042eceaaf08ed..f1f0b47bb65036e223f36029b2184e1196a5b120 100644 (file)
@@ -2,7 +2,7 @@
 #![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
diff --git a/src/test/ui/specialization/specialization-projection-alias.stderr b/src/test/ui/specialization/specialization-projection-alias.stderr
new file mode 100644 (file)
index 0000000..385c4e2
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 86cdccf131e223a0a1db1b0ef0cfbf01477223e6..700975e3b828f3e1ab739360f9610e67569ac584 100644 (file)
@@ -1,7 +1,7 @@
 // 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
diff --git a/src/test/ui/specialization/specialization-projection.stderr b/src/test/ui/specialization/specialization-projection.stderr
new file mode 100644 (file)
index 0000000..ef676d2
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index a0f71d876931ed5291134d2513aaab69d825e5b6..fb85d8019218a7b551f15661cfc788538584ab01 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 // Test that you can specialize via an explicit trait hierarchy
 
diff --git a/src/test/ui/specialization/specialization-super-traits.stderr b/src/test/ui/specialization/specialization-super-traits.stderr
new file mode 100644 (file)
index 0000000..05bdfd4
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 2e32e3ff02d3e7c3ab75294037259af56466b9b4..5c2781a9c63a6eb4267ed4bb53f5d0dfb874f1ac 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Iterator {
     fn next(&self);
diff --git a/src/test/ui/specialization/specialization-translate-projections-with-lifetimes.stderr b/src/test/ui/specialization/specialization-translate-projections-with-lifetimes.stderr
new file mode 100644 (file)
index 0000000..3fc6f35
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index bdc6501df44b84e99a82bd4f875dfc481f6a3240..62d63590a6688e238923122058c70780eee462b4 100644 (file)
@@ -4,7 +4,7 @@
 // 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;
diff --git a/src/test/ui/specialization/specialization-translate-projections-with-params.stderr b/src/test/ui/specialization/specialization-translate-projections-with-params.stderr
new file mode 100644 (file)
index 0000000..58ac70a
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index fcccb67902e58a92b95e1e86bfc369df809b404c..92ea9e2b85d3256830ed2a384350a743e1f7c549 100644 (file)
@@ -3,7 +3,7 @@
 // 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;
 
diff --git a/src/test/ui/specialization/specialization-translate-projections.stderr b/src/test/ui/specialization/specialization-translate-projections.stderr
new file mode 100644 (file)
index 0000000..8d5156d
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index 2d50bc83ec304f2a1847298744ca511f5f462bf3..c68bca432fa8667e7b5777dacc4959284f44b719 100644 (file)
@@ -1,5 +1,6 @@
 #![feature(negative_impls)]
 #![feature(specialization)]
+//~^ WARN the feature `specialization` is incomplete
 
 trait MyTrait {
     type Foo;
index a70bbe6b948d1ce1ac5079523e7fff352e619fb1..50e74373b53bbd4c867a8fd16aa49e47123ea5c5 100644 (file)
@@ -1,9 +1,18 @@
+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`.
index 877c3e8af4f1ae617215c78e0ecf88b1e2e0136f..35297ab124ed06f44381764f7ca535ac608bd1fd 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 #![feature(negative_impls)]
 
 // Test a negative impl that "specializes" another negative impl.
diff --git a/src/test/ui/traits/negative-impls/negative-specializes-negative.stderr b/src/test/ui/traits/negative-impls/negative-specializes-negative.stderr
new file mode 100644 (file)
index 0000000..8b536de
--- /dev/null
@@ -0,0 +1,11 @@
+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
+
index da22e43377f52a1ec51e17a4402726a14f8f7f2f..4281eedaf631c9173ac175c84d5d44cfd04486eb 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 #![feature(negative_impls)]
 
 // Negative impl for u32 cannot "specialize" the base impl.
index 079546a7df40b8816e96fa6c39f2ed943d117d37..89ef15e89ac96a177a06ddff4ea54b3c835ec453 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -7,6 +16,6 @@ LL | impl<T> MyTrait for T {
 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`.
index 1939a098b50ee08aa8d892f7e38cc5459b486a49..0e227691e0404e20186f2627ab651ba055215b6f 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 #![feature(negative_impls)]
 
 // Negative impl for u32 cannot "specialize" the base impl.
index ea005c1cbe0c69dab2a0a017b0464c757d32e193..e45d5a251ab263b0bcad9c2b255718b45a4d310d 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -6,6 +15,6 @@ LL | impl<T> MyTrait for T {}
 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`.
index f2c5f507a4ebbd5fcf5126b97589fdd05e893fd8..a06b357654068b2604fca2540ff841b3a7e38f74 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 #![feature(negative_impls)]
 
 trait MyTrait {}
index a24d7aa442f4ab97326a87a2ae287e26adffd323..49c16d474040e81102a085d941e5cbb25b382230 100644 (file)
@@ -1,3 +1,12 @@
+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
    |
@@ -6,6 +15,6 @@ LL | impl<T> !MyTrait for T {}
 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`.
index 002fba9ce810131711b900581d2b2ef68238397c..499334d983b1f1b38965c06be88b0cca8dac5279 100644 (file)
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(specialization)]
+#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
 
 trait Specializable { type Output; }
 
diff --git a/src/test/ui/transmute-specialization.stderr b/src/test/ui/transmute-specialization.stderr
new file mode 100644 (file)
index 0000000..9158e31
--- /dev/null
@@ -0,0 +1,11 @@
+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
+