File tree 1 file changed +7
-7
lines changed
compiler/rustc_error_codes/src/error_codes
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ First: what are thin and fat pointers?
12
12
Thin pointers are "simple" pointers: they are purely a reference to a memory
13
13
address.
14
14
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.
20
20
21
21
To fix this error, don't try to cast directly between thin and fat pointers.
22
22
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 .
25
25
26
26
[ 1 ] : https://doc.rust-lang.org/reference/expressions/operator-expr.html#type-cast-expressions
You can’t perform that action at this time.
0 commit comments