diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2023-11-26 20:33:07 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2023-11-26 22:30:16 +0100 |
| commit | a7c59aba2035d498ce2e0375f97adaaa97d43069 (patch) | |
| tree | 1fc6f47ef29451e514bc8d1278a83c6bb1aed340 | |
| parent | 7af811b6c43a90ed61a97ce239f5020263e39c7e (diff) | |
| download | rust-a7c59aba2035d498ce2e0375f97adaaa97d43069.tar.gz rust-a7c59aba2035d498ce2e0375f97adaaa97d43069.zip | |
`TypeckResults::node_type()` can be used inside of bodies
| -rw-r--r-- | book/src/development/type_checking.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/book/src/development/type_checking.md b/book/src/development/type_checking.md index d7c2775b896..a8c9660da4c 100644 --- a/book/src/development/type_checking.md +++ b/book/src/development/type_checking.md @@ -119,7 +119,7 @@ an `u32`. As far as `hir::Ty` is concerned those might be different types. But a understands that they're the same type, in-depth lifetimes, etc... To get from a `hir::Ty` to a `ty::Ty`, you can use the [`hir_ty_to_ty`][hir_ty_to_ty] function outside of bodies or -outside of bodies the [`TypeckResults::node_type()`][node_type] method. +the [`TypeckResults::node_type()`][node_type] method inside of bodies. > **Warning**: Don't use `hir_ty_to_ty` inside of bodies, because this can cause ICEs. |
