diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-04-24 11:57:22 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-04-24 11:57:22 +1200 |
| commit | a08198ba6f58e33cd8dda6fec74f3ca2d28bbaf9 (patch) | |
| tree | 26a471d8130827535fa02affc6cc68dded22078d /src/test/compile-fail/unsized5.rs | |
| parent | d9103301726a4d91c622f8ae3d2d10ad225a0f65 (diff) | |
| download | rust-a08198ba6f58e33cd8dda6fec74f3ca2d28bbaf9.tar.gz rust-a08198ba6f58e33cd8dda6fec74f3ca2d28bbaf9.zip | |
Prevent unsized types being stored in variables
Closes #13376.
Diffstat (limited to 'src/test/compile-fail/unsized5.rs')
| -rw-r--r-- | src/test/compile-fail/unsized5.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/test/compile-fail/unsized5.rs b/src/test/compile-fail/unsized5.rs index 9608b7e6b20..614b8e3a5ab 100644 --- a/src/test/compile-fail/unsized5.rs +++ b/src/test/compile-fail/unsized5.rs @@ -9,18 +9,7 @@ // except according to those terms. #![feature(struct_variant)] -// Test `type` types not allowed in fields or local variables. - -/*trait T for type {} - -fn f5<type X>(x: &X) { - let _: X; // ERROR local variable with dynamically sized type X - let _: (int, (X, int)); // ERROR local variable with dynamically sized type (int,(X,int)) -} -fn f6<type X: T>(x: &X) { - let _: X; // ERROR local variable with dynamically sized type X - let _: (int, (X, int)); // ERROR local variable with dynamically sized type (int,(X,int)) -}*/ +// Test `type` types not allowed in fields. struct S1<type X> { f1: X, //~ ERROR type `f1` is dynamically sized. dynamically sized types may only appear as the |
