Skip to content

Commit bb4135b

Browse files
committed
Describe all cases for which the weak dyn keyword is parsed as a keyword
1 parent 9149abe commit bb4135b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/keywords.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ is possible to declare a variable or method with the name `union`.
105105
fn invalid_lifetime_parameter<'static>(s: &'static str) -> &'static str { s }
106106
```
107107
* In the 2015 edition, [`dyn`] is a keyword when used in a type position
108-
followed by a path that does not start with `::`.
108+
followed by a path that does not start with `::` or `<`, a lifetime, a question mark, a `for`
109+
keyword or an opening parenthesis.
109110

110111
Beginning in the 2018 edition, `dyn` has been promoted to a strict keyword.
111112

0 commit comments

Comments
 (0)