diff --git a/RELEASES.md b/RELEASES.md
index 74b574924489c..10a400fda5c32 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1,7 +1,7 @@
-Version 1.93 (2026-01-22)
+Version 1.93.0 (2026-01-22)
==========================
-
+
Language
--------
@@ -16,13 +16,13 @@ Language
- [Add warn-by-default `function_casts_as_integer` lint](https://github.com/rust-lang/rust/pull/141470)
-
+
Compiler
--------
- [Stabilize `-Cjump-tables=bool`](https://github.com/rust-lang/rust/pull/145974). The flag was previously called `-Zno-jump-tables`.
-
+
Platform Support
----------------
@@ -34,7 +34,7 @@ for more information on Rust's tiered platform support.
[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
-
+
Libraries
---------
@@ -44,7 +44,7 @@ Libraries
- [Don't require `T: RefUnwindSafe` for `vec::IntoIter: UnwindSafe`](https://github.com/rust-lang/rust/pull/145665)
-
+
Stabilized APIs
---------------
@@ -74,7 +74,7 @@ Stabilized APIs
- [`std::fmt::FromFn`](https://doc.rust-lang.org/stable/std/fmt/struct.FromFn.html)
-
+
Cargo
-----
@@ -82,7 +82,7 @@ Cargo
- [In `cargo tree`, support long forms for `--format` variables](https://github.com/rust-lang/cargo/pull/16204/)
- [Add `--workspace` to `cargo clean`](https://github.com/rust-lang/cargo/pull/16263/)
-
+
Rustdoc
-----
@@ -92,7 +92,7 @@ Rustdoc
- [Validate usage of crate-level doc attributes](https://github.com/rust-lang/rust/pull/149197). This means if any of `html_favicon_url`, `html_logo_url`, `html_playground_url`, `issue_tracker_base_url`, or `html_no_source` either has a missing value, an unexpected value, or a value of the wrong type, rustdoc will emit the deny-by-default lint `rustdoc::invalid_doc_attributes`.
-
+
Compatibility Notes
-------------------
diff --git a/compiler/rustc_ast_lowering/src/delegation.rs b/compiler/rustc_ast_lowering/src/delegation.rs
index 5d2531e50393e..cccfb112ec2b7 100644
--- a/compiler/rustc_ast_lowering/src/delegation.rs
+++ b/compiler/rustc_ast_lowering/src/delegation.rs
@@ -152,10 +152,21 @@ impl<'hir> LoweringContext<'_, 'hir> {
) -> DelegationResults<'hir> {
let span = self.lower_span(delegation.path.segments.last().unwrap().ident.span);
- let ids = self.get_delegation_ids(
- self.resolver.delegation_infos[&self.local_def_id(item_id)].resolution_node,
- span,
- );
+ // Delegation can be unresolved in illegal places such as function bodies in extern blocks (see #151356)
+ let ids = if let Some(delegation_info) =
+ self.resolver.delegation_infos.get(&self.local_def_id(item_id))
+ {
+ self.get_delegation_ids(delegation_info.resolution_node, span)
+ } else {
+ return self.generate_delegation_error(
+ self.dcx().span_delayed_bug(
+ span,
+ format!("LoweringContext: the delegation {:?} is unresolved", item_id),
+ ),
+ span,
+ delegation,
+ );
+ };
match ids {
Ok(ids) => {
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 557ae7b0333e3..9379faf1156fc 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -1788,6 +1788,9 @@ impl<'a, 'll, 'tcx> Builder<'a, 'll, 'tcx> {
}
if crate::llvm_util::get_version() >= (22, 0, 0) {
+ // LLVM 22 requires the lifetime intrinsic to act directly on the alloca,
+ // there can't be an addrspacecast in between.
+ let ptr = unsafe { llvm::LLVMRustStripPointerCasts(ptr) };
self.call_intrinsic(intrinsic, &[self.val_ty(ptr)], &[ptr]);
} else {
self.call_intrinsic(intrinsic, &[self.val_ty(ptr)], &[self.cx.const_u64(size), ptr]);
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index 4b2544b7efdf8..4328b15c73f30 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -215,6 +215,11 @@ pub(crate) unsafe fn create_module<'ll>(
// LLVM 22 updated the ABI alignment for double on AIX: https://github.com/llvm/llvm-project/pull/144673
target_data_layout = target_data_layout.replace("-f64:32:64", "");
}
+ if sess.target.arch == Arch::AmdGpu {
+ // LLVM 22 specified ELF mangling in the amdgpu data layout:
+ // https://github.com/llvm/llvm-project/pull/163011
+ target_data_layout = target_data_layout.replace("-m:e", "");
+ }
}
// Ensure the data-layout values hardcoded remain the defaults.
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index c535fade9c040..a3d4e9f9d32a2 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1967,6 +1967,7 @@ unsafe extern "C" {
Metadata: &'a Metadata,
);
pub(crate) fn LLVMRustIsNonGVFunctionPointerTy(Val: &Value) -> bool;
+ pub(crate) fn LLVMRustStripPointerCasts<'a>(Val: &'a Value) -> &'a Value;
// Operations on scalar constants
pub(crate) fn LLVMRustConstIntGetZExtValue(ConstantVal: &ConstantInt, Value: &mut u64) -> bool;
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index 63f820dc29184..fbb582fe86018 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -287,12 +287,12 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option Some(LLVMFeature::new("cx16")),
"lahfsahf" => Some(LLVMFeature::new("sahf")),
// Enable the evex512 target feature if an avx512 target feature is enabled.
- s if s.starts_with("avx512") => Some(LLVMFeature::with_dependencies(
+ s if s.starts_with("avx512") && major < 22 => Some(LLVMFeature::with_dependencies(
s,
smallvec![TargetFeatureFoldStrength::EnableOnly("evex512")],
)),
- "avx10.1" => Some(LLVMFeature::new("avx10.1-512")),
- "avx10.2" => Some(LLVMFeature::new("avx10.2-512")),
+ "avx10.1" if major < 22 => Some(LLVMFeature::new("avx10.1-512")),
+ "avx10.2" if major < 22 => Some(LLVMFeature::new("avx10.2-512")),
"apxf" => Some(LLVMFeature::with_dependencies(
"egpr",
smallvec![
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 336d589740362..599f79d011989 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1760,6 +1760,10 @@ extern "C" bool LLVMRustIsNonGVFunctionPointerTy(LLVMValueRef V) {
return false;
}
+extern "C" LLVMValueRef LLVMRustStripPointerCasts(LLVMValueRef V) {
+ return wrap(unwrap(V)->stripPointerCasts());
+}
+
extern "C" bool LLVMRustLLVMHasZlibCompression() {
return llvm::compression::zlib::isAvailable();
}
diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs
index 651f073efb828..003841f3af3fd 100644
--- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs
@@ -659,7 +659,7 @@ where
}
// `rustc_transmute` does not have support for type or const params
- if goal.has_non_region_placeholders() {
+ if goal.predicate.has_non_region_placeholders() {
return Err(NoSolution);
}
diff --git a/compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs b/compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs
index 828d853ac65ec..d6a2cfc2aab55 100644
--- a/compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs
+++ b/compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs
@@ -5,7 +5,7 @@ use crate::spec::{
pub(crate) fn target() -> Target {
Target {
arch: Arch::AmdGpu,
- data_layout: "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9".into(),
+ data_layout: "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9".into(),
llvm_target: "amdgcn-amd-amdhsa".into(),
metadata: TargetMetadata {
description: Some("AMD GPU".into()),
diff --git a/library/std/src/sys/io/error/windows.rs b/library/std/src/sys/io/error/windows.rs
index e02197ac67756..d7607082a30a0 100644
--- a/library/std/src/sys/io/error/windows.rs
+++ b/library/std/src/sys/io/error/windows.rs
@@ -126,7 +126,7 @@ pub fn error_string(mut errnum: i32) -> String {
match String::from_utf16(&buf[..res]) {
Ok(mut msg) => {
// Trim trailing CRLF inserted by FormatMessageW
- let len = msg.trim_end().len();
+ let len = msg.trim_ascii_end().len();
msg.truncate(len);
msg
}
diff --git a/library/std/src/sys/process/windows.rs b/library/std/src/sys/process/windows.rs
index dba647c502d18..b40833ad212c4 100644
--- a/library/std/src/sys/process/windows.rs
+++ b/library/std/src/sys/process/windows.rs
@@ -818,7 +818,7 @@ impl From for ExitCode {
impl From for ExitCode {
fn from(code: u32) -> Self {
- ExitCode(u32::from(code))
+ ExitCode(code)
}
}
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index ad7ef9b453cec..486ca9b22539c 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -20,6 +20,7 @@
--src-sidebar-width: 300px;
--desktop-sidebar-z-index: 100;
--sidebar-elems-left-padding: 24px;
+ --popover-top-margin: 7px;
/* clipboard */
--clipboard-image: url('data:image/svg+xml,