about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-08-12 16:20:24 +0000
committerbors <bors@rust-lang.org>2025-08-12 16:20:24 +0000
commita493e276b5db66a87ba749deebc96714a624f00e (patch)
treeb6bd913bf2732906877c3b5fd972705918f79e6b
parent12087f1d097d8ee3acdb388833e375b8e0f00b4e (diff)
parent68c1574f5fcf8a5bfb18354fd0ba7d252bb0a888 (diff)
downloadrust-a493e276b5db66a87ba749deebc96714a624f00e.tar.gz
rust-a493e276b5db66a87ba749deebc96714a624f00e.zip
Auto merge of #144678 - jdonszelmann:no-mangle-extern, r=bjorn3
Make no_mangle on foreign items explicit instead of implicit

for a followup PR I'm working on I need some foreign items to mangle. I could add a new attribute: `no_no_mangle` or something silly like that but by explicitly putting `no_mangle` in the codegen fn attrs of foreign items we can default it to `no_mangle` and then easily remove it when we don't want it.

I guess you'd know about this r? `@bjorn3.` Shouldn't be too hard to review :)

Builds on rust-lang/rust#144655 which should merge first.
-rw-r--r--clippy_lints/src/missing_inline.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs
index d02952eb487..b16924babd1 100644
--- a/clippy_lints/src/missing_inline.rs
+++ b/clippy_lints/src/missing_inline.rs
@@ -190,5 +190,5 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
 /// and a rustc warning would be triggered, see #15301
 fn fn_is_externally_exported(cx: &LateContext<'_>, def_id: DefId) -> bool {
     let attrs = cx.tcx.codegen_fn_attrs(def_id);
-    attrs.contains_extern_indicator()
+    attrs.contains_extern_indicator(cx.tcx, def_id)
 }