8000 Stabilize `type_alias_enum_variants` in Rust 1.37.0 by Centril · Pull Request #61682 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Stabilize type_alias_enum_variants in Rust 1.37.0 #61682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ac94bbe
Stabilize type_alias_enum_variants.
Centril May 31, 2019
e5060da
type_alias_enum_variants: Remove feature gate test.
Centril May 31, 2019
05dc864
Move type_alias_enum_variants tests to a folder; Strip feature gates.
Centril Jun 8, 2019
0d27995
type_alias_enum_variants: remove duplicate run-pass test.
Centril Jun 9, 2019
8642258
Cleanup type-alias-enum-variants.rs test.
Centril Jun 9, 2019
4f66364
Rename type-alias-enum-variants.rs to something descriptive.
Centril Jun 9, 2019
f5f1144
type-alias-enum-variants-priority: elaborate on why this exists.
Centril Jun 9, 2019
ff7d6a1
type-alias-enum-variants-priority: rename to something more descriptive.
Centril Jun 9, 2019
6d1ecb3
type-alias-enum-variants-priority-2: account for 'const's + describe …
Centril Jun 9, 2019
fd44b76
type-alias-enum-variants-priority-2: rename to something descriptive.
Centril Jun 9, 2019
c0c48a6
type-alias-enum-variants-priority-3: describe the test.
Centril Jun 9, 2019
d87cae3
type-alias-enum-variants-priority-3: rename to something descriptive.
Centril Jun 9, 2019
77ff384
type-alias-enum-variants-pass: harden; account for unit variants.
Centril Jun 9, 2019
bed1897
type-alias-enum-variants-panic: harden + describe the test.
Centril Jun 9, 2019
d358b5f
type-alias-enum-variants-panic: rename to something descriptive.
Centril Jun 9, 2019
86c74d3
(type_alias_enum_variants); issue-58006: rename to something descript…
Centril Jun 9, 2019
ce48086
enum-variant-generic-args-pats-pass: harden + describe.
Centril Jun 9, 2019
26f98fd
enum-variant-generic-args-pats-pass: rename; test isn't specific to p…
Centril Jun 9, 2019
a70653a
enum-variant-generic-args: describe + account for unit variants.
Centril Jun 9, 2019
46f405e
type_alias_enum_variants: Remove from unstable book.
Centril Jun 9, 2019
57e6869
type_alias_enum_variants: cleanup redundant 'allow(unused)'.
Centril Jun 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup type-alias-enum-variants.rs test.
  • Loading branch information
Centril committed Jun 15, 2019
commit 86422582dfa20a69d22ff421e0549a4546f275a9
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// Check that a generic type for an `enum` admits type application
// on both the type constructor and the generic type's variant.
//
// Also check that a type alias to said generic type admits type application
// on the type constructor but *NOT* the variant.

type Alias<T> = Option<T>;

fn main() {
let _ = Option::<u8>::None; // OK
let _ = Option::None::<u8>; // OK (Lint in future!)
let _ = Alias::<u8>::None; // OK
let _ = Alias::None::<u8>; // Error
//~^ type arguments are not allowed for this type
let _ = Alias::None::<u8>; //~ ERROR type arguments are not allowed for this type
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
error[E0109]: type arguments are not allowed for this type
--> $DIR/type-alias-enum-variants.rs:7:27
--> $DIR/type-alias-enum-variants.rs:13:27
|
LL | let _ = Alias::None::<u8>; // Error
LL | let _ = Alias::None::<u8>;
| ^^ type argument not allowed

error: aborting due to previous error
Expand Down
0