Skip to content

Commit

Permalink
Fix nightly warnings related to lifetimes
Browse files Browse the repository at this point in the history
The following warnings appear:

```
src/command.rs:344:5: 344:56 warning: the trait `core::marker::Sized` is not implemented for the type `Self` [E0277]
src/command.rs:344     fn from_json(body: &Json) -> WebDriverResult<Self>;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/command.rs:344:5: 344:56 help: run `rustc --explain E0277` to see a detailed explanation
src/command.rs:344:5: 344:56 note: `Self` does not have a constant size known at compile-time
src/command.rs:344     fn from_json(body: &Json) -> WebDriverResult<Self>;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/command.rs:344:5: 344:56 note: this warning results from recent bug fixes and clarifications; it will become a HARD ERROR in the next release. See RFC 1214 for details.
src/command.rs:344     fn from_json(body: &Json) -> WebDriverResult<Self>;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/command.rs:344:5: 344:56 note: required by `core::result::Result`
src/command.rs:344     fn from_json(body: &Json) -> WebDriverResult<Self>;
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

...because of:

rust-lang/rfcs#1214
  • Loading branch information
frewsxcv committed Sep 2, 2015
1 parent 7fd0a2a commit ba8139e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl ToJson for WebDriverMessage {
}
}

trait Parameters {
trait Parameters: Sized {
fn from_json(body: &Json) -> WebDriverResult<Self>;
}

Expand Down

0 comments on commit ba8139e

Please sign in to comment.