about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/split-paths-may-dangle.rs
blob: 61c5342cdbb942953d3065898e85fe04a1e715f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Regression test for issue #146045 - ensure that the TAIT `SplitPaths` does not
// require the borrowed string to be live.
//@ check-pass
//@ edition:2015

pub fn repro() -> Option<std::path::PathBuf> {
    let unparsed = std::ffi::OsString::new();
    std::env::split_paths(&unparsed).next()
}

fn main() {}