Skip to content

Commit 87e0f43

Browse files
committed
Revert unintentional whitespace changes to rustfmt-excluded file
1 parent 28d0a4a commit 87e0f43

File tree

2 files changed

+65
-65
lines changed

2 files changed

+65
-65
lines changed

src/tools/miri/src/bin/log/tracing_chrome.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -523,16 +523,16 @@ where
523523
}
524524
},
525525
TraceStyle::Async => Some(
526-
span.scope()
527-
.from_root()
528-
.take(1)
529-
.next()
530-
.unwrap_or(span)
531-
.id()
532-
.into_u64()
526+
span.scope()
527+
.from_root()
528+
.take(1)
529+
.next()
530+
.unwrap_or(span)
531+
.id()
532+
.into_u64()
533533
.cast_signed() // the comment above explains the cast
534534
),
535-
}
535+
}
536536
}
537537

538538
fn enter_span(&self, span: SpanRef<S>, ts: f64, tid: usize, out: &Sender<Message>) {
@@ -567,11 +567,11 @@ where
567567
Some(thread_data) => (thread_data, false),
568568
None => {
569569
let tid = self.max_tid.fetch_add(1, Ordering::SeqCst);
570-
let out = self.out.lock().unwrap().clone();
570+
let out = self.out.lock().unwrap().clone();
571571
let start = TracingChromeInstant::setup_for_thread_and_start(tid);
572572
*thread_data = Some(ThreadData { tid, out, start });
573573
(thread_data.as_mut().unwrap(), true)
574-
}
574+
}
575575
};
576576

577577
start.with_elapsed_micros_subtracting_tracing(|ts| {
@@ -583,7 +583,7 @@ where
583583
let _ignored = out.send(Message::NewThread(*tid, name));
584584
}
585585
f(ts, *tid, out);
586-
});
586+
});
587587
});
588588
}
589589
}
@@ -605,15 +605,15 @@ where
605605
fn on_record(&self, id: &span::Id, values: &span::Record<'_>, ctx: Context<'_, S>) {
606606
if self.include_args {
607607
self.with_elapsed_micros_subtracting_tracing(|_, _, _| {
608-
let span = ctx.span(id).unwrap();
609-
let mut exts = span.extensions_mut();
608+
let span = ctx.span(id).unwrap();
609+
let mut exts = span.extensions_mut();
610610

611-
let args = exts.get_mut::<ArgsWrapper>();
611+
let args = exts.get_mut::<ArgsWrapper>();
612612

613-
if let Some(args) = args {
614-
let args = Arc::make_mut(&mut args.args);
615-
values.record(&mut JsonVisitor { object: args });
616-
}
613+
if let Some(args) = args {
614+
let args = Arc::make_mut(&mut args.args);
615+
values.record(&mut JsonVisitor { object: args });
616+
}
617617
});
618618
}
619619
}
@@ -636,16 +636,16 @@ where
636636

