Closed
Description
extern {
fn foo() -> &u8;
}
(playpen)
compiles fine. The &u8
has a dangling lifetime, which doesn't compile for functions that have bodies.
This probably should throw an error.
Metadata
Metadata
Assignees
Labels
Area: Lifetimes / regionsCategory: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessMedium priorityRelevant to the language team