-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)C-bugCategory: This is a bug.Category: This is a bug.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.NLL-completeWorking towards the "valid code works" goalWorking towards the "valid code works" goalT-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.
Milestone
Description
UPDATE: Turns out this code should not work, so we just need to add a negative test. See this comment but also the mentoring instructions in this tracking bug.
This code compiles, but it does not compile with nll enabled.
#![feature(nll)]
use std::io::{BufRead, BufReader};
fn main() {
let v = BufReader::new("aaa.bbb\nccc.ddd\neee.fff.ggg\n".as_bytes());
let _ = v.lines().map(|x:Result<String,_>|{
let x = x.unwrap();
move||{x.rsplit(".")}
});
}
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)C-bugCategory: This is a bug.Category: This is a bug.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.NLL-completeWorking towards the "valid code works" goalWorking towards the "valid code works" goalT-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.