Skip to content

Instantly share code, notes, and snippets.

@lifthrasiir
Created February 11, 2013 13:53
Show Gist options
  • Save lifthrasiir/4754534 to your computer and use it in GitHub Desktop.
Save lifthrasiir/4754534 to your computer and use it in GitHub Desktop.
Rust import problems (valid as of 19dfec2)
// crate name requires an absolute path???? (non-working)
mod A { pub fn x() { core::io::stdout(); } }
fn main() { A::x(); }
// crate name requires an absolute path???? (working)
mod A { pub fn x() { ::core::io::stdout(); } }
fn main() { A::x(); }
// core::io shadowed by A::*???? (non-working)
mod A { }
use io::{ReaderUtil, WriterUtil};
use A::*;
fn main() { }
// core::io shadowed by A::*???? (working)
mod A { }
use A::*;
use io::{ReaderUtil, WriterUtil};
fn main() { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment