Skip to content

Describe all cases for which the weak dyn keyword is parsed as a keyword #1538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2024
Merged
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
3 changes: 2 additions & 1 deletion src/keywords.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ is possible to declare a variable or method with the name `union`.
fn invalid_lifetime_parameter<'static>(s: &'static str) -> &'static str { s }
```
* In the 2015 edition, [`dyn`] is a keyword when used in a type position
followed by a path that does not start with `::`.
followed by a path that does not start with `::` or `<`, a lifetime, a question mark, a `for`
keyword or an opening parenthesis.

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

Expand Down