NLL should respect lifetimes in as
expressions
#54332
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-sound
Working towards the "invalid code does not compile" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Spawned off from #47184. The following test case compiles, but it should not:
The problem is that the "cast" expression is not preserving the full type that the user gave (
&'static u32
).This is very similar to #54331
The text was updated successfully, but these errors were encountered: