diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2020-01-09 05:56:38 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2020-03-26 06:52:55 -0400 |
| commit | fda3378e3fcf279a19409ef368ce9bd5b57bfd62 (patch) | |
| tree | 7fb3ae6e92d79b4c068d1e6f0d1d2dc45de49733 /src/test/ui/parser | |
| parent | 65071708f8fe72dd2103c6eace0eb6802a6acf03 (diff) | |
| download | rust-fda3378e3fcf279a19409ef368ce9bd5b57bfd62.tar.gz rust-fda3378e3fcf279a19409ef368ce9bd5b57bfd62.zip | |
introduce `negative_impls` feature gate and document
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/trait-object-bad-parens.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-object-bad-parens.stderr | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/test/ui/parser/trait-object-bad-parens.rs b/src/test/ui/parser/trait-object-bad-parens.rs index 048e028be1c..0a2836d691f 100644 --- a/src/test/ui/parser/trait-object-bad-parens.rs +++ b/src/test/ui/parser/trait-object-bad-parens.rs @@ -1,4 +1,5 @@ #![feature(optin_builtin_traits)] +#![feature(negative_impls)] #![allow(bare_trait_objects)] auto trait Auto {} diff --git a/src/test/ui/parser/trait-object-bad-parens.stderr b/src/test/ui/parser/trait-object-bad-parens.stderr index f53afdff5e7..74e484eebee 100644 --- a/src/test/ui/parser/trait-object-bad-parens.stderr +++ b/src/test/ui/parser/trait-object-bad-parens.stderr @@ -1,23 +1,23 @@ error[E0178]: expected a path on the left-hand side of `+`, not `((Auto))` - --> $DIR/trait-object-bad-parens.rs:7:16 + --> $DIR/trait-object-bad-parens.rs:8:16 | LL | let _: Box<((Auto)) + Auto>; | ^^^^^^^^^^^^^^^ expected a path error[E0178]: expected a path on the left-hand side of `+`, not `(Auto + Auto)` - --> $DIR/trait-object-bad-parens.rs:9:16 + --> $DIR/trait-object-bad-parens.rs:10:16 | LL | let _: Box<(Auto + Auto) + Auto>; | ^^^^^^^^^^^^^^^^^^^^ expected a path error[E0178]: expected a path on the left-hand side of `+`, not `(Auto)` - --> $DIR/trait-object-bad-parens.rs:11:16 + --> $DIR/trait-object-bad-parens.rs:12:16 | LL | let _: Box<(Auto +) + Auto>; | ^^^^^^^^^^^^^^^ expected a path error[E0178]: expected a path on the left-hand side of `+`, not `(dyn Auto)` - --> $DIR/trait-object-bad-parens.rs:13:16 + --> $DIR/trait-object-bad-parens.rs:14:16 | LL | let _: Box<(dyn Auto) + Auto>; | ^^^^^^^^^^^^^^^^^ expected a path |
