TAIT: allow using '_ to reference the current lifetime #138620
Labels
C-bug
Category: This is a bug.
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
We were doing some experimentation with type alias impl trait to make a macro that can associate compile-time constants with inferred types, and I think we're running into either a bug or unimplemented feature. We're hoping to use this so we can take a
println!(...)
-ish format string and access associated constants at compile time for runtime values. Unfortunately it seems Rust wants us to provide the name of the current lifetime, but it doesn't accept'_
. Here's a simplified version of what we're trying to do:This results in this error:
However it does work if we can use a named lifetime:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: