File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,30 @@ still get a short message per ignored `do_mir_borrowck`, but none of the things
60
60
calls. This helps you in looking through the calls that are happening and helps you adjust
61
61
your regex if you mistyped it.
62
62
63
+ ## Query level filters
64
+
65
+ Every [ query] ( query.md ) is automatically tagged with a logging span so that
66
+ you can display all log messages during the execution of the query. For
67
+ example, if you want to log everything during type checking:
68
+
69
+ ```
70
+ RUSTC_LOG=[typeck]
71
+ ```
72
+
73
+ The query arguments are included as a tracing field which means that you can
74
+ filter on the debug display of the arguments. For example, the ` typeck ` query
75
+ has an argument ` key: LocalDefId ` of what is being checked. You can use a
76
+ regex to match on that ` LocalDefId ` to log type checking for a specific
77
+ function:
78
+
79
+ ```
80
+ RUSTC_LOG=[typeck{key=.*name_of_item.*}]
81
+ ```
82
+
83
+ Different queries have different arguments. You can find a list of queries and
84
+ their arguments in
85
+ [ ` rustc_middle/src/query/mod.rs ` ] ( https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/query/mod.rs#L18 ) .
86
+
63
87
## Broad module level filters
64
88
65
89
You can also use filters similar to the ` log ` crate's filters, which will enable
You can’t perform that action at this time.
0 commit comments