add pre-requisite for calling into compiler API (#663)

This commit is contained in:
Tshepang Lekhonkhobe 2020-04-04 09:37:39 +02:00 committed by GitHub
parent 62ef95760a
commit e93f50cf0d

View file

@ -4,6 +4,10 @@
## Getting the type of an expression
NOTE: For the example to compile, you will need to first run the following:
rustup component add rustc-dev
To get the type of an expression, use the `global_ctxt` to get a `TyCtxt`:
```rust