about summary refs log tree commit diff
path: root/src/test/compile-fail/lint-dead-code-5.rs
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-40/+0
2017-11-19dead code lint to say "never constructed" for variantsZack M. Davis-3/+3
As reported in #19140, #44083, and #44565, some users were confused when the dead-code lint reported an enum variant to be "unused" when it was matched on (but not constructed). This wording change makes it clearer that the lint is in fact checking for construction. We continue to say "used" for all other items (it's tempting to say "called" for functions and methods, but this turns out not to be correct: functions can be passed as arguments and the dead-code lint isn't special-casing that or anything). Resolves #19140.
2015-01-08Update compile fail tests to use isize.Huon Wilson-4/+4
2014-11-17Switch to purely namespaced enumsSteven Fackler-4/+4
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-15Un-feature gate struct variantsSteven Fackler-1/+0
Struct variant field visibility is now inherited. Remove `pub` keywords from declarations. Closes #18641 [breaking-change]
2014-10-28Update code with new lint namesAaron Turon-1/+1
2014-09-24Use more descriptive names in dead code messagesJakub Wieczorek-1/+1
2014-09-24Add detection of unused enum variantsJakub Wieczorek-0/+41