Skip to content

Commit 2334513

Browse files
committed
Add attributes.codegen.inline.externally-exported
This rule did not seem to be covered elsewhere. I'm not 100% positive this is the best way to document this, but I think it is accurate. This is implemented in https://github.com/rust-lang/rust/blob/5526a2f47cd676ceeedc08cf71ae75ce2e9284ae/compiler/rustc_passes/src/check_attr.rs#L482-L497
1 parent 2ccd26e commit 2334513

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/attributes/codegen.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ There are three ways to use the inline attribute:
6565
r[attributes.codegen.inline.trait]
6666
When `inline` is applied to a function in a [trait definition], it applies only to that function when used as a default function for a trait implementation and not to all trait implementations.
6767

68+
r[attributes.codegen.inline.externally-exported]
69+
The `inline` attribute is ignored if the function is externally exported. This may happen with the [`no_mangle`] or [`export_name`] attribute.
70+
6871
r[attributes.codegen.cold]
6972
### The `cold` attribute
7073

0 commit comments

Comments
 (0)