Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #123897

Merged
merged 20 commits into from
Apr 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1710d7c
Add target riscv32im_unknown_none_elf to dist-various-1
9names Apr 6, 2024
852f472
MIRI_REPLACE_LIBRS_IF_NOT_TEST: also apply to crates.io crates
RalfJung Apr 6, 2024
a7aa7fd
do not allow using local llvm while using rustc from ci
onur-ozkan Apr 8, 2024
788a1db
Auto merge of #3457 - RalfJung:replace-librs, r=RalfJung
bors Apr 10, 2024
bc8ad6a
Bring documentation of Path::to_path_buf in line with the rest of Pat…
Kriskras99 Apr 10, 2024
6b0d366
Rework Path::ancestors documentation to remove unwraps
Kriskras99 Apr 10, 2024
aff5f47
remove dead code
klensy Apr 12, 2024
474a047
De-duplicate SSE2 sll/srl/sra code
eduardosm Apr 12, 2024
ed46e3c
Update backtrace submodule
dpaoliello Apr 12, 2024
c9889b0
fix coroutine witness doctest
oli-obk Apr 13, 2024
c3136b2
Auto merge of #3429 - eduardosm:shift, r=RalfJung
bors Apr 13, 2024
c6a4f81
Replace a `DefiningOpaqueTypes::No` with `Yes` by asserting that one …
oli-obk Apr 13, 2024
7085ff2
remove some ancient debug output, looks unused?
klensy Apr 12, 2024
7a69120
Rollup merge of #123530 - 9names:build-rv32im, r=Mark-Simulacrum
matthiaskrgr Apr 13, 2024
873de7e
Rollup merge of #123642 - onur-ozkan:restrict-llvm-option, r=Mark-Sim…
matthiaskrgr Apr 13, 2024
c5bf34a
Rollup merge of #123716 - Kriskras99:patch-2, r=Mark-Simulacrum
matthiaskrgr Apr 13, 2024
360f9ed
Rollup merge of #123876 - dpaoliello:backtrace, r=ChrisDenton
matthiaskrgr Apr 13, 2024
3fb529e
Rollup merge of #123888 - oli-obk:define_opaque_types4, r=compiler-er…
matthiaskrgr Apr 13, 2024
ab47cb4
Rollup merge of #123890 - klensy:cl, r=fee1-dead
matthiaskrgr Apr 13, 2024
f8ef61d
Rollup merge of #123891 - RalfJung:miri, r=RalfJung
matthiaskrgr Apr 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove dead code
  • Loading branch information
klensy committed Apr 12, 2024
commit aff5f47dcef8e4616101a525cee7ecfd41183e6b
30 changes: 0 additions & 30 deletions compiler/rustc_middle/src/util/common.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
use rustc_data_structures::sync::Lock;

use std::fmt::Debug;
use std::time::{Duration, Instant};

#[cfg(test)]
mod tests;

Expand All @@ -26,31 +21,6 @@ pub fn to_readable_str(mut val: usize) -> String {
groups.join("_")
}

pub fn record_time<T, F>(accu: &Lock<Duration>, f: F) -> T
where
F: FnOnce() -> T,
{
let start = Instant::now();
let rv = f();
let duration = start.elapsed();
let mut accu = accu.lock();
*accu += duration;
rv
}

pub fn indent<R, F>(op: F) -> R
where
R: Debug,
F: FnOnce() -> R,
{
// Use in conjunction with the log post-processor like `src/etc/indenter`
// to make debug output more readable.
debug!(">>");
let r = op();
debug!("<< (Result = {:?})", r);
r
}

pub struct Indenter {
_cannot_construct_outside_of_this_module: (),
}
Expand Down