diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-07-05 20:26:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-05 20:26:51 +0200 |
| commit | 485a084b45cbe03265593c502fa4c864f60961de (patch) | |
| tree | 8413f5802665354d9de4dd25a9d4471de448de50 /src/libsyntax | |
| parent | 853f30052d019a8ebe197a5adff3a29d6716a955 (diff) | |
| parent | d0625a380b03e83fcfc2f0230986186992d13c71 (diff) | |
| download | rust-485a084b45cbe03265593c502fa4c864f60961de.tar.gz rust-485a084b45cbe03265593c502fa4c864f60961de.zip | |
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Implement another internal lints
cc #49509
This adds ~~two~~ one internal lint~~s~~:
1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669
2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~
~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~
TODO (not directly relevant for review):
- [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb)
- [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870
- [x] Check explicitly for the `{declare,impl}_lint_pass!` macros
r? @oli-obk
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 453b6ebf3c4..a0c298010b6 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -60,7 +60,7 @@ pub fn is_known(attr: &Attribute) -> bool { } pub fn is_known_lint_tool(m_item: Ident) -> bool { - ["clippy"].contains(&m_item.as_str().as_ref()) + [sym::clippy, sym::rustc].contains(&m_item.name) } impl NestedMetaItem { diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 7f16bb9dc12..a7c5ed158e0 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -8,7 +8,6 @@ test(attr(deny(warnings))))] #![deny(rust_2018_idioms)] -#![deny(internal)] #![deny(unused_lifetimes)] #![feature(bind_by_move_pattern_guards)] |
