Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
87 changes: 51 additions & 36 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ dependencies = [
"iana-time-zone",
"num-traits",
"serde",
"windows-link",
"windows-link 0.1.3",
]

[[package]]
Expand Down Expand Up @@ -6058,9 +6058,9 @@ dependencies = [

[[package]]
name = "wasi-preview1-component-adapter-provider"
version = "36.0.1"
version = "37.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20689c88791776219f78c2529700d15e6a9bd57a27858c62e9ef8487956b571c"
checksum = "8d0fcd636ad2b29a7c0490799a23ad61d1c8dedfafdb970447fddd0549502b60"

[[package]]
name = "wasm-bindgen"
Expand Down Expand Up @@ -6122,19 +6122,19 @@ dependencies = [

[[package]]
name = "wasm-component-ld"
version = "0.5.17"
version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c9208f87cac2332fd80dcf36d54e9163d3446e28301e0c6e424984425738984"
checksum = "11f565dfcfd9aabb10d865b608a92ce1f93051aeb56f4c89550ed9cd97d8ce0e"
dependencies = [
"anyhow",
"clap",
"lexopt",
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.239.0",
"wasmparser 0.240.0",
"wat",
"windows-sys 0.60.2",
"windows-sys 0.61.2",
"winsplit",
"wit-component",
"wit-parser",
Expand All @@ -6159,24 +6159,24 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.239.0"
version = "0.240.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5be00faa2b4950c76fe618c409d2c3ea5a3c9422013e079482d78544bb2d184c"
checksum = "06d642d8c5ecc083aafe9ceb32809276a304547a3a6eeecceb5d8152598bc71f"
dependencies = [
"leb128fmt",
"wasmparser 0.239.0",
"wasmparser 0.240.0",
]

[[package]]
name = "wasm-metadata"
version = "0.239.0"
version = "0.240.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20b3ec880a9ac69ccd92fbdbcf46ee833071cf09f82bb005b2327c7ae6025ae2"
checksum = "ee093e1e1ccffa005b9b778f7a10ccfd58e25a20eccad294a1a93168d076befb"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder 0.239.0",
"wasmparser 0.239.0",
"wasm-encoder 0.240.0",
"wasmparser 0.240.0",
]

[[package]]
Expand All @@ -6201,9 +6201,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.239.0"
version = "0.240.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c9d90bb93e764f6beabf1d02028c70a2156a6583e63ac4218dd07ef733368b0"
checksum = "b722dcf61e0ea47440b53ff83ccb5df8efec57a69d150e4f24882e4eba7e24a4"
dependencies = [
"bitflags",
"hashbrown",
Expand All @@ -6214,22 +6214,22 @@ dependencies = [

[[package]]
name = "wast"
version = "239.0.0"
version = "240.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9139176fe8a2590e0fb174cdcaf373b224cb93c3dde08e4297c1361d2ba1ea5d"
checksum = "b0efe1c93db4ac562b9733e3dca19ed7fc878dba29aef22245acf84f13da4a19"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width 0.2.1",
"wasm-encoder 0.239.0",
"wasm-encoder 0.240.0",
]

[[package]]
name = "wat"
version = "1.239.0"
version = "1.240.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e1c941927d34709f255558166f8901a2005f8ab4a9650432e9281b7cc6f3b75"
checksum = "4ec9b6eab7ecd4d639d78515e9ea491c9bacf494aa5eda10823bd35992cf8c1e"
dependencies = [
"wast",
]
Expand Down Expand Up @@ -6294,7 +6294,7 @@ dependencies = [
"windows-collections",
"windows-core 0.61.2",
"windows-future",
"windows-link",
"windows-link 0.1.3",
"windows-numerics",
]

Expand Down Expand Up @@ -6339,7 +6339,7 @@ checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
dependencies = [
"windows-implement 0.60.0",
"windows-interface 0.59.1",
"windows-link",
"windows-link 0.1.3",
"windows-result 0.3.4",
"windows-strings 0.4.2",
]
Expand All @@ -6351,7 +6351,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
dependencies = [
"windows-core 0.61.2",
"windows-link",
"windows-link 0.1.3",
"windows-threading",
]

Expand Down Expand Up @@ -6405,14 +6405,20 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"

[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"

[[package]]
name = "windows-numerics"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
dependencies = [
"windows-core 0.61.2",
"windows-link",
"windows-link 0.1.3",
]

[[package]]
Expand All @@ -6430,7 +6436,7 @@ version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
dependencies = [
"windows-link",
"windows-link 0.1.3",
]

[[package]]
Expand All @@ -6449,7 +6455,7 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
dependencies = [
"windows-link",
"windows-link 0.1.3",
]

[[package]]
Expand Down Expand Up @@ -6479,6 +6485,15 @@ dependencies = [
"windows-targets 0.53.3",
]

[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link 0.2.1",
]

[[package]]
name = "windows-targets"
version = "0.52.6"
Expand All @@ -6501,7 +6516,7 @@ version = "0.53.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
dependencies = [
"windows-link",
"windows-link 0.1.3",
"windows_aarch64_gnullvm 0.53.0",
"windows_aarch64_msvc 0.53.0",
"windows_i686_gnu 0.53.0",
Expand All @@ -6518,7 +6533,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
dependencies = [
"windows-link",
"windows-link 0.1.3",
]

[[package]]
Expand Down Expand Up @@ -6652,9 +6667,9 @@ dependencies = [

[[package]]
name = "wit-component"
version = "0.239.0"
version = "0.240.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88a866b19dba2c94d706ec58c92a4c62ab63e482b4c935d2a085ac94caecb136"
checksum = "7dc5474b078addc5fe8a72736de8da3acfb3ff324c2491133f8b59594afa1a20"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6663,17 +6678,17 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.239.0",
"wasm-encoder 0.240.0",
"wasm-metadata",
"wasmparser 0.239.0",
"wasmparser 0.240.0",
"wit-parser",
]

[[package]]
name = "wit-parser"
version = "0.239.0"
version = "0.240.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55c92c939d667b7bf0c6bf2d1f67196529758f99a2a45a3355cc56964fd5315d"
checksum = "9875ea3fa272f57cc1fc50f225a7b94021a7878c484b33792bccad0d93223439"
dependencies = [
"anyhow",
"id-arena",
Expand All @@ -6684,7 +6699,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser 0.239.0",
"wasmparser 0.240.0",
]

[[package]]
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_arena/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ impl<T> TypedArena<T> {
unsafe {
// Clear the last chunk, which is partially filled.
let mut chunks_borrow = self.chunks.borrow_mut();
if let Some(mut last_chunk) = chunks_borrow.last_mut() {
self.clear_last_chunk(&mut last_chunk);
if let Some(last_chunk) = chunks_borrow.last_mut() {
self.clear_last_chunk(last_chunk);
let len = chunks_borrow.len();
// If `T` is ZST, code below has no effect.
for mut chunk in chunks_borrow.drain(..len - 1) {
Expand Down
6 changes: 4 additions & 2 deletions compiler/rustc_codegen_cranelift/src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ pub(crate) fn codegen_const_value<'tcx>(
let base_addr = match fx.tcx.global_alloc(alloc_id) {
GlobalAlloc::Memory(alloc) => {
if alloc.inner().len() == 0 {
assert_eq!(offset, Size::ZERO);
fx.bcx.ins().iconst(fx.pointer_type, alloc.inner().align.bytes() as i64)
fx.bcx.ins().iconst(
fx.pointer_type,
alloc.inner().align.bytes().wrapping_add(offset.bytes()) as i64,
)
} else {
let data_id = data_id_for_alloc_id(
&mut fx.constants_cx,
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_gcc/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
// This avoids generating a zero-sized constant value and actually needing a
// real address at runtime.
if alloc.inner().len() == 0 {
assert_eq!(offset.bytes(), 0);
let val = self.const_usize(alloc.inner().align.bytes());
let val = self.const_usize(
alloc.inner().align.bytes().wrapping_add(offset.bytes()),
);
return if matches!(layout.primitive(), Pointer(_)) {
self.context.new_cast(None, val, ty)
} else {
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_llvm/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@ impl<'ll, 'tcx> ConstCodegenMethods for CodegenCx<'ll, 'tcx> {
// This avoids generating a zero-sized constant value and actually needing a
// real address at runtime.
if alloc.inner().len() == 0 {
assert_eq!(offset.bytes(), 0);
let llval = self.const_usize(alloc.inner().align.bytes());
let llval = self.const_usize(
alloc.inner().align.bytes().wrapping_add(offset.bytes()),
);
return if matches!(layout.primitive(), Pointer(_)) {
unsafe { llvm::LLVMConstIntToPtr(llval, llty) }
} else {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_fluent_macro/src/fluent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::Tok
Level::Error,
format!("referenced message `{mref}` does not exist (in message `{name}`)"),
)
.help(&format!("you may have meant to use a variable reference (`{{${mref}}}`)"))
.help(format!("you may have meant to use a variable reference (`{{${mref}}}`)"))
.emit();
}
}
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_graphviz/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ impl NodeLabels<&'static str> {
}

fn len(&self) -> usize {
match self {
&UnlabelledNodes(len) => len,
&AllNodesLabelled(ref lbls) => lbls.len(),
&SomeNodesLabelled(ref lbls) => lbls.len(),
match *self {
UnlabelledNodes(len) => len,
AllNodesLabelled(ref lbls) => lbls.len(),
SomeNodesLabelled(ref lbls) => lbls.len(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hashes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl FromStableHash for Hash64 {
type Hash = StableHasherHash;

#[inline]
fn from(StableHasherHash([_0, __1]): Self::Hash) -> Self {
fn from(StableHasherHash([_0, _]): Self::Hash) -> Self {
Self { inner: _0 }
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ fn main() {

// Include path contains host directory, replace it with target
if is_crossed && flag.starts_with("-I") {
cfg.flag(&flag.replace(&host, &target));
cfg.flag(flag.replace(&host, &target));
continue;
}

Expand Down
13 changes: 5 additions & 8 deletions compiler/rustc_log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl LoggerConfig {

/// Initialize the logger with the given values for the filter, coloring, and other options env variables.
pub fn init_logger(cfg: LoggerConfig) -> Result<(), Error> {
init_logger_with_additional_layer(cfg, || Registry::default())
init_logger_with_additional_layer(cfg, Registry::default)
}

/// Trait alias for the complex return type of `build_subscriber` in
Expand Down Expand Up @@ -145,14 +145,11 @@ where
.with_thread_ids(verbose_thread_ids)
.with_thread_names(verbose_thread_ids);

match cfg.wraptree {
Ok(v) => match v.parse::<usize>() {
Ok(v) => {
layer = layer.with_wraparound(v);
}
if let Ok(v) = cfg.wraptree {
match v.parse::<usize>() {
Ok(v) => layer = layer.with_wraparound(v),
Err(_) => return Err(Error::InvalidWraptree(v)),
},
Err(_) => {} // no wraptree
}
}

let subscriber = build_subscriber().with(layer.with_filter(filter));
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_thread_pool/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ impl WorkerThread {
latch: &L,
mut all_jobs_started: impl FnMut() -> bool,
mut is_job: impl FnMut(&JobRef) -> bool,
mut execute_job: impl FnMut(JobRef) -> (),
mut execute_job: impl FnMut(JobRef),
) {
let mut jobs = SmallVec::<[JobRef; 8]>::new();
let mut broadcast_jobs = SmallVec::<[JobRef; 8]>::new();
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_thread_pool/src/scope/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ fn the_final_countdown<'scope>(
let top_of_stack = 0;
let p = bottom_of_stack as *const i32 as usize;
let q = &top_of_stack as *const i32 as usize;
let diff = if p > q { p - q } else { q - p };
let diff = p.abs_diff(q);

let mut data = max.lock().unwrap();
*data = Ord::max(diff, *data);
Expand Down
Loading
Loading