-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
The following code:
struct Parser<'i: 't, 't>(&'i u8, &'t u8);
impl<'i, 't> Parser<'i, 't> {
fn parse_nested_block<F, T>(&mut self, parse: F) -> Result<T, ()>
where for<'tt> F: FnOnce(&mut Parser<'i, 'tt>) -> T { panic!() }
fn expect_exhausted(&mut self) -> Result<(), ()> { Ok(()) }
}
fn main() {
let x = 0u8;
Parser(&x, &x).parse_nested_block(|input| input.expect_exhausted()).unwrap();
}
compiles on 1.3 stable and 1.4 beta, but not on nightly. This seems likely related to wf changes.
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.