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 b54c64cb0f
commit a05591ab58
1 changed files with 4 additions and 0 deletions

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