summary refs log tree commit diff
path: root/src/test/ui/rust-2018
AgeCommit message (Collapse)AuthorLines
2018-07-26Tweak the raw_identifiers lints in 2018Alex Crichton-0/+38
* Enable the `raw_identifiers` feature automatically in the 2018 preview * Only emit lint warnings if the `raw_identifiers` feature is activated cc rust-lang/cargo#5783
2018-07-18Auto merge of #52375 - oli-obk:the_early_lint_pass_gets_the_worm, r=Manishearthbors-0/+309
Lint `async` identifiers in 2018 preparation mode r? @Manishearth fixes https://github.com/rust-lang/rust/issues/49716
2018-07-18Make `async_idents` allow-by-defaultOliver Schneider-17/+23
2018-07-17Make `async_idents` an edition incompat lintOliver Schneider-15/+227
2018-07-14Lint the use of async as an identifierOliver Schneider-0/+91
2018-07-12rustc: Lint against `#[macro_use]` in 2018 idiomsAlex Crichton-0/+73
This commit adds a lint to the compiler to warn against the `#[macro_use]` directive as part of the `rust_2018_idioms` lint. This lint is turned off by default and is only enabled when the `use_extern_macros` feature is also enabled. The lint here isn't fully fleshed out as it's just a simple warning rather than suggestions of how to actually import the macro, but hopefully it's a good base to start from! cc #52043
2018-07-09in which `use` suggestions meet edition 2018Zack M. Davis-0/+43
The intent here is to resolve #52202.
2018-06-01merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATESNiko Matsakis-10/+17
2018-06-01extend `unused_extern_crates` lint with a suggestion to removeNiko Matsakis-0/+86
2018-05-30also reset anon-param-mode for `fn()` typesNiko Matsakis-0/+25
2018-05-30reset the "anonymous lifetime mode" for parenthesized where clausesNiko Matsakis-0/+25
Background: The anonymous lifetime mode is used to prohibit elided lifetimes where they didn't used to be permitted, and instead require that `'_` be used. For example: ```rust impl Trait for Ref<T> { .. } // ^^^^^^ ERROR: should be `Ref<'_, T>` ``` When we are parsing the parts of the impl header, we enter into an alternate mode called `CreateParameter`. In this mode, we give an error for things like `Ref<T>`, but for elided lifetimes in a reference type like `&T` we make the elided lifetime into an in-band lifetime: https://github.com/rust-lang/rust/blob/4f99f37b7e213d69a489884f651adfc6d217cef5/src/librustc/hir/lowering.rs#L4017-L4035 This was not intended to change behavior because we only enter into that mode in contexts where elision was not historically permitted. However, the problem is that we fail to reset the mode when we enter into bounds like `Fn(&u32)`, where elision *was* allowed -- the same occurs for fn types like `fn(&u32`). This PR restores the original mode in those contexts.
2018-05-25Fix naming conventions for new lintsVadim Petrochenkov-28/+28
2018-05-23"crate-ify" paths that begin with a renamed crateNiko Matsakis-0/+274
2018-05-23Auto merge of #50983 - nikomatsakis:issue-50970-migration-lint-fq-path, ↵bors-0/+213
r=alexcrichton Issue 50970 migration lint fq path Similar issue, but for fully qualified paths. Fixes #50970 r? @alexcrichton
2018-05-23handle fully qualified paths properly when lintingNiko Matsakis-0/+213
fixes #50970
2018-05-22rustc: Fix another double-lint issue with `crate::`Alex Crichton-22/+36
This commit fixes another issue in the `absolute_path_not_starting_with_crate` lint where it warns twice about an import which may contain `self`. It turns out there were a few more locations that needed updating to use `root_id` and `root_span` introduced in #50970 and after that it looks to work like a charm! Closes #50978
2018-05-22add new test and add an existing scenario I didn't see coveredNiko Matsakis-4/+97
2018-05-22create a rust-2018 directory for tests related to edition transitionNiko Matsakis-0/+235