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 | bb5ca58d290791c01d7bb40fd59f5a3275603310 (patch) | |
| tree | b7320e9fd1c3fce35f028ce4d63bbdd850c6d76f /src/tools/clippy | |
| parent | 6d4f27ebc7b9ff77e3360e1f0c01d010b455b4da (diff) | |
| parent | 294510e1bb7e03bd462f6a6db2fab5f56fae1c8c (diff) | |
| download | rust-bb5ca58d290791c01d7bb40fd59f5a3275603310.tar.gz rust-bb5ca58d290791c01d7bb40fd59f5a3275603310.zip | |
Rollup merge of #88677 - petrochenkov:exportid, r=davidtwco
rustc: Remove local variable IDs from `Export`s Local variables can never be exported.
Diffstat (limited to 'src/tools/clippy')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs index da259511fe0..3a94f472983 100644 --- a/src/tools/clippy/clippy_utils/src/lib.rs +++ b/src/tools/clippy/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. |
