Skip to content

Commit da188bd

Browse files
authored
Merge pull request #1538 from Veykril/ed-2015-dyn
Describe all cases for which the weak `dyn` keyword is parsed as a keyword
2 parents c34aa00 + bb4135b commit da188bd

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
@@ -106,7 +106,8 @@ is possible to declare a variable or method with the name `union`.
106106
fn invalid_lifetime_parameter<'static>(s: &'static str) -> &'static str { s }
107107
```
108108
* In the 2015 edition, [`dyn`] is a keyword when used in a type position
109-
followed by a path that does not start with `::`.
109+
followed by a path that does not start with `::` or `<`, a lifetime, a question mark, a `for`
110+
keyword or an opening parenthesis.
110111

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

0 commit comments

Comments
 (0)