Skip to content
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

Keywords cannot be used for lifetime paramters #2306

Open
tamaroning opened this issue Jun 17, 2023 · 0 comments
Open

Keywords cannot be used for lifetime paramters #2306

tamaroning opened this issue Jun 17, 2023 · 0 comments

Comments

@tamaroning
Copy link
Contributor

tamaroning commented Jun 17, 2023

See https://doc.rust-lang.org/reference/tokens.html#lifetimes-and-loop-labels

I tried this code:

struct Foo<'crate, T>{
    a: &'crate T
}

fn main() {}

I expected to see this happen:
error: lifetimes cannot use keyword names

Instead, this happened:
compiled.

Meta

  • What version of Rust GCC were you using, git sha if possible.
  • Used https://godbolt.org/
  • probably recent version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants