Open
Description
openedon Apr 1, 2024
The following should not compile because the bound D: 'static
is not satisfied in fn test
:
struct Static<D: 'static>(Option<D>);
pub fn test<D>() {
let _ = || {
Static(None::<D>)
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)Area: The borrow checkerArea: The borrow checkerArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)Category: This is a bug.Category: This is a bug.Working towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.