Skip to content

Commit 79af229

Browse files
authored
Rollup merge of #76823 - RalfJung:black-box-warn, r=joshtriplett
black_box: silence unused_mut warning when building with cfg(miri)
2 parents 0412fd6 + 1dd3df6 commit 79af229

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/hint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub fn spin_loop() {
111111
#[cfg_attr(not(miri), inline)]
112112
#[cfg_attr(miri, inline(never))]
113113
#[unstable(feature = "test", issue = "50297")]
114-
#[allow(unreachable_code)] // this makes #[cfg] a bit easier below.
114+
#[cfg_attr(miri, allow(unused_mut))]
115115
pub fn black_box<T>(mut dummy: T) -> T {
116116
// We need to "use" the argument in some way LLVM can't introspect, and on
117117
// targets that support it we can typically leverage inline assembly to do

0 commit comments

Comments
 (0)