Skip to content

Instantly share code, notes, and snippets.

@glinscott
Created July 7, 2013 05:20
Show Gist options
  • Save glinscott/5942408 to your computer and use it in GitHub Desktop.
Save glinscott/5942408 to your computer and use it in GitHub Desktop.
use std::str;
pub struct S2<'self> {
priv iter: std::str::StrCharIterator<'self>,
}
use std::str;
mod bug;
pub struct S1<'self> {
priv iter: std::str::StrCharIterator<'self>,
}
fn main() {
let s = S1 {
iter: "".iter()
};
}
@glinscott
Copy link
Author

Output from "rust build -O main.rs"

bug.rs:4:15: 4:47 error: unresolved name
bug.rs:4     priv iter: std::str::StrCharIterator<'self>,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bug.rs:4:15: 4:47 error: use of undeclared module `std::str`
bug.rs:4     priv iter: std::str::StrCharIterator<'self>,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bug.rs:4:15: 4:47 error: use of undeclared type name `std::str::StrCharIterator`
bug.rs:4     priv iter: std::str::StrCharIterator<'self>,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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