Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/items/generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ r[items.generics.syntax]
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> ( _LifetimeParam_ | _TypeParam_ | _ConstParam_ )
>
> _LifetimeParam_ :\
> &nbsp;&nbsp; [LIFETIME_OR_LABEL]&nbsp;( `:` [_LifetimeBounds_] )<sup>?</sup>
> &nbsp;&nbsp; [_Lifetime_]&nbsp;( `:` [_LifetimeBounds_] )<sup>?</sup>
>
> _TypeParam_ :\
> &nbsp;&nbsp; [IDENTIFIER]&nbsp;( `:` [_TypeParamBounds_]<sup>?</sup> )<sup>?</sup> ( `=` [_Type_] )<sup>?</sup>
Expand Down Expand Up @@ -54,8 +54,8 @@ r[items.generics.builtin-generic-types]
[function pointers] have lifetime or type parameters as well, but are not
referred to with path syntax.

r[items.generics.wildcard-lifetime]
`'_` is not a valid lifetime parameter.
r[items.generics.invalid-lifetimes]
`'_` and `'_static` are not valid lifetime parameters.

### Const generics

Expand Down Expand Up @@ -294,7 +294,6 @@ struct Foo<#[my_flexible_clone(unbounded)] H> {
```

[IDENTIFIER]: ../identifiers.md
[LIFETIME_OR_LABEL]: ../tokens.md#lifetimes-and-loop-labels

[_ForLifetimes_]: ../trait-bounds.md#higher-ranked-trait-bounds
[_LifetimeParam_]: #generic-parameters
Expand Down
2 changes: 0 additions & 2 deletions src/tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,6 @@ r[lex.token.life.syntax]
>
> LIFETIME_OR_LABEL :\
> &nbsp;&nbsp; &nbsp;&nbsp; `'` [NON_KEYWORD_IDENTIFIER][identifier]
> _(not immediately followed by `'`)_\
> &nbsp;&nbsp; | `'_`
> _(not immediately followed by `'`)_

r[lex.token.life.intro]
Expand Down
3 changes: 2 additions & 1 deletion src/trait-bounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ r[bound.syntax]
>
> _Lifetime_ :\
> &nbsp;&nbsp; &nbsp;&nbsp; [LIFETIME_OR_LABEL]\
> &nbsp;&nbsp; | `'static`
> &nbsp;&nbsp; | `'static`\
> &nbsp;&nbsp; | `'_`
>
> _UseBound_ :\
> &nbsp;&nbsp; `use` _UseBoundGenericArgs_
Expand Down