@@ -2139,9 +2139,9 @@ enum Foo<T> {
2139
2139
}
2140
2140
```
2141
2141
2142
- This error may also commonly be found when working with unsafe code. For
2142
+ This error may also commonly be found when working with unsafe code. For
2143
2143
example, when using raw pointers one may wish to specify the lifetime for
2144
- which the pointed-at data is valid. An initial attempt (below) causes this
2144
+ which the pointed-at data is valid. An initial attempt (below) causes this
2145
2145
error:
2146
2146
2147
2147
```
@@ -2151,8 +2151,8 @@ struct Foo<'a, T> {
2151
2151
```
2152
2152
2153
2153
We want to express the constraint that Foo should not outlive `'a`, because
2154
- the data pointed to by `T` is only valid for that lifetime. The problem is
2155
- that there are no actual uses of `'a`. It's possible to work around this
2154
+ the data pointed to by `T` is only valid for that lifetime. The problem is
2155
+ that there are no actual uses of `'a`. It's possible to work around this
2156
2156
by adding a PhantomData type to the struct, using it to tell the compiler
2157
2157
to act as if the struct contained a borrowed reference `&'a T`:
2158
2158
@@ -2165,8 +2165,8 @@ struct Foo<'a, T: 'a> {
2165
2165
}
2166
2166
```
2167
2167
2168
- PhantomData can also be used to express information about unused type parameters.
2169
- You can read more about it in the API documentation:
2168
+ PhantomData can also be used to express information about unused type
2169
+ parameters. You can read more about it in the API documentation:
2170
2170
2171
2171
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
2172
2172
"##
0 commit comments