error[E0277]: the trait bound `PathBuf: From>` is not satisfied --> $DIR/issue-90101.rs:6:10 | LL | func(Path::new("hello").to_path_buf().to_string_lossy(), "world") | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From>` is not implemented for `PathBuf` | | | required by a bound introduced by this call | = help: the following other types implement trait `From`: > >> >> > > = note: required for `Cow<'_, str>` to implement `Into` note: required by a bound in `func` --> $DIR/issue-90101.rs:3:20 | LL | fn func(path: impl Into, code: impl Into) {} | ^^^^^^^^^^^^^ required by this bound in `func` error: aborting due to previous error For more information about this error, try `rustc --explain E0277`.