]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / feature-gates / feature-gate-type_alias_impl_trait.stderr
index b32cf94985497619f295bf3fd5a5f225831bde26..43fd76ef0ed9fe2e0d6546750d0ab1ffb35ecad1 100644 (file)
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:4:12
+error[E0308]: mismatched types
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:10:9
    |
 LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
+   |            ---------- the expected opaque type
+...
+LL |     Bar(42)
+   |         ^^ expected opaque type, found integer
    |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+   = note: expected opaque type `impl Debug`
+                     found type `{integer}`
 
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:12:16
+error[E0658]: type alias impl trait is not permitted here
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:16:19
    |
-LL |     type Baa = impl Debug;
-   |                ^^^^^^^^^^
+LL |     let x = || -> Foo2 { 42 };
+   |                   ^^^^
    |
    = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
    = 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:23:5
-   |
-LL |     type Assoc = impl Debug;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information
-   = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
+error[E0308]: mismatched types
   --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
    |
-LL |     type Assoc = impl Debug;
-   |                  ^^^^^^^^^^
+LL | type Foo3 = impl Debug;
+   |             ---------- the found opaque type
+...
+LL |     let y: i32 = x;
+   |            ---   ^ expected `i32`, found opaque type
+   |            |
+   |            expected due to this
    |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+   = note:     expected type `i32`
+           found opaque type `impl Debug`
 
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:24
+error[E0308]: mismatched types
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:26:13
    |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                        ^^^^^^^^^^
+LL | type Foo3 = impl Debug;
+   |             ---------- the expected opaque type
+...
+LL |     define3(42)
+   |             ^^ expected opaque type, found integer
    |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+   = note: expected opaque type `impl Debug`
+                     found type `{integer}`
 
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:37
+error[E0658]: type alias impl trait is not permitted here
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:33:12
    |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                                     ^^^^^^^^^^
+LL |     let y: Foo4 = 42;
+   |            ^^^^
    |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = 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:29:49
-   |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+   = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
+   = help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
 
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:70
-   |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                                                                      ^^^^^^^^^^
+error: could not find defining uses
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:5:12
    |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = 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:40:21
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                     ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = 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:40:34
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                                  ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = 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:40:46
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+LL | type Foo = impl Debug;
+   |            ^^^^^^^^^^
 
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:40:67
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                                                                   ^^^^^^^^^^
+error: could not find defining uses
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:19:13
    |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+LL | type Foo3 = impl Debug;
+   |             ^^^^^^^^^^
 
-error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
+error: could not find defining uses
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:29:13
    |
-LL |     type Assoc = impl Debug;
-   |                  ^^^^^^^^^^
+LL | type Foo4 = impl Debug;
+   |             ^^^^^^^^^^
 
-error: aborting due to 13 previous errors
+error: aborting due to 8 previous errors
 
-Some errors have detailed explanations: E0562, E0658.
-For more information about an error, try `rustc --explain E0562`.
+Some errors have detailed explanations: E0308, E0658.
+For more information about an error, try `rustc --explain E0308`.