Skip to content

Commit

Permalink
Auto merge of #11877 - samueltardieu:doc-fix, r=flip1995
Browse files Browse the repository at this point in the history
`TypeckResults::node_type()` can be used inside of bodies

Doc fix.

changelog: none
  • Loading branch information
bors committed Nov 27, 2023
2 parents f30a859 + a7c59ab commit 5ba6480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/src/development/type_checking.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5ba6480

Please sign in to comment.