@@ -267,10 +267,34 @@ for debugging by dumping extra compiler-internal information. These are prefixed
267
267
are gated behind the internal feature ` rustc_attrs ` (enabled via e.g. ` #![feature(rustc_attrs)] ` ).
268
268
269
269
For a complete and up to date list, see [ ` builtin_attrs ` ] . More specifically, the ones marked ` TEST ` .
270
+ Here are some notable ones:
271
+
272
+ | Attribute | Description |
273
+ | ----------------| -------------|
274
+ | ` rustc_def_path ` | Dumps the [ ` def_path_str ` ] of an item. |
275
+ | ` rustc_dump_def_parents ` | Dumps the chain of ` DefId ` parents of certain definitions. |
276
+ | ` rustc_dump_item_bounds ` | Dumps the [ ` item_bounds ` ] of an item. |
277
+ | ` rustc_dump_predicates ` | Dumps the [ ` predicates_of ` ] an item. |
278
+ | ` rustc_dump_vtable ` | |
279
+ | ` rustc_hidden_type_of_opaques ` | Dumps the [ hidden type of all opaque types] [ opaq ] in the crate. |
280
+ | ` rustc_layout ` | [ See this section] ( #debugging-type-layouts ) . |
281
+ | ` rustc_object_lifetime_default ` | Dumps the [ object lifetime defaults] of an item. |
282
+ | ` rustc_outlives ` | Dumps implied bounds of an item. More precisely, the [ ` inferred_outlives_of ` ] an item. |
283
+ | ` rustc_regions ` | Dumps NLL closure region requirements. |
284
+ | ` rustc_symbol_name ` | Dumps the mangled & demangled [ ` symbol_name ` ] of an item. |
285
+ | ` rustc_variances ` | Dumps the [ variances] of an item. |
270
286
271
287
Right below you can find elaborate explainers on a selected few.
272
288
273
289
[ `builtin_attrs` ] : https://github.com/rust-lang/rust/blob/master/compiler/rustc_feature/src/builtin_attrs.rs
290
+ [ `def_path_str` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.def_path_str
291
+ [ `inferred_outlives_of` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.inferred_outlives_of
292
+ [ `item_bounds` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.item_bounds
293
+ [ `predicates_of` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.predicates_of
294
+ [ `symbol_name` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.symbol_name
295
+ [ object lifetime defaults ] : https://doc.rust-lang.org/reference/lifetime-elision.html#default-trait-object-lifetimes
296
+ [ opaq ] : ./opaque-types-impl-trait-inference.md
297
+ [ variances ] : ./variance.md
274
298
275
299
### Formatting Graphviz output (.dot files)
276
300
[ formatting-graphviz-output ] : #formatting-graphviz-output
0 commit comments