diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-07 20:12:34 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-14 14:00:16 +0100 |
| commit | 03cf0d737f075aa8839dd7cc5b1047910ec00ddf (patch) | |
| tree | b6abd96cb12c9491ded84aec030c4931cfea186a /src/test/ui/impl-trait | |
| parent | 8b663ec16fa94e4a1dea618e235c827059136dc4 (diff) | |
| download | rust-03cf0d737f075aa8839dd7cc5b1047910ec00ddf.tar.gz rust-03cf0d737f075aa8839dd7cc5b1047910ec00ddf.zip | |
TAIT: adjust tests
Diffstat (limited to 'src/test/ui/impl-trait')
| -rw-r--r-- | src/test/ui/impl-trait/where-allowed.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/impl-trait/where-allowed.stderr | 41 |
2 files changed, 26 insertions, 16 deletions
diff --git a/src/test/ui/impl-trait/where-allowed.rs b/src/test/ui/impl-trait/where-allowed.rs index 65c4b78bf6a..5ab74e02e0e 100644 --- a/src/test/ui/impl-trait/where-allowed.rs +++ b/src/test/ui/impl-trait/where-allowed.rs @@ -163,6 +163,7 @@ type InTypeAlias<R> = impl Debug; type InReturnInTypeAlias<R> = fn() -> impl Debug; //~^ ERROR `impl Trait` not allowed outside of function and inherent method return types +//~| ERROR `impl Trait` in type aliases is unstable // Disallowed in impl headers impl PartialEq<impl Debug> for () { diff --git a/src/test/ui/impl-trait/where-allowed.stderr b/src/test/ui/impl-trait/where-allowed.stderr index b01095f15a9..fcd4c357afd 100644 --- a/src/test/ui/impl-trait/where-allowed.stderr +++ b/src/test/ui/impl-trait/where-allowed.stderr @@ -17,19 +17,28 @@ LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic | outer `impl Trait` error[E0658]: `impl Trait` in type aliases is unstable - --> $DIR/where-allowed.rs:124:5 + --> $DIR/where-allowed.rs:124:16 | LL | type Out = 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/where-allowed.rs:160:1 + --> $DIR/where-allowed.rs:160:23 | LL | type InTypeAlias<R> = 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/where-allowed.rs:164:39 + | +LL | type InReturnInTypeAlias<R> = fn() -> 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 @@ -179,61 +188,61 @@ LL | type InReturnInTypeAlias<R> = fn() -> impl Debug; | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:168:16 + --> $DIR/where-allowed.rs:169:16 | LL | impl PartialEq<impl Debug> for () { | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:173:24 + --> $DIR/where-allowed.rs:174:24 | LL | impl PartialEq<()> for impl Debug { | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:178:6 + --> $DIR/where-allowed.rs:179:6 | LL | impl impl Debug { | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:184:24 + --> $DIR/where-allowed.rs:185:24 | LL | impl InInherentImplAdt<impl Debug> { | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:190:11 + --> $DIR/where-allowed.rs:191:11 | LL | where impl Debug: Debug | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:197:15 + --> $DIR/where-allowed.rs:198:15 | LL | where Vec<impl Debug>: Debug | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:204:24 + --> $DIR/where-allowed.rs:205:24 | LL | where T: PartialEq<impl Debug> | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:211:17 + --> $DIR/where-allowed.rs:212:17 | LL | where T: Fn(impl Debug) | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:218:22 + --> $DIR/where-allowed.rs:219:22 | LL | where T: Fn() -> impl Debug | ^^^^^^^^^^ error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:224:29 + --> $DIR/where-allowed.rs:225:29 | LL | let _in_local_variable: impl Fn() = || {}; | ^^^^^^^^^ @@ -241,7 +250,7 @@ LL | let _in_local_variable: impl Fn() = || {}; = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable error[E0562]: `impl Trait` not allowed outside of function and inherent method return types - --> $DIR/where-allowed.rs:226:46 + --> $DIR/where-allowed.rs:227:46 | LL | let _in_return_in_local_variable = || -> impl Fn() { || {} }; | ^^^^^^^^^ @@ -270,7 +279,7 @@ error: could not find defining uses LL | type Out = impl Debug; | ^^^^^^^^^^^^^^^^^^^^^^ -error: aborting due to 43 previous errors +error: aborting due to 44 previous errors Some errors have detailed explanations: E0282, E0562, E0658, E0666. For more information about an error, try `rustc --explain E0282`. |
