]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-90101.stderr
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / tests / ui / typeck / issue-90101.stderr
1 error[E0277]: the trait bound `PathBuf: From<Cow<'_, str>>` is not satisfied
2   --> $DIR/issue-90101.rs:6:10
3    |
4 LL |     func(Path::new("hello").to_path_buf().to_string_lossy(), "world")
5    |     ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<Cow<'_, str>>` is not implemented for `PathBuf`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = help: the following other types implement trait `From<T>`:
10              <PathBuf as 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 for `Cow<'_, str>` to implement `Into<PathBuf>`
16 note: required by a bound in `func`
17   --> $DIR/issue-90101.rs:3:20
18    |
19 LL | fn func(path: impl Into<PathBuf>, code: impl Into<String>) {}
20    |                    ^^^^^^^^^^^^^ required by this bound in `func`
21
22 error: aborting due to previous error
23
24 For more information about this error, try `rustc --explain E0277`.