diff options
| author | bors <bors@rust-lang.org> | 2020-10-25 11:35:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-25 11:35:26 +0000 |
| commit | f392479de6b003e72f93cb8f9955b3cf4135c2cd (patch) | |
| tree | 057548a962b16b3c490cf339db151d1e0eeba81c /src/tools | |
| parent | 5171cc76c264fd46f32e140c2e460c77ca87d5e5 (diff) | |
| parent | 0a26e4ba7e112b9d5ef2bd735b1486b84e66eeae (diff) | |
| download | rust-f392479de6b003e72f93cb8f9955b3cf4135c2cd.tar.gz rust-f392479de6b003e72f93cb8f9955b3cf4135c2cd.zip | |
Auto merge of #78350 - JohnTitor:rollup-vbbm5wf, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #77984 (Compute proper module parent during resolution) - #78085 (MIR validation should check `SwitchInt` values are valid for the type) - #78208 (replace `#[allow_internal_unstable]` with `#[rustc_allow_const_fn_unstable]` for `const fn`s) - #78209 (Update `compiler_builtins` to 0.1.36) - #78276 (Bump backtrace-rs to enable Mach-O support on iOS.) - #78320 (Link to cargo's `build-std` feature instead of `xargo` in custom target docs) - #78322 (BTreeMap: stop mistaking node::MIN_LEN for a node level constraint) - #78326 (Split out statement attributes changes from #78306) Failed merges: r? `@ghost`
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/utils/author.rs | 2 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/utils/inspector.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/utils/author.rs b/src/tools/clippy/clippy_lints/src/utils/author.rs index 89425437eee..7250de3a41c 100644 --- a/src/tools/clippy/clippy_lints/src/utils/author.rs +++ b/src/tools/clippy/clippy_lints/src/utils/author.rs @@ -130,7 +130,7 @@ impl<'tcx> LateLintPass<'tcx> for Author { } fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { - if !has_attr(cx.sess(), stmt.kind.attrs()) { + if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id.id))) { return; } prelude(); diff --git a/src/tools/clippy/clippy_lints/src/utils/inspector.rs b/src/tools/clippy/clippy_lints/src/utils/inspector.rs index 93bd8299446..4fbfb3be32c 100644 --- a/src/tools/clippy/clippy_lints/src/utils/inspector.rs +++ b/src/tools/clippy/clippy_lints/src/utils/inspector.rs @@ -109,7 +109,7 @@ impl<'tcx> LateLintPass<'tcx> for DeepCodeInspector { } fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { - if !has_attr(cx.sess(), stmt.kind.attrs()) { + if !has_attr(cx.sess(), stmt.kind.attrs(|id| cx.tcx.hir().item(id.id))) { return; } match stmt.kind { |
