diff options
| author | bors <bors@rust-lang.org> | 2019-07-01 03:11:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-07-01 03:11:19 +0000 |
| commit | 5748825cc8c74cccef0059cdd4043e6e9b4aa188 (patch) | |
| tree | 0b989373bea2f277c413b84b9ab236141a83885d /src/test/rustdoc-ui/coverage/private.rs | |
| parent | 0af8e872ea5ac77effa59f8d3f8794f12cb8865c (diff) | |
| parent | 57e6869a6be56cd75e382deb313fb5f4d1bb1fda (diff) | |
| download | rust-5748825cc8c74cccef0059cdd4043e6e9b4aa188.tar.gz rust-5748825cc8c74cccef0059cdd4043e6e9b4aa188.zip | |
Auto merge of #61682 - Centril:stabilize-type_alias_enum_variants, r=petrochenkov
Stabilize `type_alias_enum_variants` in Rust 1.37.0
Stabilize `#![feature(type_alias_enum_variants)]` which allows type-relative resolution with highest priority to `enum` variants in both expression and pattern contexts. For example, you may now write:
```rust
enum Option<T> {
None,
Some(T),
}
type OptAlias<T> = Option<T>;
fn work_on_alias(x: Option<u8>) -> u8 {
match x {
OptAlias::Some(y) => y + 1,
OptAlias::None => 0,
}
}
```
Closes https://github.com/rust-lang/rfcs/issues/2218
Closes https://github.com/rust-lang/rust/issues/52118
r? @petrochenkov
Diffstat (limited to 'src/test/rustdoc-ui/coverage/private.rs')
0 files changed, 0 insertions, 0 deletions
