1 error[E0277]: the trait bound `PathBuf: From<Cow<'_, str>>` is not satisfied
2 --> $DIR/issue-90101.rs:6:10
4 LL | func(Path::new("hello").to_path_buf().to_string_lossy(), "world")
5 | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Cow<'_, str>>` is not implemented for `PathBuf`
7 | required by a bound introduced by this call
9 = help: the following other types implement trait `From<T>`:
11 <PathBuf as From<Box<Path>>>
12 <PathBuf as From<Cow<'a, Path>>>
13 <PathBuf as From<OsString>>
14 <PathBuf as From<String>>
15 = note: required because of the requirements on the impl of `Into<PathBuf>` for `Cow<'_, str>`
16 note: required by a bound in `func`
17 --> $DIR/issue-90101.rs:3:20
19 LL | fn func(path: impl Into<PathBuf>, code: impl Into<String>) {}
20 | ^^^^^^^^^^^^^ required by this bound in `func`
22 error: aborting due to previous error
24 For more information about this error, try `rustc --explain E0277`.