Skip to content

Commit b842e99

Browse files
committed
Make warning about hir_ty_to_ty more visible
1 parent fbb69de commit b842e99

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

book/src/development/type_checking.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ an `u32`. As far as `hir::Ty` is concerned those might be different types. But a
119119
understands that they're the same type, in-depth lifetimes, etc...
120120

121121
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
122-
outside of bodies the [`TypeckResults::node_type()`][node_type] method. Don't use `hir_ty_to_ty` inside of bodies,
123-
because this can cause ICEs.
122+
outside of bodies the [`TypeckResults::node_type()`][node_type] method.
123+
124+
> **Warning**: Don't use `hir_ty_to_ty` inside of bodies, because this can cause ICEs.
124125
125126
## Useful Links
126127

0 commit comments

Comments
 (0)