Created
August 23, 2012 20:09
-
-
Save killerswan/3441029 to your computer and use it in GitHub Desktop.
ICE with &FSyncable (all the gory details)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kunix:rust $ git diff | |
| diff --git a/src/libcore/io.rs b/src/libcore/io.rs | |
| index 046d155..7f437cf 100644 | |
| --- a/src/libcore/io.rs | |
| +++ b/src/libcore/io.rs | |
| @@ -4,6 +4,9 @@ Module: io | |
| Basic input/output | |
| */ | |
| +#[forbid(deprecated_mode)]; | |
| +#[forbid(deprecated_pattern)]; | |
| + | |
| import result::result; | |
| import dvec::{DVec, dvec}; | |
| @@ -812,10 +815,10 @@ mod fsync { | |
| trait FSyncable { fn fsync(l: Level) -> int; } | |
| // Call o.fsync after executing blk | |
| - fn obj_sync(&&o: FSyncable, opt_level: option<Level>, | |
| + fn obj_sync(o: &FSyncable, opt_level: option<Level>, | |
| blk: fn(&&Res<FSyncable>)) { | |
| blk(Res({ | |
| - val: o, opt_level: opt_level, | |
| + val: *o, opt_level: opt_level, | |
| fsync_fn: fn@(&&o: FSyncable, l: Level) -> int { | |
| return o.fsync(l); | |
| } | |
| kunix:rust $ | |
| kunix:rust $ | |
| kunix:rust $ | |
| kunix:rust $ make | |
| cfg: shell host triple x86_64-unknown-linux-gnu | |
| cfg: host for x86_64-unknown-linux-gnu is x86_64 | |
| cfg: unix-y environment | |
| cfg: using gcc | |
| cfg: no llnextgen found, omitting grammar-verification | |
| compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore.so | |
| /code/rust/src/libcore/io.rs:818:20: 818:29 error: internal compiler error: unimplemented `~trait` and `&trait` are unimplemented; use `@trait` instead for now | |
| /code/rust/src/libcore/io.rs:818 fn obj_sync(o: &FSyncable, opt_level: option<Level>, | |
| ^~~~~~~~~ | |
| make: *** [x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore.so] Error 101 | |
| kunix:rust $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment