diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2018-03-25 22:40:13 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2018-03-25 22:40:13 +0100 |
| commit | d9cd6c6e8edfa43527c100fdfd619cc9d1378aea (patch) | |
| tree | 78916d65a23c263f9a19405bf8533d9a83a4a121 /src/test | |
| parent | 482a913fb337855072a53c0d602cd19947f45285 (diff) | |
| download | rust-d9cd6c6e8edfa43527c100fdfd619cc9d1378aea.tar.gz rust-d9cd6c6e8edfa43527c100fdfd619cc9d1378aea.zip | |
Feature gate where clauses on associated types
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/feature-gate-generic_associated_types.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/feature-gate-generic_associated_types.stderr | 22 |
2 files changed, 26 insertions, 3 deletions
diff --git a/src/test/ui/feature-gate-generic_associated_types.rs b/src/test/ui/feature-gate-generic_associated_types.rs index 724ec2496f2..34706626866 100644 --- a/src/test/ui/feature-gate-generic_associated_types.rs +++ b/src/test/ui/feature-gate-generic_associated_types.rs @@ -15,6 +15,7 @@ trait PointerFamily<U> { //~^ ERROR generic associated types are unstable type Pointer2<T>: Deref<Target = T> where T: Clone, U: Clone; //~^ ERROR generic associated types are unstable + //~| ERROR where clauses on associated types are unstable } struct Foo; @@ -25,4 +26,10 @@ impl PointerFamily<u32> for Foo { //~^ ERROR generic associated types are unstable } +trait Bar { + type Assoc where Self: Sized; + //~^ ERROR where clauses on associated types are unstable +} + + fn main() {} diff --git a/src/test/ui/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gate-generic_associated_types.stderr index 5f23def88eb..d7891f13c6b 100644 --- a/src/test/ui/feature-gate-generic_associated_types.stderr +++ b/src/test/ui/feature-gate-generic_associated_types.stderr @@ -14,8 +14,16 @@ LL | type Pointer2<T>: Deref<Target = T> where T: Clone, U: Clone; | = help: add #![feature(generic_associated_types)] to the crate attributes to enable +error[E0658]: where clauses on associated types are unstable (see issue #44265) + --> $DIR/feature-gate-generic_associated_types.rs:16:5 + | +LL | type Pointer2<T>: Deref<Target = T> where T: Clone, U: Clone; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + error[E0658]: generic associated types are unstable (see issue #44265) - --> $DIR/feature-gate-generic_associated_types.rs:22:5 + --> $DIR/feature-gate-generic_associated_types.rs:23:5 | LL | type Pointer<usize> = Box<usize>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,13 +31,21 @@ LL | type Pointer<usize> = Box<usize>; = help: add #![feature(generic_associated_types)] to the crate attributes to enable error[E0658]: generic associated types are unstable (see issue #44265) - --> $DIR/feature-gate-generic_associated_types.rs:24:5 + --> $DIR/feature-gate-generic_associated_types.rs:25:5 | LL | type Pointer2<u32> = Box<u32>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(generic_associated_types)] to the crate attributes to enable -error: aborting due to 4 previous errors +error[E0658]: where clauses on associated types are unstable (see issue #44265) + --> $DIR/feature-gate-generic_associated_types.rs:30:5 + | +LL | type Assoc where Self: Sized; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0658`. |
