Skip to content

Commit ad65e3e

Browse files
Fix some rebasing fallout.
1 parent 11e4844 commit ad65e3e

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -3079,6 +3079,7 @@ dependencies = [
30793079
"graphviz",
30803080
"jobserver",
30813081
"log",
3082+
"measureme",
30823083
"parking_lot",
30833084
"polonius-engine",
30843085
"rustc-rayon",

src/librustc/ty/query/profiling_support.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
21
use crate::hir::map::definitions::DefPathData;
32
use crate::ty::context::TyCtxt;
43
use crate::ty::query::config::QueryConfig;
@@ -7,6 +6,7 @@ use measureme::{StringComponent, StringId};
76
use rustc_data_structures::fx::FxHashMap;
87
use rustc_data_structures::profiling::SelfProfiler;
98
use rustc_data_structures::sharded::Sharded;
9+
use rustc_hir::def_id::{CrateNum, DefId, DefIndex, CRATE_DEF_INDEX, LOCAL_CRATE};
1010
use std::fmt::Debug;
1111
use std::io::Write;
1212

src/librustc_codegen_ssa/base.rs

+2-10
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,7 @@ pub fn from_immediate<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
334334
bx: &mut Bx,
335335
val: Bx::Value,
336336
) -> Bx::Value {
337-
if bx.cx().val_ty(val) == bx.cx().type_i1() {
338-
bx.zext(val, bx.cx().type_i8())
339-
} else {
340-
val
341-
}
337+
if bx.cx().val_ty(val) == bx.cx().type_i1() { bx.zext(val, bx.cx().type_i8()) } else { val }
342338
}
343339

344340
pub fn to_immediate<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
@@ -887,11 +883,7 @@ fn determine_cgu_reuse<'tcx>(tcx: TyCtxt<'tcx>, cgu: &CodegenUnit<'tcx>) -> CguR
887883

888884
if tcx.dep_graph.try_mark_green(tcx, &dep_node).is_some() {
889885
// We can re-use either the pre- or the post-thinlto state
890-
if tcx.sess.lto() != Lto::No {
891-
CguReuse::PreLto
892-
} else {
893-
CguReuse::PostLto
894-
}
886+
if tcx.sess.lto() != Lto::No { CguReuse::PreLto } else { CguReuse::PostLto }
895887
} else {
896888
CguReuse::No
897889
}

src/librustc_data_structures/profiling.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ impl SelfProfilerRef {
224224
/// a measureme event, "verbose" generic activities also print a timing entry to
225225
/// stdout if the compiler is invoked with -Ztime or -Ztime-passes.
226226
#[inline(always)]
227-
pub fn verbose_generic_activity<'a>(&'a self, event_id: &'a str) -> VerboseTimingGuard<'a> {
227+
pub fn verbose_generic_activity<'a>(
228+
&'a self,
229+
event_id: &'static str,
230+
) -> VerboseTimingGuard<'a> {
228231
VerboseTimingGuard::start(
229232
event_id,
230233
self.print_verbose_generic_activities,
@@ -589,8 +592,8 @@ fn get_resident() -> Option<usize> {
589592
cb: DWORD,
590593
) -> BOOL;
591594
}
592-
let mut pmc: PROCESS_MEMORY_COUNTERS = unsafe { mem::zeroed() };
593-
pmc.cb = mem::size_of_val(&pmc) as DWORD;
595+
let mut pmc: PROCESS_MEMORY_COUNTERS = unsafe { std::mem::zeroed() };
596+
pmc.cb = std::mem::size_of_val(&pmc) as DWORD;
594597
match unsafe { GetProcessMemoryInfo(GetCurrentProcess(), &mut pmc, pmc.cb) } {
595598
0 => None,
596599
_ => Some(pmc.WorkingSetSize as usize),

0 commit comments

Comments
 (0)