diff --git a/Cargo.lock b/Cargo.lock
index 636f07cf41e21..755e1a643cc2d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -291,6 +291,12 @@ version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
[[package]]
name = "basic-toml"
version = "0.1.10"
@@ -1753,6 +1759,12 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
+[[package]]
+name = "hifijson"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "242402749acf71e6f32f5857598b7002c4058a4e3c3b22b4c7d51cab9aea754e"
+
[[package]]
name = "home"
version = "0.5.12"
@@ -2132,6 +2144,54 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+[[package]]
+name = "jaq-core"
+version = "3.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7561783b20275a6c9cb576e39208b0c635f34ef14357f1f05a2927a774f3adec"
+dependencies = [
+ "dyn-clone",
+ "once_cell",
+ "typed-arena",
+]
+
+[[package]]
+name = "jaq-json"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d4ec9aaad7340e6990c6c1878ef3b46dbec624e535d7f786cc9ddcf94f773d33"
+dependencies = [
+ "bstr",
+ "bytes",
+ "foldhash 0.1.5",
+ "hifijson",
+ "indexmap",
+ "jaq-core",
+ "jaq-std",
+ "num-bigint",
+ "num-traits",
+ "ryu",
+ "self_cell",
+ "serde_core",
+]
+
+[[package]]
+name = "jaq-std"
+version = "3.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8bdc5a74b0feeb5e6a1dc2dd08c34280a61e37668d10a6a3b27ad69d0fb9ce2e"
+dependencies = [
+ "aho-corasick",
+ "base64 0.22.1",
+ "bstr",
+ "jaq-core",
+ "jiff",
+ "libm",
+ "log",
+ "regex-bites",
+ "urlencoding",
+]
+
[[package]]
name = "jiff"
version = "0.2.16"
@@ -2139,10 +2199,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35"
dependencies = [
"jiff-static",
+ "jiff-tzdb-platform",
"log",
"portable-atomic",
"portable-atomic-util",
"serde_core",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -2156,6 +2218,21 @@ dependencies = [
"syn",
]
+[[package]]
+name = "jiff-tzdb"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c900ef84826f1338a557697dc8fc601df9ca9af4ac137c7fb61d4c6f2dfd3076"
+
+[[package]]
+name = "jiff-tzdb-platform"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8"
+dependencies = [
+ "jiff-tzdb",
+]
+
[[package]]
name = "jobserver"
version = "0.1.34"
@@ -2182,6 +2259,9 @@ version = "0.1.0"
dependencies = [
"fs-err",
"getopts",
+ "jaq-core",
+ "jaq-json",
+ "jaq-std",
"jsonpath-rust",
"regex",
"serde_json",
@@ -3382,6 +3462,12 @@ dependencies = [
"regex-syntax",
]
+[[package]]
+name = "regex-bites"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6a15a2fa0bfda9361941c45550896ae87b15cc6c8c939ea350079670332e211"
+
[[package]]
name = "regex-lite"
version = "0.1.8"
@@ -4916,7 +5002,7 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"askama",
- "base64",
+ "base64 0.21.7",
"expect-test",
"indexmap",
"itertools 0.15.0",
@@ -5912,6 +5998,12 @@ dependencies = [
"rustc-hash 2.1.1",
]
+[[package]]
+name = "typed-arena"
+version = "2.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
+
[[package]]
name = "typeid"
version = "1.0.3"
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index d54b9385f7f6d..4fbc311fcfb1e 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -2916,7 +2916,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
// Do not use lower_anon_const_to_const_arg, as that attempts to represent the body
// directly. Instead, force an anon const.
let def_id = self.local_def_id(anon_const.id);
- assert_eq!(DefKind::InlineConst, self.tcx.def_kind(def_id));
+ assert_eq!(DefKind::AnonConst, self.tcx.def_kind(def_id));
let lowered_anon = self.lower_anon_const_to_anon_const(anon_const, span);
ConstArg {
hir_id: self.lower_node_id(node_id),
diff --git a/compiler/rustc_borrowck/src/type_check/mod.rs b/compiler/rustc_borrowck/src/type_check/mod.rs
index 33c45ebfdde4c..6de1588e74f1f 100644
--- a/compiler/rustc_borrowck/src/type_check/mod.rs
+++ b/compiler/rustc_borrowck/src/type_check/mod.rs
@@ -1709,7 +1709,9 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
if uv.promoted.is_none() {
let tcx = self.tcx();
let def_id = uv.def;
- if tcx.def_kind(def_id) == DefKind::InlineConst {
+ if tcx.def_kind(def_id) == DefKind::AnonConst
+ && tcx.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline
+ {
let def_id = def_id.expect_local();
let predicates = self.prove_closure_bounds(tcx, def_id, uv.args, location);
self.normalize_and_prove_instantiated_predicates(
@@ -2653,7 +2655,11 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
// length as the `typeck_root_args`.
&args[..typeck_root_args.len()]
}
- DefKind::InlineConst => args.as_inline_const().parent_args(),
+ DefKind::AnonConst
+ if tcx.anon_const_kind(def_id) == ty::AnonConstKind::NonTypeSystemInline =>
+ {
+ args.as_inline_const().parent_args()
+ }
other => bug!("unexpected item {:?}", other),
};
let parent_args = tcx.mk_args(parent_args);
diff --git a/compiler/rustc_borrowck/src/universal_regions.rs b/compiler/rustc_borrowck/src/universal_regions.rs
index b0adbcd6db4ef..8999ccb42f388 100644
--- a/compiler/rustc_borrowck/src/universal_regions.rs
+++ b/compiler/rustc_borrowck/src/universal_regions.rs
@@ -615,7 +615,10 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
BodyOwnerKind::Const { .. } | BodyOwnerKind::Static(..) => {
match tcx.def_kind(self.mir_def) {
- DefKind::InlineConst if !tcx.is_type_system_inline_const(self.mir_def) => {
+ DefKind::AnonConst
+ if tcx.anon_const_kind(self.mir_def)
+ == ty::AnonConstKind::NonTypeSystemInline =>
+ {
// This is required for `AscribeUserType` canonical query, which will call
// `type_of(inline_const_def_id)`. That `type_of` would inject erased lifetimes
// into borrowck, which is ICE #78174.
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index e56bc8ed7e82a..45c9495570ed2 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -26,7 +26,7 @@ use rustc_lint_defs::builtin::LINKER_INFO;
use rustc_macros::Diagnostic;
use rustc_metadata::fs::{METADATA_FILENAME, copy_to_stdout, emit_wrapper_file};
use rustc_metadata::{
- EncodedMetadata, NativeLibSearchFallback, find_native_static_library,
+ EncodedMetadata, NativeLibSearchFallback, find_bundled_library, find_native_static_library,
walk_native_lib_search_dirs,
};
use rustc_middle::bug;
@@ -396,8 +396,25 @@ fn link_rlib<'a>(
.map(|obj| obj.file_name().unwrap().to_str().unwrap().to_string())
.collect();
+ let native_lib_filenames: Vec