Skip to content

Commit d3ef277

Browse files
committed
Replace uses of constraint and restriction in attributes chapters.
1 parent aa93e94 commit d3ef277

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/attributes/codegen.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ It is [undefined behavior] to call a function that is compiled with a feature
8686
that is not supported on the current platform the code is running on, *except*
8787
if the platform explicitly documents this to be safe.
8888

89-
r[attributes.codegen.target_feature.restriction-inline]
89+
r[attributes.codegen.target_feature.inline]
9090
Functions marked with `target_feature` are not inlined into a context that
9191
does not support the given features. The `#[inline(always)]` attribute may not
9292
be used with a `target_feature` attribute.

src/attributes/debugger.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ r[attributes.debugger.debugger_visualizer.intro]
1212
The *`debugger_visualizer` attribute* can be used to embed a debugger visualizer file into the debug information.
1313
This enables an improved debugger experience for displaying values in the debugger.
1414

15-
r[attributes.debugger.debugger_visualizer.restriction]
15+
r[attributes.debugger.debugger_visualizer.syntax]
1616
It uses the [_MetaListNameValueStr_] syntax to specify its inputs, and must be specified as a crate attribute.
1717

1818
### Using `debugger_visualizer` with Natvis
@@ -23,7 +23,7 @@ r[attributes.debugger.debugger_visualizer.natvis.intro]
2323
Natvis is an XML-based framework for Microsoft debuggers (such as Visual Studio and WinDbg) that uses declarative rules to customize the display of types.
2424
For detailed information on the Natvis format, refer to Microsoft's [Natvis documentation].
2525

26-
r[attributes.debugger.debugger_visualizer.natvis.restrictions]
26+
r[attributes.debugger.debugger_visualizer.natvis.msvc]
2727
This attribute only supports embedding Natvis files on `-windows-msvc` targets.
2828

2929
r[attributes.debugger.debugger_visualizer.natvis.path]

src/attributes/diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ r[attributes.diagnostic.on_unimplemented]
486486
r[attributes.diagnostic.on_unimplemented.intro]
487487
The `#[diagnostic::on_unimplemented]` attribute is a hint to the compiler to supplement the error message that would normally be generated in scenarios where a trait is required but not implemented on a type.
488488
489-
r[attributes.diagnostic.on_unimplemented.restriction]
489+
r[attributes.diagnostic.on_unimplemented.application]
490490
The attribute should be placed on a [trait declaration], though it is not an error to be located in other positions.
491491
492492
r[attributes.diagnostic.on_unimplemented.syntax]

src/attributes/limits.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ r[attributes.limits.type_length_limit.intro]
5353
The *`type_length_limit` attribute* limits the maximum number of type
5454
substitutions made when constructing a concrete type during monomorphization.
5555

56-
r[attributes.limits.type_length_limit.restriction]
56+
r[attributes.limits.type_length_limit.syntax]
5757
It is applied at the [crate] level, and uses the [_MetaNameValueStr_] syntax
5858
to set the limit based on the number of type substitutions.
5959

src/attributes/testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The *`test` attribute* marks a function to be executed as a test.
1818
r[attributes.testing.test.enabled]
1919
These functions are only compiled when in test mode.
2020

21-
r[attributes.testing.test.restriction]
21+
r[attributes.testing.test.target]
2222
Test functions must be free, monomorphic functions that take no arguments, and the return type must implement the [`Termination`] trait, for example:
2323

2424
* `()`
@@ -80,7 +80,7 @@ fn mytest() {
8080

8181
r[attributes.testing.should_panic]
8282

83-
r[attributes.testing.should_panic.restriction]
83+
r[attributes.testing.should_panic.target]
8484
A function annotated with the `test` attribute that returns `()` can also be
8585
annotated with the `should_panic` attribute.
8686

src/attributes/type_system.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ r[attributes.type-system.non_exhaustive.intro]
1313
The *`non_exhaustive` attribute* indicates that a type or variant may have
1414
more fields or variants added in the future.
1515

16-
r[attributes.type-system.non_exhaustive.restriction]
16+
r[attributes.type-system.non_exhaustive.application]
1717
It can be applied to [`struct`s][struct], [`enum`s][enum], and `enum` variants.
1818

1919
r[attributes.type-system.non_exhaustive.syntax]

0 commit comments

Comments
 (0)