diff options
| author | bors <bors@rust-lang.org> | 2021-05-17 01:42:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-17 01:42:03 +0000 |
| commit | 3396a383bb1d1fdad8ceeb74f16cf08e0bd62a1b (patch) | |
| tree | 912246be6d9298983c099d904ee9260e77695a62 /compiler/rustc_middle/src/mir | |
| parent | a55748ffe94e71f841c7b1d752779b0db138b342 (diff) | |
| parent | 1ebf6d12426152dc1ce76c174ee0ff69b1a4c5b4 (diff) | |
| download | rust-3396a383bb1d1fdad8ceeb74f16cf08e0bd62a1b.tar.gz rust-3396a383bb1d1fdad8ceeb74f16cf08e0bd62a1b.zip | |
Auto merge of #85178 - cjgillot:local-crate, r=oli-obk
Remove CrateNum parameter for queries that only work on local crate The pervasive `CrateNum` parameter is a remnant of the multi-crate rustc idea. Using `()` as query key in those cases avoids having to worry about the validity of the query key.
Diffstat (limited to 'compiler/rustc_middle/src/mir')
| -rw-r--r-- | compiler/rustc_middle/src/mir/mono.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/mono.rs b/compiler/rustc_middle/src/mir/mono.rs index 67440e6e0ed..edf2e539765 100644 --- a/compiler/rustc_middle/src/mir/mono.rs +++ b/compiler/rustc_middle/src/mir/mono.rs @@ -88,7 +88,7 @@ impl<'tcx> MonoItem<'tcx> { match *self { MonoItem::Fn(ref instance) => { - let entry_def_id = tcx.entry_fn(LOCAL_CRATE).map(|(id, _)| id); + let entry_def_id = tcx.entry_fn(()).map(|(id, _)| id); // If this function isn't inlined or otherwise has an extern // indicator, then we'll be creating a globally shared version. if tcx.codegen_fn_attrs(instance.def_id()).contains_extern_indicator() |
