diff options
| author | bors <bors@rust-lang.org> | 2023-11-27 09:09:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-27 09:09:17 +0000 |
| commit | 5ba6480f02b88ae6edcab56c57050ade16818d63 (patch) | |
| tree | 9c40837faa684a51202ee8d56e0ed7caea0318f1 | |
| parent | f30a859ae32c97668a1a8473fc95b72857073e37 (diff) | |
| parent | a7c59aba2035d498ce2e0375f97adaaa97d43069 (diff) | |
| download | rust-5ba6480f02b88ae6edcab56c57050ade16818d63.tar.gz rust-5ba6480f02b88ae6edcab56c57050ade16818d63.zip | |
Auto merge of #11877 - samueltardieu:doc-fix, r=flip1995
`TypeckResults::node_type()` can be used inside of bodies Doc fix. changelog: none
| -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. |
