File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ Built-in Attributes
157157 | TestContent
158158 | TrackCallerContent
159159 | TypeLengthLimitContent
160+ | UnsafeContent
160161 | UsedContent
161162 | WindowsSubsystemContent
162163
@@ -226,6 +227,9 @@ The following :t:`[built-in attribute]s` are :dt:`[diagnostics attribute]s`:
226227* :dp: `fls_NrTL2FruARAv `
227228 :t: `Attribute ` ``expect ``.
228229
230+ * :dp: `fls_4d2ArC50kNWL `
231+ :t: `Attribute ` ``unsafe ``.
232+
229233:dp: `fls_3fxhz0olhbcy `
230234The following :t: `[built-in attribute]s ` are :dt: `[documentation attribute]s `:
231235
@@ -1358,6 +1362,45 @@ related :t:`type`.
13581362 second_field: i8
13591363 }
13601364
1365+ .. _fls_19LnTi3WabFd :
1366+
1367+ Attribute ``unsafe ``
1368+ ^^^^^^^^^^^^^^^^^^^^
1369+
1370+ .. rubric :: Syntax
1371+
1372+ .. syntax ::
1373+
1374+ UnsafeContent ::=
1375+ $$unsafe$$ $$($$ BuiltinAttributeContent $$)$$
1376+
1377+ .. rubric :: Legality Rules
1378+
1379+ :dp: `fls_5pjo3nGOxbVw `
1380+ :t: `Attribute ` :c: `unsafe ` shall apply to what the contained :t: `attribute ` applies to.
1381+
1382+ :dp: `fls_gpxlWbQUNsj8 `
1383+ :t: `Attribute ` :c: `unsafe ` behaves like the contained :t: `attribute `.
1384+
1385+ :dp: `fls_PhrfxSBvXTPV `
1386+ The contained :t: `attribute ` shall be one of:
1387+
1388+ * :dp: `fls_pCSew95bKJJ5 `
1389+ :t: `attribute ` :c: `no_mangle `,
1390+
1391+ :dp: `fls_NRLgmOXxuljQ `
1392+ :t: `attribute ` :c: `export_name `, or
1393+
1394+ :dp: `fls_ykpxNByUDyHG `
1395+ :t: `attribute ` :c: `link_section `,
1396+
1397+ .. rubric :: Examples
1398+
1399+ .. code-block :: rust
1400+
1401+ #[unsafe(no_mangle)]
1402+ pub fn clear_name() {}
1403+
13611404 .. _fls_7skf24auayqy :
13621405
13631406Attribute ``used ``
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ Language changes in Rust 1.82.0
7474
7575* `Stabilize explicit opt-in to unsafe attributes <https://github.com/rust-lang/rust/pull/128771 >`_
7676
77+ * New section: :ref: `fls_19LnTi3WabFd `
78+
7779* `Document NaN bit patterns guarantees <https://github.com/rust-lang/rust/pull/129559 >`_
7880
7981 * New paragraph: :p: `fls_nuFAwLHOdQBx `
You can’t perform that action at this time.
0 commit comments