diff options
Diffstat (limited to 'src/test/ui/typeck/issue-90101.stderr')
-rw-r--r-- | src/test/ui/typeck/issue-90101.stderr | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/typeck/issue-90101.stderr b/src/test/ui/typeck/issue-90101.stderr new file mode 100644 index 000000000..ab9a72edf --- /dev/null +++ b/src/test/ui/typeck/issue-90101.stderr @@ -0,0 +1,24 @@ +error[E0277]: the trait bound `PathBuf: From<Cow<'_, str>>` is not satisfied + --> $DIR/issue-90101.rs:6:10 + | +LL | func(Path::new("hello").to_path_buf().to_string_lossy(), "world") + | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Cow<'_, str>>` is not implemented for `PathBuf` + | | + | required by a bound introduced by this call + | + = help: the following other types implement trait `From<T>`: + <PathBuf as From<&T>> + <PathBuf as From<Box<Path>>> + <PathBuf as From<Cow<'a, Path>>> + <PathBuf as From<OsString>> + <PathBuf as From<String>> + = note: required because of the requirements on the impl of `Into<PathBuf>` for `Cow<'_, str>` +note: required by a bound in `func` + --> $DIR/issue-90101.rs:3:20 + | +LL | fn func(path: impl Into<PathBuf>, code: impl Into<String>) {} + | ^^^^^^^^^^^^^ required by this bound in `func` + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. |