Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Updated to recent nightly Rust
Browse files Browse the repository at this point in the history
As of rustc 1.0.0-nightly (ea6f65c5f 2015-01-06 19:47:08 +0000)
  • Loading branch information
mzabaluev committed Jan 8, 2015
1 parent 23361c3 commit 37e4549
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
1 change: 0 additions & 1 deletion fauxgen/gio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#![crate_type = "lib"]

#![feature(associated_types)]
#![feature(unboxed_closures)]

extern crate grust;
Expand Down
2 changes: 0 additions & 2 deletions fauxgen/gobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#![crate_type = "lib"]

#![feature(associated_types)]

extern crate grust;
extern crate "grust-GLib-2_0" as glib;

Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#![crate_name = "grust"]
#![crate_type = "lib"]

#![feature(associated_types)]
#![feature(macro_rules)]
#![feature(unboxed_closures)]
#![feature(unsafe_destructor)]

extern crate libc;
Expand Down
10 changes: 5 additions & 5 deletions src/wrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ pub unsafe trait Wrapper {
}

#[inline]
pub unsafe fn from_raw<'a, T, Sized? U>(ptr: *const <T as Wrapper>::Raw,
life_anchor: &'a U)
pub unsafe fn from_raw<'a, T, U: ?Sized>(ptr: *const <T as Wrapper>::Raw,
life_anchor: &'a U)
-> &'a T
where T: Wrapper
{
mem::copy_lifetime(life_anchor, &*(ptr as *const T))
}

#[inline]
pub unsafe fn from_raw_mut<'a, T, Sized? U>(ptr: *mut <T as Wrapper>::Raw,
_life_anchor: &'a U)
-> &'a mut T
pub unsafe fn from_raw_mut<'a, T, U: ?Sized>(ptr: *mut <T as Wrapper>::Raw,
_life_anchor: &'a U)
-> &'a mut T
where T: Wrapper
{
mem::transmute(&*(ptr as *mut T))
Expand Down

0 comments on commit 37e4549

Please sign in to comment.