about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/native_libs.rs
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2024-10-08 14:25:39 +0300
committerLaurențiu Nicola <lnicola@dend.ro>2024-10-08 14:25:39 +0300
commit4316afffd9390bdac1d3bd5e5398c65d6e9bb150 (patch)
tree9d5b39941405bec4b7c4571606df8b88850325e9 /compiler/rustc_metadata/src/native_libs.rs
parent537fb8d1bb2405b118898c663bc076815a1762c7 (diff)
parentcf24c73141a77db730f4b7fda69dcd7e8b113b51 (diff)
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_metadata/src/native_libs.rs')
-rw-r--r--compiler/rustc_metadata/src/native_libs.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_metadata/src/native_libs.rs b/compiler/rustc_metadata/src/native_libs.rs
index 82b907d2501..c7953d50406 100644
--- a/compiler/rustc_metadata/src/native_libs.rs
+++ b/compiler/rustc_metadata/src/native_libs.rs
@@ -1,7 +1,7 @@
 use std::ops::ControlFlow;
 use std::path::{Path, PathBuf};
 
-use rustc_ast::{CRATE_NODE_ID, NestedMetaItem};
+use rustc_ast::CRATE_NODE_ID;
 use rustc_attr as attr;
 use rustc_data_structures::fx::FxHashSet;
 use rustc_middle::query::LocalCrate;
@@ -304,7 +304,12 @@ impl<'tcx> Collector<'tcx> {
                             sess.dcx().emit_err(errors::LinkCfgForm { span: item.span() });
                             continue;
                         };
-                        let [NestedMetaItem::MetaItem(link_cfg)] = link_cfg else {
+                        let [link_cfg] = link_cfg else {
+                            sess.dcx()
+                                .emit_err(errors::LinkCfgSinglePredicate { span: item.span() });
+                            continue;
+                        };
+                        let Some(link_cfg) = link_cfg.meta_item_or_bool() else {
                             sess.dcx()
                                 .emit_err(errors::LinkCfgSinglePredicate { span: item.span() });
                             continue;