Skip to content

Commit 4c03dc2

Browse files
committed
add note about unsafe attributes that downstream code needs to discharge
1 parent eea3c83 commit 4c03dc2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

text/0000-unsafe-attributes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,9 @@ attributes.
200200
to consistently support non-builtin unsafe attributes in the future, so the
201201
RFC proposes to not do that yet. The current approach is forward-compatible
202202
with allowing lists and nesting in the future.
203+
- **Unsafe crates.** Some attributes' requirements cannot be fully discharged
204+
locally. For instance, if a lib crate uses `no_mangle`, this really puts a
205+
burden on *the author of the final binary* to ensure that the symbol dos not
206+
conflict. In the future it would be better if rust tooling could automatically
207+
surface a such requirements to downstream code, for example by an automatic
208+
"unsafe attributes used" listing in a crate's generated rustdoc.

0 commit comments

Comments
 (0)