summary refs log tree commit diff
path: root/src/test/compile-fail/lint-dead-code-1.rs
AgeCommit message (Collapse)AuthorLines
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-0/+1
2014-09-25auto merge of #17428 : fhahn/rust/issue-16114-rename-begin-unwind-2, ↵bors-1/+1
r=alexcrichton This is a PR for #16114 and includes to following things: * Rename `begin_unwind` lang item to `fail_fmt` * Rename `core::failure::begin_unwind` to `fail_impl` * Rename `fail_` lang item to `fail`
2014-09-25Rename `fail_` lang item to `fail`, closes #16114Florian Hahn-1/+1
2014-09-24Use more descriptive names in dead code messagesJakub Wieczorek-8/+8
2014-09-24Add detection of unused enum variantsJakub Wieczorek-1/+5
2014-09-22librustc: Forbid private types in public APIs.Patrick Walton-2/+1
This breaks code like: struct Foo { ... } pub fn make_foo() -> Foo { ... } Change this code to: pub struct Foo { // note `pub` ... } pub fn make_foo() -> Foo { ... } The `visible_private_types` lint has been removed, since it is now an error to attempt to expose a private type in a public API. In its place a `#[feature(visible_private_types)]` gate has been added. Closes #16463. RFC #48. [breaking-change]
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-2/+2
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-28Rename all raw pointers as necessaryAlex Crichton-4/+4
2014-06-23librustc: Feature gate lang items and intrinsics.Patrick Walton-0/+1
If you define lang items in your crate, add `#[feature(lang_items)]`. If you define intrinsics (`extern "rust-intrinsic"`), add `#[feature(intrinsics)]`. Closes #12858. [breaking-change]
2014-06-22libsyntax: don't allow enum structs with no fieldsBenjamin Herr-1/+1
Unit-like structs are written as `struct Foo;`, but we erroneously accepted `struct Foo();` and took it to mean the same thing. Now we don't, so use the `struct Foo;` form! [breaking-change]
2014-06-08Remove the dead code identified by the new lintJakub Wieczorek-1/+5
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-2/+2
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-23Support unsized types with the `type` keywordNick Cameron-0/+4
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-6/+6
Closes #2569
2014-03-01rustc: implement a lint for publicly visible private types.Huon Wilson-0/+1
These are types that are in exported type signatures, but are not exported themselves, e.g. struct Foo { ... } pub fn bar() -> Foo { ... } will warn about the Foo. Such types are not listed in documentation, and cannot be named outside the crate in which they are declared, which is very user-unfriendly. cc #10573
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-0/+1
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-01-12Mark allowed dead code and lang items as liveKiet Tran-0/+11
Dead code pass now explicitly checks for `#[allow(dead_code)]` and `#[lang=".."]` attributes on items and marks them as live if they have those attributes. The former is done so that if we want to suppress warnings for a group of dead functions, we only have to annotate the "root" of the call chain.
2013-12-16Check even more live Path nodes in dead-code passKiet Tran-0/+4
2013-12-16Mark live codes in struct/enum for dead-code passKiet Tran-0/+8
2013-12-14Check more live Path nodes in dead-code passKiet Tran-14/+20
2013-12-08Add dead-code warning passKiet Tran-0/+69