637637
fn on_new_span(&self, attrs: &span::Attributes<'_>, id: &span::Id, ctx: Context<'_, S>) {
638638
self.with_elapsed_micros_subtracting_tracing(|ts, tid, out| {
639-
if self.include_args {
640-
let mut args = Object::new();
641-
attrs.record(&mut JsonVisitor { object: &mut args });
642-
ctx.span(id).unwrap().extensions_mut().insert(ArgsWrapper {
643-
args: Arc::new(args),
644-
});
645-
}
646-
if let TraceStyle::Threaded = self.trace_style {
647-
return;
648-
}
639+
if self.include_args {
640+
let mut args = Object::new();
641+
attrs.record(&mut JsonVisitor { object: &mut args });
642+
ctx.span(id).unwrap().extensions_mut().insert(ArgsWrapper {
643+
args: Arc::new(args),
644+
});
645+
}
646+
if let TraceStyle::Threaded = self.trace_style {
647+
return;
648+
}
649649

650650
self.enter_span(ctx.span(id).expect("Span not found."), ts, tid, out);
651651
});

src/tools/miri/src/intrinsics/simd.rs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,47 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
3838
for i in 0..dest_len {
3939
let op = this.read_immediate(&this.project_index(&op, i)?)?;
4040
let dest = this.project_index(&dest, i)?;
41-
let ty::Float(float_ty) = op.layout.ty.kind() else {
42-
span_bug!(this.cur_span(), "{} operand is not a float", intrinsic_name)
43-
};
44-
// Using host floats except for sqrt (but it's fine, these operations do not
45-
// have guaranteed precision).
41+
let ty::Float(float_ty) = op.layout.ty.kind() else {
42+
span_bug!(this.cur_span(), "{} operand is not a float", intrinsic_name)
43+
};
44+
// Using host floats except for sqrt (but it's fine, these operations do not
45+
// have guaranteed precision).
4646
let val = match float_ty {
47-
FloatTy::F16 => unimplemented!("f16_f128"),
48-
FloatTy::F32 => {
49-
let f = op.to_scalar().to_f32()?;
47+
FloatTy::F16 => unimplemented!("f16_f128"),
48+
FloatTy::F32 => {
49+
let f = op.to_scalar().to_f32()?;
5050
let res = match intrinsic_name {
51-
"fsqrt" => math::sqrt(f),
52-
"fsin" => f.to_host().sin().to_soft(),
53-
"fcos" => f.to_host().cos().to_soft(),
54-
"fexp" => f.to_host().exp().to_soft(),
55-
"fexp2" => f.to_host().exp2().to_soft(),
56-
"flog" => f.to_host().ln().to_soft(),
57-
"flog2" => f.to_host().log2().to_soft(),
58-
"flog10" => f.to_host().log10().to_soft(),
59-
_ => bug!(),
60-
};
61-
let res = this.adjust_nan(res, &[f]);
62-
Scalar::from(res)
63-
}
64-
FloatTy::F64 => {
65-
let f = op.to_scalar().to_f64()?;
51+
"fsqrt" => math::sqrt(f),
52+
"fsin" => f.to_host().sin().to_soft(),
53+
"fcos" => f.to_host().cos().to_soft(),
54+
"fexp" => f.to_host().exp().to_soft(),
55+
"fexp2" => f.to_host().exp2().to_soft(),
56+
"flog" => f.to_host().ln().to_soft(),
57+
"flog2" => f.to_host().log2().to_soft(),
58+
"flog10" => f.to_host().log10().to_soft(),
59+
_ => bug!(),
60+
};
61+
let res = this.adjust_nan(res, &[f]);
62+
Scalar::from(res)
63+
}
64+
FloatTy::F64 => {
65+
let f = op.to_scalar().to_f64()?;
6666
let res = match intrinsic_name {
67-
"fsqrt" => math::sqrt(f),
68-
"fsin" => f.to_host().sin().to_soft(),
69-
"fcos" => f.to_host().cos().to_soft(),
70-
"fexp" => f.to_host().exp().to_soft(),
71-
"fexp2" => f.to_host().exp2().to_soft(),
72-
"flog" => f.to_host().ln().to_soft(),
73-
"flog2" => f.to_host().log2().to_soft(),
74-
"flog10" => f.to_host().log10().to_soft(),
75-
_ => bug!(),
76-
};
77-
let res = this.adjust_nan(res, &[f]);
78-
Scalar::from(res)
79-
}
80-
FloatTy::F128 => unimplemented!("f16_f128"),
67+
"fsqrt" => math::sqrt(f),
68+
"fsin" => f.to_host().sin().to_soft(),
69+
"fcos" => f.to_host().cos().to_soft(),
70+
"fexp" => f.to_host().exp().to_soft(),
71+
"fexp2" => f.to_host().exp2().to_soft(),
72+
"flog" => f.to_host().ln().to_soft(),
73+
"flog2" => f.to_host().log2().to_soft(),
74+
"flog10" => f.to_host().log10().to_soft(),
75+
_ => bug!(),
8176
};
77+
let res = this.adjust_nan(res, &[f]);
78+
Scalar::from(res)
79+
}
80+
FloatTy::F128 => unimplemented!("f16_f128"),
81+
};
8282

8383
this.write_scalar(val, &dest)?;
8484
}

0 commit comments

Comments
 (0)