diff options
| author | Mohammad Omidvar <m_omidvart@sfu.ca> | 2025-01-28 19:45:20 +0000 |
|---|---|---|
| committer | Mohammad Omidvar <m_omidvart@sfu.ca> | 2025-01-28 19:45:20 +0000 |
| commit | 5dfe0f8cf49110491ec0391c4b94b56834d65aef (patch) | |
| tree | adec6111ec144abf63fe0233ee90f7acabaa7da4 /src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs | |
| parent | fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0 (diff) | |
| download | rust-5dfe0f8cf49110491ec0391c4b94b56834d65aef.tar.gz rust-5dfe0f8cf49110491ec0391c4b94b56834d65aef.zip | |
Make crate AST mutation accessible for driver callback
Diffstat (limited to 'src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs')
| -rw-r--r-- | src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs b/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs index c894b60444a..8766a817344 100644 --- a/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs +++ b/src/doc/rustc-dev-guide/examples/rustc-driver-interacting-with-the-ast.rs @@ -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)); |
