diff options
| author | Ralf Jung <post@ralfj.de> | 2020-09-20 12:08:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-20 12:08:24 +0200 |
| commit | df4e4ef2b9c6674cc93444b925ca8c3d0c17ab90 (patch) | |
| tree | e1eb7652d8c79fa24d150b80add50dd4a517111c | |
| parent | 4322e1b92df83e9e8e84aac3f5f8f3545341fd3a (diff) | |
| parent | 1dd3df6738b5bbe676b6ae5b561c491ca483f017 (diff) | |
| download | rust-df4e4ef2b9c6674cc93444b925ca8c3d0c17ab90.tar.gz rust-df4e4ef2b9c6674cc93444b925ca8c3d0c17ab90.zip | |
Rollup merge of #76823 - RalfJung:black-box-warn, r=joshtriplett
black_box: silence unused_mut warning when building with cfg(miri)
| -rw-r--r-- | library/core/src/hint.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index e53682ece1d..4eb47dd1378 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -111,7 +111,7 @@ pub fn spin_loop() { #[cfg_attr(not(miri), inline)] #[cfg_attr(miri, inline(never))] #[unstable(feature = "test", issue = "50297")] -#[allow(unreachable_code)] // this makes #[cfg] a bit easier below. +#[cfg_attr(miri, allow(unused_mut))] pub fn black_box<T>(mut dummy: T) -> T { // We need to "use" the argument in some way LLVM can't introspect, and on // targets that support it we can typically leverage inline assembly to do |
