diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2021-09-12 03:44:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-12 03:44:53 -0700 |
| commit | 6da14613e7d18382f7ee16b474b3882aadbe50f5 (patch) | |
| tree | 107d91221e47be5130a3f479942e8c7e0ce79d2d | |
| parent | e6455ea72ca3a4602f6a6b097cb80647a1f69388 (diff) | |
| parent | 9163ac9595cebb1c955d38c23b4c065ca2e23bd8 (diff) | |
Rollup merge of #88677 - petrochenkov:exportid, r=davidtwco
rustc: Remove local variable IDs from `Export`s Local variables can never be exported.
| -rw-r--r-- | clippy_utils/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index da259511fe0..3a94f472983 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -520,7 +520,7 @@ pub fn path_to_res(cx: &LateContext<'_>, path: &[&str]) -> Res { } }; } - fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Option<&'tcx Export<HirId>> { + fn item_child_by_name<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId, name: &str) -> Option<&'tcx Export> { tcx.item_children(def_id) .iter() .find(|item| item.ident.name.as_str() == name) @@ -557,7 +557,7 @@ pub fn path_to_res(cx: &LateContext<'_>, path: &[&str]) -> Res { None } }); - try_res!(last).res + try_res!(last).res.expect_non_local() } /// Convenience function to get the `DefId` of a trait by path. |
