Skip to content

Commit 9e36c42

Browse files
committed
.
1 parent 0f934fd commit 9e36c42

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

text/0000-export-visibility.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,17 @@ and
285285
[`#[export_name = ...]`](https://doc.rust-lang.org/reference/abi.html#the-export_name-attribute)
286286
attributes provides a similar level of details.)
287287

288-
> **Note**: The proposal in this RFC has been prototyped in
289-
> https://github.com/anforowicz/rust/tree/export-visibility
288+
A few additional notes attempt to clarify the intended behavior of the proposed
289+
behavior beyond what is described in the guide-level explanation above:
290+
291+
* The `#[export_visibility = ...]` attribute may only be applied to item
292+
definitions with an "extern" indicator as checked by
293+
[`fn contains_extern_indicator`](https://github.com/rust-lang/rust/blob/3bc767e1a215c4bf8f099b32e84edb85780591b1/compiler/rustc_middle/src/middle/codegen_fn_attrs.rs#L174-L184).
294+
Therefore it may only be applied to items to which
295+
`#[no_mangle]`, `#[export_name = ...]`, and similar already-existing
296+
attributes may be already applied.
297+
* The proposal in this RFC has been prototyped in
298+
https://github.com/anforowicz/rust/tree/export-visibility
290299

291300
# Drawbacks
292301
[drawbacks]: #drawbacks

0 commit comments

Comments
 (0)