Closed
Description
I would expect the following to not compile (Playground):
trait Trait {}
macro_rules! impl_trait_for {
($name:path) => { impl<'tcx> Trait for $name {} }
}
impl_trait_for!(Option<i32>);
impl_trait_for!(Option<&'tcx i32>);
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...