Skip to content

Commit

Permalink
Add test for #69415
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed May 23, 2020
1 parent 7f940ef commit 58fe05a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
@@ -1,3 +1,6 @@
// compile-flags: -Zsave-analysis
// This is also a regression test for #69415 and the above flag is needed.

#![feature(untagged_unions)]

trait Tr1 { type As1: Copy; }
Expand Down
@@ -1,5 +1,5 @@
error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:12:22
--> $DIR/feature-gate-associated_type_bounds.rs:15:22
|
LL | type A: Iterator<Item: Copy>;
| ^^^^^^^^^^
Expand All @@ -8,7 +8,7 @@ LL | type A: Iterator<Item: Copy>;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:15:22
--> $DIR/feature-gate-associated_type_bounds.rs:18:22
|
LL | type B: Iterator<Item: 'static>;
| ^^^^^^^^^^^^^
Expand All @@ -17,7 +17,7 @@ LL | type B: Iterator<Item: 'static>;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:19:20
--> $DIR/feature-gate-associated_type_bounds.rs:22:20
|
LL | struct _St1<T: Tr1<As1: Tr2>> {
| ^^^^^^^^
Expand All @@ -26,7 +26,7 @@ LL | struct _St1<T: Tr1<As1: Tr2>> {
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:26:18
--> $DIR/feature-gate-associated_type_bounds.rs:29:18
|
LL | enum _En1<T: Tr1<As1: Tr2>> {
| ^^^^^^^^
Expand All @@ -35,7 +35,7 @@ LL | enum _En1<T: Tr1<As1: Tr2>> {
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:33:19
--> $DIR/feature-gate-associated_type_bounds.rs:36:19
|
LL | union _Un1<T: Tr1<As1: Tr2>> {
| ^^^^^^^^
Expand All @@ -44,7 +44,7 @@ LL | union _Un1<T: Tr1<As1: Tr2>> {
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:40:37
--> $DIR/feature-gate-associated_type_bounds.rs:43:37
|
LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
| ^^^^^^^^^^
Expand All @@ -53,7 +53,7 @@ LL | type _TaWhere1<T> where T: Iterator<Item: Copy> = T;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:43:22
--> $DIR/feature-gate-associated_type_bounds.rs:46:22
|
LL | fn _apit(_: impl Tr1<As1: Copy>) {}
| ^^^^^^^^^
Expand All @@ -62,7 +62,7 @@ LL | fn _apit(_: impl Tr1<As1: Copy>) {}
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:45:26
--> $DIR/feature-gate-associated_type_bounds.rs:48:26
|
LL | fn _apit_dyn(_: &dyn Tr1<As1: Copy>) {}
| ^^^^^^^^^
Expand All @@ -71,7 +71,7 @@ LL | fn _apit_dyn(_: &dyn Tr1<As1: Copy>) {}
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:48:24
--> $DIR/feature-gate-associated_type_bounds.rs:51:24
|
LL | fn _rpit() -> impl Tr1<As1: Copy> { S1 }
| ^^^^^^^^^
Expand All @@ -80,7 +80,7 @@ LL | fn _rpit() -> impl Tr1<As1: Copy> { S1 }
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:51:31
--> $DIR/feature-gate-associated_type_bounds.rs:54:31
|
LL | fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
| ^^^^^^^^^
Expand All @@ -89,7 +89,7 @@ LL | fn _rpit_dyn() -> Box<dyn Tr1<As1: Copy>> { Box::new(S1) }
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:54:23
--> $DIR/feature-gate-associated_type_bounds.rs:57:23
|
LL | const _cdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^
Expand All @@ -98,7 +98,7 @@ LL | const _cdef: impl Tr1<As1: Copy> = S1;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:60:24
--> $DIR/feature-gate-associated_type_bounds.rs:63:24
|
LL | static _sdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^
Expand All @@ -107,7 +107,7 @@ LL | static _sdef: impl Tr1<As1: Copy> = S1;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0658]: associated type bounds are unstable
--> $DIR/feature-gate-associated_type_bounds.rs:67:21
--> $DIR/feature-gate-associated_type_bounds.rs:70:21
|
LL | let _: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^
Expand All @@ -116,23 +116,23 @@ LL | let _: impl Tr1<As1: Copy> = S1;
= help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable

error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
--> $DIR/feature-gate-associated_type_bounds.rs:54:14
--> $DIR/feature-gate-associated_type_bounds.rs:57:14
|
LL | const _cdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^^^^^^^^^^^
|
= 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/feature-gate-associated_type_bounds.rs:60:15
--> $DIR/feature-gate-associated_type_bounds.rs:63:15
|
LL | static _sdef: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^^^^^^^^^^^
|
= 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/feature-gate-associated_type_bounds.rs:67:12
--> $DIR/feature-gate-associated_type_bounds.rs:70:12
|
LL | let _: impl Tr1<As1: Copy> = S1;
| ^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit 58fe05a

Please sign in to comment.