Skip to content

Commit 495af0d

Browse files
committed
Auto merge of #3537 - rust-lang:rustup-2024-05-03, r=RalfJung
Automatic Rustup
2 parents 673883b + 9de0f4b commit 495af0d

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ colored = "2"
4747
ui_test = "0.21.1"
4848
rustc_version = "0.4"
4949
regex = "1.5.5"
50-
lazy_static = "1.4.0"
5150
tempfile = "3"
5251

5352
[package.metadata.rust-analyzer]

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6acb9e75ebc936df737381a9d0b7a7bccd6f0b2f
1+
79734f1db8dbe322192dea32c0f6b80ab14c4c1d

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ mod shims;
8989
// Establish a "crate-wide prelude": we often import `crate::*`.
9090

9191
// Make all those symbols available in the same place as our own.
92+
#[doc(no_inline)]
9293
pub use rustc_const_eval::interpret::*;
9394
// Resolve ambiguity.
95+
#[doc(no_inline)]
9496
pub use rustc_const_eval::interpret::{self, AllocMap, PlaceTy, Provenance as _};
9597

9698
pub use crate::shims::env::{EnvVars, EvalContextExt as _};

src/machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl<'mir, 'tcx: 'mir> PrimitiveLayouts<'tcx> {
380380
let mut_raw_ptr = Ty::new_mut_ptr(tcx, tcx.types.unit);
381381
let const_raw_ptr = Ty::new_imm_ptr(tcx, tcx.types.unit);
382382
Ok(Self {
383-
unit: layout_cx.layout_of(Ty::new_unit(tcx))?,
383+
unit: layout_cx.layout_of(tcx.types.unit)?,
384384
i8: layout_cx.layout_of(tcx.types.i8)?,
385385
i16: layout_cx.layout_of(tcx.types.i16)?,
386386
i32: layout_cx.layout_of(tcx.types.i32)?,

tests/ui.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::ffi::OsString;
22
use std::num::NonZeroUsize;
33
use std::path::{Path, PathBuf};
4+
use std::sync::OnceLock;
45
use std::{env, process::Command};
56

67
use colored::*;
@@ -67,8 +68,8 @@ fn miri_config(target: &str, path: &str, mode: Mode, with_dependencies: bool) ->
6768

6869
let mut config = Config {
6970
target: Some(target.to_owned()),
70-
stderr_filters: STDERR.clone(),
71-
stdout_filters: STDOUT.clone(),
71+
stderr_filters: stderr_filters().into(),
72+
stdout_filters: stdout_filters().into(),
7273
mode,
7374
program,
7475
out_dir: PathBuf::from(std::env::var_os("CARGO_TARGET_DIR").unwrap()).join("ui"),
@@ -174,15 +175,18 @@ fn run_tests(
174175
}
175176

176177
macro_rules! regexes {
177-
($name:ident: $($regex:expr => $replacement:expr,)*) => {lazy_static::lazy_static! {
178-
static ref $name: Vec<(Match, &'static [u8])> = vec![
179-
$((Regex::new($regex).unwrap().into(), $replacement.as_bytes()),)*
180-
];
181-
}};
178+
($name:ident: $($regex:expr => $replacement:expr,)*) => {
179+
fn $name() -> &'static [(Match, &'static [u8])] {
180+
static S: OnceLock<Vec<(Match, &'static [u8])>> = OnceLock::new();
181+
S.get_or_init(|| vec![
182+
$((Regex::new($regex).unwrap().into(), $replacement.as_bytes()),)*
183+
])
184+
}
185+
};
182186
}
183187

184188
regexes! {
185-
STDOUT:
189+
stdout_filters:
186190
// Windows file paths
187191
r"\\" => "/",
188192
// erase borrow tags
@@ -191,7 +195,7 @@ regexes! {
191195
}
192196

193197
regexes! {
194-
STDERR:
198+
stderr_filters:
195199
// erase line and column info
196200
r"\.rs:[0-9]+:[0-9]+(: [0-9]+:[0-9]+)?" => ".rs:LL:CC",
197201
// erase alloc ids

0 commit comments

Comments
 (0)