Rollup merge of #136214 - momvart:driver_callback_crate_mut, r=bjorn3
Make crate AST mutation accessible for driver callback Following #134130, this brings back the ability to mutate AST before lowering.
This commit is contained in:
commit
71c2f1924b
|
|
@ -58,7 +58,7 @@ impl rustc_driver::Callbacks for MyCallbacks {
|
|||
fn after_crate_root_parsing(
|
||||
&mut self,
|
||||
_compiler: &Compiler,
|
||||
krate: &rustc_ast::Crate,
|
||||
krate: &mut rustc_ast::Crate,
|
||||
) -> Compilation {
|
||||
for item in &krate.items {
|
||||
println!("{}", item_to_string(&item));
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ impl rustc_driver::Callbacks for MyCallbacks {
|
|||
fn after_crate_root_parsing(
|
||||
&mut self,
|
||||
_compiler: &Compiler,
|
||||
krate: &rustc_ast::Crate,
|
||||
krate: &mut rustc_ast::Crate,
|
||||
) -> Compilation {
|
||||
for item in &krate.items {
|
||||
println!("{}", item_to_string(&item));
|
||||
|
|
|
|||
Loading…
Reference in New Issue