Skip to content

Commit 8d2f442

Browse files
committed
Fix CI
1 parent 8b10f6b commit 8d2f442

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

book/src/development/type_checking.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,16 @@ impl LateLintPass<'_> for MyStructLint {
104104

105105
## `hir::Ty` and `ty::Ty`
106106

107-
We've been talking about [`ty::Ty`][middle_ty] this whole time without addressing [`hir::Ty`][hir_ty], but the latter is also important to understand.
107+
We've been talking about [`ty::Ty`][middle_ty] this whole time without addressing [`hir::Ty`][hir_ty], but the latter
108+
is also important to understand.
108109

109-
`hir::Ty` would represent *what* an user wrote, while `ty::Ty` would understand the meaning of it (because it has more information).
110+
`hir::Ty` would represent *what* an user wrote, while `ty::Ty` would understand the meaning of it (because it has more
111+
information).
110112

111113
**Example: `fn foo(x: u32) -> u32 { x }`**
112114

113-
Here the HIR sees the types without "thinking" about them, it knows that the function takes an `u32` and returns an `u32`. But at the `ty::Ty` level the compiler understands that they're the same type, in-depth lifetimes, etc...
115+
Here the HIR sees the types without "thinking" about them, it knows that the function takes an `u32` and returns
116+
an `u32`. But at the `ty::Ty` level the compiler understands that they're the same type, in-depth lifetimes, etc...
114117

115118
you can use the [`hir_ty_to_ty`][hir_ty_to_ty] function to convert from a `hir::Ty` to a `ty::Ty`
116119

@@ -138,4 +141,4 @@ in this chapter:
138141
[TypeckResults]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html
139142
[middle_ty]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_middle/ty/struct.Ty.html
140143
[hir_ty]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_hir/struct.Ty.html
141-
[hir_ty_to_ty]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_hir_analysis/fn.hir_ty_to_ty.html
144+
[hir_ty_to_ty]: https://doc.rust-lang.org/beta/nightly-rustc/rustc_hir_analysis/fn.hir_ty_to_ty.html

0 commit comments

Comments
 (0)