about summary refs log tree commit diff
path: root/src/test/compile-fail/issue-14221.rs
AgeCommit message (Collapse)AuthorLines
2018-07-15Move some `compile-fail` tests to `ui`Esteban Küber-31/+0
2017-01-03Disable unreachable patterns error entirelyAndrew Cann-0/+4
2014-11-26Warn on pattern bindings that have the same name as a variantJakub Bukaj-0/+2
...of the type being matched. This change will result in a better diagnostic for code like the following: ```rust enum Enum { Foo, Bar } fn f(x: Enum) { match x { Foo => (), Bar => () } } ``` which would currently simply fail with an unreachable pattern error on the 2nd arm. The user is advised to either use a qualified path in the patterns or import the variants explicitly into the scope.
2014-05-16rustc: Stop leaking enum variants into childrenAlex Crichton-0/+25
This plugs a leak where resolve was treating enums defined in parent modules as in-scope for all children modules when resolving a pattern identifier. This eliminates the code path in resolve entirely. If this breaks any existing code, then it indicates that the variants need to be explicitly imported into the module. Closes #14221 [breaking-change]