about summary refs log tree commit diff
path: root/tests/ui/traits/error-reporting/where-clause-with-bad-path.rs
blob: cbe14887de4bd79ef9115647c37b4c4f8cec23b5 (plain)
1
2
3
4
5
6
7
8
9
10
// Ensure that we don't emit an E0270 for "`impl AsRef<Path>: AsRef<Path>` not satisfied".

fn foo<T: AsRef<Path>>(filename: T) {
    //~^ ERROR cannot find type `Path` in this scope
    std::fs::write(filename, "hello").unwrap();
}

fn main() {
    foo("/tmp/hello");
}