mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-09 08:27:38 +00:00
11 lines
270 B
Rust
11 lines
270 B
Rust
![]() |
// Ensure that we don't emit an E0270 for "`impl AsRef<Path>: AsRef<Path>` not satisfied".
|
||
|
|
||
|
fn foo(filename: impl AsRef<Path>) {
|
||
|
//~^ ERROR cannot find type `Path` in this scope
|
||
|
std::fs::write(filename, "hello").unwrap();
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
foo("/tmp/hello");
|
||
|
}
|