Skip to content

Instantly share code, notes, and snippets.

@KokaKiwi
Created July 2, 2015 09:21
Show Gist options
  • Save KokaKiwi/2084b4bb800dd6a08939 to your computer and use it in GitHub Desktop.
Save KokaKiwi/2084b4bb800dd6a08939 to your computer and use it in GitHub Desktop.
$ rustc --crate-type lib lib.rs
lib.rs:8:8: 4:52 error: illegal cast: `&'static [u8; 5]` as `*mut u8`
(internal compiler error: unprintable span)
lib.rs:2:1: 6:3 note: in expansion of jerry!
lib.rs:8:1: 8:19 note: expansion site
error: aborting due to previous error
macro_rules! jerry(
($name:expr) => {
pub static NAME: *mut u8 = $name as *mut u8;
}
);
jerry!(b"Kiwi\0");
$ rustc -Vv
rustc 1.3.0-nightly (faa04a8b9 2015-06-30)
binary: rustc
commit-hash: faa04a8b9c326bb71b1d21e962dd96912ce234c6
commit-date: 2015-06-30
host: x86_64-unknown-linux-gnu
release: 1.3.0-nightly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment