mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
22 lines
369 B
Rust
22 lines
369 B
Rust
// revisions: current next
|
|
//[next] compile-flags: -Znext-solver
|
|
// check-pass
|
|
|
|
use std::path::Path;
|
|
use std::ffi::OsStr;
|
|
use std::ops::Deref;
|
|
|
|
fn frob(path: &str) -> impl Deref<Target = Path> + '_ {
|
|
OsStr::new(path).as_ref()
|
|
}
|
|
|
|
fn open_parent<'path>(_path: &'path Path) {
|
|
todo!()
|
|
}
|
|
|
|
fn main() {
|
|
let old_path = frob("hello");
|
|
|
|
open_parent(&old_path);
|
|
}
|