Skip to content

Instantly share code, notes, and snippets.

@SiegeLord
Created September 28, 2013 02:17
Show Gist options
  • Select an option

  • Save SiegeLord/6737708 to your computer and use it in GitHub Desktop.

Select an option

Save SiegeLord/6737708 to your computer and use it in GitHub Desktop.
Private implementation
use B::*;
pub struct S;
mod B
{
impl super::S
{
fn new()
{
super::S
}
}
}
fn main()
{
let s = S::new();
}
/*
test.rs:17:9: 17:15 error: unresolved name
test.rs:17 let s = S::new();
^~~~~~
test.rs:17:9: 17:15 error: use of undeclared module `S`
test.rs:17 let s = S::new();
^~~~~~
test.rs:17:9: 17:15 error: unresolved name `S::new`.
test.rs:17 let s = S::new();
^~~~~~
error: aborting due to 3 previous errors
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment