Skip to content

Commit 0855263

Browse files
committed
Auto merge of rust-lang#76463 - camelid:improve-E0607-explanation, r=jyn514
Improve wording of E0607 explanation `@rustbot` modify labels: A-diagnostics C-enhancement
2 parents 780ca14 + 98a5506 commit 0855263

File tree

1 file changed

+7
-7
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+7
-7
lines changed

compiler/rustc_error_codes/src/error_codes/E0607.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ First: what are thin and fat pointers?
1212
Thin pointers are "simple" pointers: they are purely a reference to a memory
1313
address.
1414

15-
Fat pointers are pointers referencing Dynamically Sized Types (also called DST).
16-
DST don't have a statically known size, therefore they can only exist behind
17-
some kind of pointers that contain additional information. Slices and trait
18-
objects are DSTs. In the case of slices, the additional information the fat
19-
pointer holds is their size.
15+
Fat pointers are pointers referencing Dynamically Sized Types (also called
16+
DSTs). DSTs don't have a statically known size, therefore they can only exist
17+
behind some kind of pointer that contains additional information. For example,
18+
slices and trait objects are DSTs. In the case of slices, the additional
19+
information the fat pointer holds is their size.
2020

2121
To fix this error, don't try to cast directly between thin and fat pointers.
2222

23-
For more information about casts, take a look at the Type cast section in
24-
[The Reference Book][1].
23+
For more information about type casts, take a look at the section of the
24+
[The Rust Reference][1] on type cast expressions.
2525

2626
[1]: https://doc.rust-lang.org/reference/expressions/operator-expr.html#type-cast-expressions

0 commit comments

Comments
 (0)