Closed
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
Area: Non-lexical lifetimes (NLL)Category: This is a bug.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Working towards the "valid code works" goalRelevant to the compiler team, which will review and decide on the PR/issue.