Skip to content

Commit fc5cf8c

Browse files
committed
Fix nightly warnings related to lifetimes
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
1 parent 9704865 commit fc5cf8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/platform/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#[cfg(feature="texture_surface")]
22
use layers::platform::surface::NativeDisplay;
33

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

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

0 commit comments

Comments
 (0)