]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: the trait bound `Option<&str>: AsRef<Path>` is not satisfied |
f9f354fc XL |
2 | --> $DIR/issue-72442.rs:12:36 |
3 | | | |
4 | LL | let mut f = File::open(path.to_str())?; | |
1b1a35ee | 5 | | ^^^^^^^^^^^^^ the trait `AsRef<Path>` is not implemented for `Option<&str>` |
f9f354fc | 6 | | |
3dfed10e | 7 | ::: $SRC_DIR/std/src/fs.rs:LL:COL |
f9f354fc XL |
8 | | |
9 | LL | pub fn open<P: AsRef<Path>>(path: P) -> io::Result<File> { | |
1b1a35ee | 10 | | ----------- required by this bound in `File::open` |
f9f354fc XL |
11 | |
12 | error: aborting due to previous error | |
13 | ||
14 | For more information about this error, try `rustc --explain E0277`. |