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/platform/mod.rs:7:5: 7:56 warning: the trait `core::marker::Sized` is not implemented for the type `Self` [E0277]
src/platform/mod.rs:7     fn create_headless() -> Result<Self, &'static str>;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/platform/mod.rs:7:5: 7:56 help: run `rustc --explain E0277` to see a detailed explanation
src/platform/mod.rs:7:5: 7:56 note: `Self` does not have a constant size known at compile-time
src/platform/mod.rs:7     fn create_headless() -> Result<Self, &'static str>;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/platform/mod.rs:7:5: 7: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/platform/mod.rs:7     fn create_headless() -> Result<Self, &'static str>;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/platform/mod.rs:7:5: 7:56 note: required by `core::result::Result`
src/platform/mod.rs:7     fn create_headless() -> Result<Self, &'static str>;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

...because of:

rust-lang/rfcs#1214
  • Loading branch information
frewsxcv committed Sep 2, 2015
1 parent 9704865 commit fc5cf8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[cfg(feature="texture_surface")]
use layers::platform::surface::NativeDisplay;

pub trait NativeGLContextMethods {
pub trait NativeGLContextMethods: Sized {
fn get_proc_address(&str) -> *const ();

fn create_headless() -> Result<Self, &'static str>;
Expand Down

0 comments on commit fc5cf8c

Please sign in to comment.