diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2016-06-11 18:47:47 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2016-07-08 12:42:57 +0300 |
| commit | 2cdd9f1c97652ee799f6bb0af7c063115ff368ea (patch) | |
| tree | 5cae86f91ec97f62e2a20eab2216e76bb887901b /src/test/compile-fail | |
| parent | eb32440d4566346294cf2f10592d9657918245d1 (diff) | |
| download | rust-2cdd9f1c97652ee799f6bb0af7c063115ff368ea.tar.gz rust-2cdd9f1c97652ee799f6bb0af7c063115ff368ea.zip | |
Rewrite check_pat_enum, split it into check_pat_tuple_struct and check_pat_path
Update definitions in def_map for associated types written in unqualified form (like `Self::Output`) Cleanup finish_resolving_def_to_ty/resolve_ty_and_def_ufcs Make VariantDef's available through constructor IDs
Diffstat (limited to 'src/test/compile-fail')
6 files changed, 13 insertions, 7 deletions
diff --git a/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs b/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs index c5557cee7cc..9404803a32d 100644 --- a/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs +++ b/src/test/compile-fail/associated-types/cache/project-fn-ret-contravariant.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![feature(fn_traits)] #![feature(unboxed_closures)] #![feature(rustc_attrs)] diff --git a/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs b/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs index a15422e42d9..99568213d99 100644 --- a/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs +++ b/src/test/compile-fail/associated-types/cache/project-fn-ret-invariant.rs @@ -18,6 +18,7 @@ // revisions: ok oneuse transmute krisskross +#![feature(fn_traits)] #![allow(dead_code, unused_variables)] use std::marker::PhantomData; diff --git a/src/test/compile-fail/empty-struct-braces-pat-1.rs b/src/test/compile-fail/empty-struct-braces-pat-1.rs index a5c740d9f63..74546152ca9 100644 --- a/src/test/compile-fail/empty-struct-braces-pat-1.rs +++ b/src/test/compile-fail/empty-struct-braces-pat-1.rs @@ -31,12 +31,14 @@ fn main() { Empty1 => () // Not an error, `Empty1` is interpreted as a new binding } match e3 { - E::Empty3 => () //~ ERROR `E::Empty3` does not name a tuple variant or a tuple struct + E::Empty3 => () + //~^ ERROR `E::Empty3` does not name a unit variant, unit struct or a constant } match xe1 { XEmpty1 => () // Not an error, `XEmpty1` is interpreted as a new binding } match xe3 { - XE::XEmpty3 => () //~ ERROR `XE::XEmpty3` does not name a tuple variant or a tuple struct + XE::XEmpty3 => () + //~^ ERROR `XE::XEmpty3` does not name a unit variant, unit struct or a constant } } diff --git a/src/test/compile-fail/issue-32004.rs b/src/test/compile-fail/issue-32004.rs index 8d74154655f..576451f7292 100644 --- a/src/test/compile-fail/issue-32004.rs +++ b/src/test/compile-fail/issue-32004.rs @@ -18,7 +18,7 @@ struct S; fn main() { match Foo::Baz { Foo::Bar => {} - //~^ ERROR `Foo::Bar` does not name a tuple variant or a tuple struct + //~^ ERROR `Foo::Bar` does not name a unit variant, unit struct or a constant _ => {} } diff --git a/src/test/compile-fail/method-path-in-pattern.rs b/src/test/compile-fail/method-path-in-pattern.rs index faf6d255c9a..ef011c89c62 100644 --- a/src/test/compile-fail/method-path-in-pattern.rs +++ b/src/test/compile-fail/method-path-in-pattern.rs @@ -22,12 +22,13 @@ impl MyTrait for Foo {} fn main() { match 0u32 { - Foo::bar => {} //~ ERROR E0327 + Foo::bar => {} //~ ERROR `Foo::bar` does not name a unit variant, unit struct or a constant } match 0u32 { - <Foo>::bar => {} //~ ERROR E0327 + <Foo>::bar => {} //~ ERROR `bar` does not name a unit variant, unit struct or a constant } match 0u32 { - <Foo>::trait_bar => {} //~ ERROR E0327 + <Foo>::trait_bar => {} + //~^ ERROR `trait_bar` does not name a unit variant, unit struct or a constant } } diff --git a/src/test/compile-fail/qualified-path-params.rs b/src/test/compile-fail/qualified-path-params.rs index 86873022f0f..9034e24a6fe 100644 --- a/src/test/compile-fail/qualified-path-params.rs +++ b/src/test/compile-fail/qualified-path-params.rs @@ -27,7 +27,8 @@ impl S { fn main() { match 10 { - <S as Tr>::A::f::<u8> => {} //~ ERROR associated items in match patterns must be constants + <S as Tr>::A::f::<u8> => {} + //~^ ERROR `Tr::A::f<u8>` does not name a unit variant, unit struct or a constant 0 ... <S as Tr>::A::f::<u8> => {} //~ ERROR only char and numeric types are allowed in range } } |
