diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index 8753897cb53d3..1516fa39e5892 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