rust/src/test/ui/pattern
bors 5748825cc8 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
2019-07-01 03:11:19 +00:00
..
const-pat-ice.rs test: normalize away the line/column info in ui/pattern/const-pat-ice. 2019-06-18 18:10:26 +03:00
const-pat-ice.stderr test: normalize away the line/column info in ui/pattern/const-pat-ice. 2019-06-18 18:10:26 +03:00
deny-irrefutable-let-patterns.rs Stabilise irrefutable if-let and while-let patterns 2019-01-12 03:10:59 +00:00
deny-irrefutable-let-patterns.stderr Update tests 2019-03-11 23:10:26 +03:00
irrefutable-exhaustive-integer-binding.rs Fix irrefutable matches on integer ranges 2018-12-11 11:16:53 +00:00
irrefutable-let-patterns.rs Stabilise irrefutable if-let and while-let patterns 2019-01-12 03:10:59 +00:00
pat-shadow-in-nested-binding.rs Remove licenses 2018-12-25 21:08:33 -07:00
pat-shadow-in-nested-binding.stderr Update tests 2019-03-11 23:10:26 +03:00
pat-tuple-bad-type.rs Remove licenses 2018-12-25 21:08:33 -07:00
pat-tuple-bad-type.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
pat-tuple-overfield.rs Remove licenses 2018-12-25 21:08:33 -07:00
pat-tuple-overfield.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
patkind-litrange-no-expr.rs Remove licenses 2018-12-25 21:08:33 -07:00
patkind-litrange-no-expr.stderr Update tests 2019-03-11 23:10:26 +03:00
pattern-binding-disambiguation.rs Remove licenses 2018-12-25 21:08:33 -07:00
pattern-binding-disambiguation.stderr Update tests 2019-03-11 23:10:26 +03:00
pattern-bindings-after-at.nll.stderr Change compare mode to use -Zborrowck=mir 2019-05-12 18:46:43 +01:00
pattern-bindings-after-at.rs Never stop due to errors before borrow checking 2019-04-22 13:11:53 -07:00
pattern-bindings-after-at.stderr Add FAQ for NLL migration 2019-05-21 09:52:05 -07:00
pattern-error-continue.rs Remove licenses 2018-12-25 21:08:33 -07:00
pattern-error-continue.stderr hide --explain hint if error has no extended info 2019-04-18 13:29:28 -04:00
pattern-ident-path-generics.rs Remove licenses 2018-12-25 21:08:33 -07:00
pattern-ident-path-generics.stderr Update tests 2019-03-11 23:10:26 +03:00
pattern-tyvar-2.rs Remove licenses 2018-12-25 21:08:33 -07:00
pattern-tyvar-2.stderr Better diagnostic for binary operation on BoxedValues 2019-03-27 13:13:09 -04:00
pattern-tyvar.rs Remove licenses 2018-12-25 21:08:33 -07:00
pattern-tyvar.stderr Update tests 2019-03-11 23:10:26 +03:00
slice-pattern-const-2.rs Make ConstValue::Slice solely take [u8] and str 2019-05-25 10:07:01 +02:00
slice-pattern-const-2.stderr Make ConstValue::Slice solely take [u8] and str 2019-05-25 10:07:01 +02:00
slice-pattern-const-3.rs Update tests to show diagnostics 2018-12-13 12:54:49 +01:00
slice-pattern-const-3.stderr Update tests 2019-03-11 23:10:26 +03:00
slice-pattern-const.rs Update tests to show diagnostics 2018-12-13 12:54:49 +01:00
slice-pattern-const.stderr Update tests 2019-03-11 23:10:26 +03:00