-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Lifetimes are not hygenic #55744
Labels
Comments
Type parameters have the same issue. This compiles as well: trait Trait {}
macro_rules! impl_trait_for {
($name:path) => { impl<T> Trait for $name {} }
}
impl_trait_for!(Result<T, T>); |
This is by design in |
There's some truly ancient history here, see e.g. #7743, #12451 and meeting from 2014-06-10 |
I thought we had to pass lifetimes to macros to make things work, are they hygienic sometimes? |
Only labels are hygienic (if those can be counted as lifetimes). |
jonas-schievink
added
A-lifetimes
Area: Lifetimes / regions
A-macros-1.2
Area: Declarative macros 1.2
labels
Jan 27, 2019
(Closing as not an issue.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I would expect the following to not compile (Playground):
The lifetime
'tcx
is bound in the macro, and used in a macro argument. This violates hygiene.I am sure this has already been reported but I cannot find an issue that matches...
The text was updated successfully, but these errors were encountered: