Commit cf92e58
committed
Document trailing
The Reference says that `self` can only appear as the first segment of
a path. Further, the `use` chapter describes `{self}` brace syntax as
the way to bind the parent entity of a `use` path under its own name.
In rust-lang/rust#155137, we're relaxing these restrictions: `self`
may now also appear as the last segment of a path (preceded by `::`)
as long as the preceding path resolves to a module, enumeration,
or trait. In a `use` path, `use P::self [as name]` is equivalent
to `use P::{self [as name]}`. In non-`use` paths, forms such as
`type Ty = P::self` and `pub(in P::self)` are now accepted.
Let's update the Reference to reflect this.self in paths1 parent 18d4246 commit cf92e58
2 files changed
+40
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
206 | 221 | | |
207 | 222 | | |
208 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
237 | 260 | | |
238 | 261 | | |
239 | 262 | | |
| |||
482 | 505 | | |
483 | 506 | | |
484 | 507 | | |
| 508 | + | |
485 | 509 | | |
486 | 510 | | |
487 | 511 | | |
| |||
0 commit comments