Skip to content

Instantly share code, notes, and snippets.

@drewdeponte
Created July 14, 2017 05:11
Show Gist options
  • Save drewdeponte/8b6e8ac8d756a3451bad918983f3145d to your computer and use it in GitHub Desktop.
Save drewdeponte/8b6e8ac8d756a3451bad918983f3145d to your computer and use it in GitHub Desktop.
struct PossibleAlternatePath {
path: std::path::Path
}
impl From<std::path::Path> for PossibleAlternatePath {
fn from(path: std::path::Path) -> Self {
PossibleAlternatePath { path: path }
}
}
//error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `PossibleAlternatePath`
// --> src/main.rs:32:6
// |
//32 | impl From<std::path::Path> for PossibleAlternatePath {
// | ^^^^^^^^^^^^^^^^^^^^^ within `PossibleAlternatePath`, the trait `std::marker::Sized` is not implemented for `[u8]`
// |
// = note: `[u8]` does not have a constant size known at compile-time
// = note: required because it appears within the type `PossibleAlternatePath`
// = note: required by `std::convert::From`
//error: aborting due to previous error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment