diff options
Diffstat (limited to 'tests/ui/traits/error-reporting/apit-with-bad-path.rs')
| -rw-r--r-- | tests/ui/traits/error-reporting/apit-with-bad-path.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/traits/error-reporting/apit-with-bad-path.rs b/tests/ui/traits/error-reporting/apit-with-bad-path.rs new file mode 100644 index 00000000000..57184b9d0a9 --- /dev/null +++ b/tests/ui/traits/error-reporting/apit-with-bad-path.rs @@ -0,0 +1,10 @@ +// 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"); +} |
