Skip to content

Commit e89d981

Browse files
authored
add pre-requisite for calling into compiler API (#663)
1 parent e1301ac commit e89d981

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rustc-driver-interacting-with-the-ast.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## Getting the type of an expression
66

7+
NOTE: For the example to compile, you will need to first run the following:
8+
9+
rustup component add rustc-dev
10+
711
To get the type of an expression, use the `global_ctxt` to get a `TyCtxt`:
812

913
```rust

0 commit comments

Comments
 (0)