Skip to content

Commit e77f4e6

Browse files
committed
Apply suggestions from PR review
1 parent 8fe1a3d commit e77f4e6

File tree

8 files changed

+72
-72
lines changed

8 files changed

+72
-72
lines changed

src/attributes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ r[attributes.syntax]
1717
>       [_DelimTokenTree_]\
1818
>    | `=` [_Expression_]
1919
20-
r[attributes.general]
20+
r[attributes.intro]
2121
An _attribute_ is a general, free-form metadatum that is interpreted according
2222
to name, convention, language, and compiler version. Attributes are modeled
2323
on Attributes in [ECMA-335], with the syntax coming from [ECMA-334] \(C#).
@@ -109,7 +109,7 @@ fn some_unused_variables() {
109109
r[attributes.meta]
110110

111111

112-
r[attributes.meta.general]
112+
r[attributes.meta.intro]
113113
A "meta item" is the syntax used for the _Attr_ rule by most [built-in
114114
attributes]. It has the following grammar:
115115

@@ -192,7 +192,7 @@ _MetaListNameValueStr_ | `link(name = "CoreFoundation", kind = "framework")`
192192

193193
r[attributes.activity]
194194

195-
r[attributes.activity.general]
195+
r[attributes.activity.intro]
196196
An attribute is either active or inert. During attribute processing, *active
197197
attributes* remove themselves from the thing they are on while *inert attributes*
198198
stay on.
@@ -205,7 +205,7 @@ active. All other attributes are inert.
205205

206206
r[attributes.tool]
207207

208-
r[attributes.tool.general]
208+
r[attributes.tool.intro]
209209
The compiler may allow attributes for external tools where each tool resides
210210
in its own module in the [tool prelude]. The first segment of the attribute
211211
path is the name of the tool, with one or more additional segments whose

src/attributes/codegen.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ have no effect on a trait function without a body.
2323

2424
r[attributes.codgen.inline]
2525

26-
r[attributes.codegen.inline.general]
26+
r[attributes.codegen.inline.intro]
2727
The *`inline` [attribute]* suggests that a copy of the attributed function
2828
should be placed in the caller, rather than generating code to call the
2929
function where it is defined.
@@ -64,7 +64,7 @@ assumed to exist.
6464
r[attributes.codegen.target_feature]
6565

6666

67-
r[attributes.codegen.target_feature.general]
67+
r[attributes.codegen.target_feature.intro]
6868
The *`target_feature` [attribute]* may be applied to a function to
6969
enable code generation of that function for specific platform architecture
7070
features. It uses the [_MetaListNameValueStr_] syntax with a single key of
@@ -76,17 +76,17 @@ features. It uses the [_MetaListNameValueStr_] syntax with a single key of
7676
unsafe fn foo_avx2() {}
7777
```
7878

79-
r[attributes.codegen.target_features.arch]
79+
r[attributes.codegen.target_feature.arch]
8080
Each [target architecture] has a set of features that may be enabled. It is an
8181
error to specify a feature for a target architecture that the crate is not
8282
being compiled for.
8383

84-
r[attributes.codegen.target_features.precondition]
84+
r[attributes.codegen.target_feature.precondition]
8585
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_features.restriction]
89+
r[attributes.codegen.target_feature.restriction-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.
@@ -361,7 +361,7 @@ otherwise undefined behavior results.
361361

362362
### Behavior
363363

364-
r[attributes.codegen.track_caller.behaviour]
364+
r[attributes.codegen.track_caller.behavior]
365365
Applying the attribute to a function `f` allows code within `f` to get a hint of the [`Location`] of
366366
the "topmost" tracked call that led to `f`'s invocation. At the point of observation, an
367367
implementation behaves as if it walks up the stack from `f`'s frame to find the nearest frame of an
@@ -443,7 +443,7 @@ And so on.
443443

444444
r[attributes.codegen.track_caller.limits]
445445

446-
r[attributes.codegent.track_caller.hint]
446+
r[attributes.codegen.track_caller.hint]
447447
This information is a hint and implementations are not required to preserve it.
448448

449449
r[attributes.codegen.track_caller.decay]

src/attributes/debugger.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The following [attributes] are used for enhancing the debugging experience when
88

99
r[attributes.debugger.debugger_visualizer]
1010

11-
r[attributes.debugger.debugger_visualizer.general]
11+
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

@@ -19,14 +19,14 @@ It uses the [_MetaListNameValueStr_] syntax to specify its inputs, and must be s
1919

2020
r[attributes.debugger.debugger_visualizer.natvis]
2121

22-
r[attributes.debugger.debugger_visualizer.natvis-general]
22+
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.restrictions]
2727
This attribute only supports embedding Natvis files on `-windows-msvc` targets.
2828

29-
r[attributes.debugger.debugger_visualizer.natvis-path]
29+
r[attributes.debugger.debugger_visualizer.natvis.path]
3030
The path to the Natvis file is specified with the `natvis_file` key, which is a path relative to the crate source file:
3131

3232
<!-- ignore: requires external files, and msvc -->
@@ -87,7 +87,7 @@ When viewed under WinDbg, the `fancy_rect` variable would be shown as follows:
8787
r[attributes.debugger.debugger_visualizer.gdb]
8888

8989

90-
r[attributes.debugger.debugger_visualizer.gdb-pretty]
90+
r[attributes.debugger.debugger_visualizer.gdb.pretty]
9191
GDB supports the use of a structured Python script, called a *pretty printer*, that describes how a type should be visualized in the debugger view.
9292
For detailed information on pretty printers, refer to GDB's [pretty printing documentation].
9393

@@ -97,7 +97,7 @@ There are two ways to enable auto-loading embedded pretty printers:
9797
For more information, see GDB's [auto-loading documentation].
9898
1. Create a file named `gdbinit` under `$HOME/.config/gdb` (you may need to create the directory if it doesn't already exist). Add the following line to that file: `add-auto-load-safe-path path/to/binary`.
9999

100-
r[attributes.debugger.debugger_visualizer.gdb-path]
100+
r[attributes.debugger.debugger_visualizer.gdb.path]
101101
These scripts are embedded using the `gdb_script_file` key, which is a path relative to the crate source file.
102102

103103
<!-- ignore: requires external files -->
@@ -162,7 +162,7 @@ When the crate's debug executable is passed into GDB[^rust-gdb], `print bob` wil
162162
r[attributes.debugger.collapse_debuginfo]
163163

164164

165-
r[attributes.debugger.collapse_debuginfo.general]
165+
r[attributes.debugger.collapse_debuginfo.intro]
166166
The *`collapse_debuginfo` [attribute]* controls whether code locations from a macro definition are collapsed into a single location associated with the macro's call site,
167167
when generating debuginfo for code calling this macro.
168168

src/attributes/derive.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
r[attributes.derive]
44

55

6-
r[attributes.derived.general]
6+
r[attributes.derive.intro]
77
The *`derive` attribute* allows new [items] to be automatically generated for
88
data structures.
99

0 commit comments

Comments
 (0)