Last active
December 25, 2015 12:59
-
-
Save zokier/6980278 to your computer and use it in GitHub Desktop.
This file contains 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
trait Foo {} | |
struct Bar; | |
impl Foo for Bar {} | |
fn main() { | |
let a: @Foo = @Bar as @Foo; | |
let b = a as @Bar; | |
} |
This file contains 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
$ rustc non-scalar_cast.rs | |
non-scalar_cast.rs:9:12: 9:21 error: non-scalar cast: `@Foo:'static` as `@Bar` | |
non-scalar_cast.rs:9 let b = a as @Bar; | |
^~~~~~~~~ | |
error: aborting due to previous error | |
task '<unnamed>' failed at 'explicit failure', /build/rust-git/src/rust/src/libsyntax/diagnostic.rs:98 | |
task '<unnamed>' failed at 'explicit failure', /build/rust-git/src/rust/src/librustc/rustc.rs:391 | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment