@@ -240,24 +240,20 @@ r[attributes.builtin]
240
240
241
241
The following is an index of all built-in attributes.
242
242
243
- r[ attributes.builtin.cfg]
244
243
- Conditional compilation
245
244
- [ ` cfg ` ] --- Controls conditional compilation.
246
245
- [ ` cfg_attr ` ] --- Conditionally includes attributes.
247
246
248
- r[ attributes.builtin.testing]
249
247
- Testing
250
248
- [ ` test ` ] --- Marks a function as a test.
251
249
- [ ` ignore ` ] --- Disables a test function.
252
250
- [ ` should_panic ` ] --- Indicates a test should generate a panic.
253
251
254
- r[ attributes.builtin.derive]
255
252
- Derive
256
253
- [ ` derive ` ] --- Automatic trait implementations.
257
254
- [ ` automatically_derived ` ] --- Marker for implementations created by
258
255
` derive ` .
259
256
260
- r[ attributes.builtin.macros]
261
257
- Macros
262
258
- [ ` macro_export ` ] --- Exports a ` macro_rules ` macro for cross-crate usage.
263
259
- [ ` macro_use ` ] --- Expands macro visibility, or imports macros from other
@@ -266,15 +262,13 @@ r[attributes.builtin.macros]
266
262
- [ ` proc_macro_derive ` ] --- Defines a derive macro.
267
263
- [ ` proc_macro_attribute ` ] --- Defines an attribute macro.
268
264
269
- r[ attributes.builtin.diagnostic]
270
265
- Diagnostics
271
266
- [ ` allow ` ] , [ ` expect ` ] , [ ` warn ` ] , [ ` deny ` ] , [ ` forbid ` ] --- Alters the default lint level.
272
267
- [ ` deprecated ` ] --- Generates deprecation notices.
273
268
- [ ` must_use ` ] --- Generates a lint for unused values.
274
269
- [ ` diagnostic::on_unimplemented ` ] --- Hints the compiler to emit a certain error
275
270
message if a trait is not implemented.
276
271
277
- r[ attributes.builtin.linkage]
278
272
- ABI, linking, symbols, and FFI
279
273
- [ ` link ` ] --- Specifies a native library to link with an ` extern ` block.
280
274
- [ ` link_name ` ] --- Specifies the name of the symbol for functions or statics
@@ -294,7 +288,6 @@ r[attributes.builtin.linkage]
294
288
object file.
295
289
- [ ` crate_name ` ] --- Specifies the crate name.
296
290
297
- r[ attributes.builtin.codegen]
298
291
- Code generation
299
292
- [ ` inline ` ] --- Hint to inline code.
300
293
- [ ` cold ` ] --- Hint that a function is unlikely to be called.
@@ -303,43 +296,35 @@ r[attributes.builtin.codegen]
303
296
- [ ` track_caller ` ] - Pass the parent call location to ` std::panic::Location::caller() ` .
304
297
- [ ` instruction_set ` ] - Specify the instruction set used to generate a functions code
305
298
306
- r[ attributes.builtin.doc]
307
299
- Documentation
308
300
- ` doc ` --- Specifies documentation. See [ The Rustdoc Book] for more
309
301
information. [ Doc comments] are transformed into ` doc ` attributes.
310
302
311
- r[ attributes.builtin.prelude]
312
303
- Preludes
313
304
- [ ` no_std ` ] --- Removes std from the prelude.
314
305
- [ ` no_implicit_prelude ` ] --- Disables prelude lookups within a module.
315
306
316
- r[ attributes.builtin.module]
317
307
- Modules
318
308
- [ ` path ` ] --- Specifies the filename for a module.
319
309
320
- r[ attributes.builtin.limits]
321
310
- Limits
322
311
- [ ` recursion_limit ` ] --- Sets the maximum recursion limit for certain
323
312
compile-time operations.
324
313
- [ ` type_length_limit ` ] --- Sets the maximum size of a polymorphic type.
325
314
326
- r[ attributes.builtin.rt]
327
315
- Runtime
328
316
- [ ` panic_handler ` ] --- Sets the function to handle panics.
329
317
- [ ` global_allocator ` ] --- Sets the global memory allocator.
330
318
- [ ` windows_subsystem ` ] --- Specifies the windows subsystem to link with.
331
319
332
- r[ attributes.builtin.unstable]
333
320
- Features
334
321
- ` feature ` --- Used to enable unstable or experimental compiler features. See
335
322
[ The Unstable Book] for features implemented in ` rustc ` .
336
323
337
- r[ attributes.builtin.typesystem]
338
324
- Type System
339
325
- [ ` non_exhaustive ` ] --- Indicate that a type will have more fields/variants
340
326
added in future.
341
327
342
- r[ attributes.builtin.debugging]
343
328
- Debugger
344
329
- [ ` debugger_visualizer ` ] --- Embeds a file that specifies debugger output for a type.
345
330
- [ ` collapse_debuginfo ` ] --- Controls how macro invocations are encoded in debuginfo.
0 commit comments