summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/autoderef.rs
blob: 48ff8be6549fecbf95719eb8dd10fc735a12f2ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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);
}