Fix file paths to section 35.1 & 35.2 example code (#2078)

This commit is contained in:
Christopher Speir 2024-09-25 09:18:50 -05:00 committed by GitHub
parent eca2a904d1
commit de2f32e59c
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ and run [`TyCtxt.analysis`].
The following was tested with <!-- date-check: september 2024 --> `nightly-2024-09-16`:
```rust
{{#include ../examples/rustc-driver-getting-diagnostics.rs}}
{{#include ../../examples/rustc-driver-getting-diagnostics.rs}}
```
[`rustc_interface`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/index.html

View File

@ -8,7 +8,7 @@ To get the type of an expression, use the [`global_ctxt`] query to [get] a [`TyC
The following was tested with <!-- date-check: may 2024 --> `nightly-2024-05-09`:
```rust
{{#include ../examples/rustc-driver-interacting-with-the-ast.rs}}
{{#include ../../examples/rustc-driver-interacting-with-the-ast.rs}}
```
[get]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.GlobalCtxt.html#method.enter
[`global_ctxt`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/queries/struct.Queries.html#method.global_ctxt