@@ -204,79 +204,79 @@ pub fn f() {}
204
204
The following is an index of all built-in attributes.
205
205
206
206
- Conditional compilation
207
- - [ ` cfg ` ] — Controls conditional compilation.
208
- - [ ` cfg_attr ` ] — Conditionally includes attributes.
207
+ - [ ` cfg ` ] --- Controls conditional compilation.
208
+ - [ ` cfg_attr ` ] --- Conditionally includes attributes.
209
209
- Testing
210
- - [ ` test ` ] — Marks a function as a test.
211
- - [ ` ignore ` ] — Disables a test function.
212
- - [ ` should_panic ` ] — Indicates a test should generate a panic.
210
+ - [ ` test ` ] --- Marks a function as a test.
211
+ - [ ` ignore ` ] --- Disables a test function.
212
+ - [ ` should_panic ` ] --- Indicates a test should generate a panic.
213
213
- Derive
214
- - [ ` derive ` ] — Automatic trait implementations.
215
- - [ ` automatically_derived ` ] — Marker for implementations created by
214
+ - [ ` derive ` ] --- Automatic trait implementations.
215
+ - [ ` automatically_derived ` ] --- Marker for implementations created by
216
216
` derive ` .
217
217
- Macros
218
- - [ ` macro_export ` ] — Exports a ` macro_rules ` macro for cross-crate usage.
219
- - [ ` macro_use ` ] — Expands macro visibility, or imports macros from other
218
+ - [ ` macro_export ` ] --- Exports a ` macro_rules ` macro for cross-crate usage.
219
+ - [ ` macro_use ` ] --- Expands macro visibility, or imports macros from other
220
220
crates.
221
- - [ ` proc_macro ` ] — Defines a function-like macro.
222
- - [ ` proc_macro_derive ` ] — Defines a derive macro.
223
- - [ ` proc_macro_attribute ` ] — Defines an attribute macro.
221
+ - [ ` proc_macro ` ] --- Defines a function-like macro.
222
+ - [ ` proc_macro_derive ` ] --- Defines a derive macro.
223
+ - [ ` proc_macro_attribute ` ] --- Defines an attribute macro.
224
224
- Diagnostics
225
- - [ ` allow ` ] , [ ` expect ` ] , [ ` warn ` ] , [ ` deny ` ] , [ ` forbid ` ] — Alters the default lint level.
226
- - [ ` deprecated ` ] — Generates deprecation notices.
227
- - [ ` must_use ` ] — Generates a lint for unused values.
228
- - [ ` diagnostic::on_unimplemented ` ] — Hints the compiler to emit a certain error
225
+ - [ ` allow ` ] , [ ` expect ` ] , [ ` warn ` ] , [ ` deny ` ] , [ ` forbid ` ] --- Alters the default lint level.
226
+ - [ ` deprecated ` ] --- Generates deprecation notices.
227
+ - [ ` must_use ` ] --- Generates a lint for unused values.
228
+ - [ ` diagnostic::on_unimplemented ` ] --- Hints the compiler to emit a certain error
229
229
message if a trait is not implemented.
230
230
- ABI, linking, symbols, and FFI
231
- - [ ` link ` ] — Specifies a native library to link with an ` extern ` block.
232
- - [ ` link_name ` ] — Specifies the name of the symbol for functions or statics
231
+ - [ ` link ` ] --- Specifies a native library to link with an ` extern ` block.
232
+ - [ ` link_name ` ] --- Specifies the name of the symbol for functions or statics
233
233
in an ` extern ` block.
234
- - [ ` link_ordinal ` ] — Specifies the ordinal of the symbol for functions or
234
+ - [ ` link_ordinal ` ] --- Specifies the ordinal of the symbol for functions or
235
235
statics in an ` extern ` block.
236
- - [ ` no_link ` ] — Prevents linking an extern crate.
237
- - [ ` repr ` ] — Controls type layout.
238
- - [ ` crate_type ` ] — Specifies the type of crate (library, executable, etc.).
239
- - [ ` no_main ` ] — Disables emitting the ` main ` symbol.
240
- - [ ` export_name ` ] — Specifies the exported symbol name for a function or
236
+ - [ ` no_link ` ] --- Prevents linking an extern crate.
237
+ - [ ` repr ` ] --- Controls type layout.
238
+ - [ ` crate_type ` ] --- Specifies the type of crate (library, executable, etc.).
239
+ - [ ` no_main ` ] --- Disables emitting the ` main ` symbol.
240
+ - [ ` export_name ` ] --- Specifies the exported symbol name for a function or
241
241
static.
242
- - [ ` link_section ` ] — Specifies the section of an object file to use for a
242
+ - [ ` link_section ` ] --- Specifies the section of an object file to use for a
243
243
function or static.
244
- - [ ` no_mangle ` ] — Disables symbol name encoding.
245
- - [ ` used ` ] — Forces the compiler to keep a static item in the output
244
+ - [ ` no_mangle ` ] --- Disables symbol name encoding.
245
+ - [ ` used ` ] --- Forces the compiler to keep a static item in the output
246
246
object file.
247
- - [ ` crate_name ` ] — Specifies the crate name.
247
+ - [ ` crate_name ` ] --- Specifies the crate name.
248
248
- Code generation
249
- - [ ` inline ` ] — Hint to inline code.
250
- - [ ` cold ` ] — Hint that a function is unlikely to be called.
251
- - [ ` no_builtins ` ] — Disables use of certain built-in functions.
252
- - [ ` target_feature ` ] — Configure platform-specific code generation.
249
+ - [ ` inline ` ] --- Hint to inline code.
250
+ - [ ` cold ` ] --- Hint that a function is unlikely to be called.
251
+ - [ ` no_builtins ` ] --- Disables use of certain built-in functions.
252
+ - [ ` target_feature ` ] --- Configure platform-specific code generation.
253
253
- [ ` track_caller ` ] - Pass the parent call location to ` std::panic::Location::caller() ` .
254
254
- [ ` instruction_set ` ] - Specify the instruction set used to generate a functions code
255
255
- Documentation
256
- - ` doc ` — Specifies documentation. See [ The Rustdoc Book] for more
256
+ - ` doc ` --- Specifies documentation. See [ The Rustdoc Book] for more
257
257
information. [ Doc comments] are transformed into ` doc ` attributes.
258
258
- Preludes
259
- - [ ` no_std ` ] — Removes std from the prelude.
260
- - [ ` no_implicit_prelude ` ] — Disables prelude lookups within a module.
259
+ - [ ` no_std ` ] --- Removes std from the prelude.
260
+ - [ ` no_implicit_prelude ` ] --- Disables prelude lookups within a module.
261
261
- Modules
262
- - [ ` path ` ] — Specifies the filename for a module.
262
+ - [ ` path ` ] --- Specifies the filename for a module.
263
263
- Limits
264
- - [ ` recursion_limit ` ] — Sets the maximum recursion limit for certain
264
+ - [ ` recursion_limit ` ] --- Sets the maximum recursion limit for certain
265
265
compile-time operations.
266
- - [ ` type_length_limit ` ] — Sets the maximum size of a polymorphic type.
266
+ - [ ` type_length_limit ` ] --- Sets the maximum size of a polymorphic type.
267
267
- Runtime
268
- - [ ` panic_handler ` ] — Sets the function to handle panics.
269
- - [ ` global_allocator ` ] — Sets the global memory allocator.
270
- - [ ` windows_subsystem ` ] — Specifies the windows subsystem to link with.
268
+ - [ ` panic_handler ` ] --- Sets the function to handle panics.
269
+ - [ ` global_allocator ` ] --- Sets the global memory allocator.
270
+ - [ ` windows_subsystem ` ] --- Specifies the windows subsystem to link with.
271
271
- Features
272
- - ` feature ` — Used to enable unstable or experimental compiler features. See
272
+ - ` feature ` --- Used to enable unstable or experimental compiler features. See
273
273
[ The Unstable Book] for features implemented in ` rustc ` .
274
274
- Type System
275
- - [ ` non_exhaustive ` ] — Indicate that a type will have more fields/variants
275
+ - [ ` non_exhaustive ` ] --- Indicate that a type will have more fields/variants
276
276
added in future.
277
277
- Debugger
278
- - [ ` debugger_visualizer ` ] — Embeds a file that specifies debugger output for a type.
279
- - [ ` collapse_debuginfo ` ] — Controls how macro invocations are encoded in debuginfo.
278
+ - [ ` debugger_visualizer ` ] --- Embeds a file that specifies debugger output for a type.
279
+ - [ ` collapse_debuginfo ` ] --- Controls how macro invocations are encoded in debuginfo.
280
280
281
281
[ Doc comments ] : comments.md#doc-comments
282
282
[ ECMA-334 ] : https://www.ecma-international.org/publications-and-standards/standards/ecma-334/
0 commit comments