Unify assoc item visitors more.

This commit is contained in:
Mazdak Farrokhzad 2019-12-02 02:03:31 +01:00
parent 51ccdebe0b
commit b499a88dfc
12 changed files with 56 additions and 53 deletions

View file

@ -16,15 +16,6 @@ LL | type Baa = impl Debug;
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-type_alias_impl_trait.rs:18:18
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: associated type defaults are unstable
--> $DIR/feature-gate-type_alias_impl_trait.rs:18:5
|
@ -34,6 +25,15 @@ LL | type Assoc = impl Debug;
= note: for more information, see https://github.com/rust-lang/rust/issues/29661
= help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-type_alias_impl_trait.rs:18:18
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-type_alias_impl_trait.rs:24:24
|

View file

@ -1,3 +1,5 @@
#![feature(specialization)]
fn main() {}
trait X {

View file

@ -1,35 +1,35 @@
error: `default` is only allowed on items in `impl` definitions
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:4:5
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:6:5
|
LL | default const A: u8;
| ^^^^^^^^^^^^^^^^^^^^
error: `default` is only allowed on items in `impl` definitions
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:5:5
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:7:5
|
LL | default const B: u8 = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: `default` is only allowed on items in `impl` definitions
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:6:5
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:8:5
|
LL | default type D;
| ^^^^^^^^^^^^^^^
error: `default` is only allowed on items in `impl` definitions
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:7:5
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:9:5
|
LL | default type C: Ord;
| ^^^^^^^^^^^^^^^^^^^^
error: `default` is only allowed on items in `impl` definitions
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:8:5
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:10:5
|
LL | default fn f1();
| ^^^^^^^^^^^^^^^^
error: `default` is only allowed on items in `impl` definitions
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:9:5
--> $DIR/trait-item-with-defaultness-fail-semantic.rs:11:5
|
LL | default fn f2() {}
| ^^^^^^^^^^^^^^^^^^