GitHub PushEvent at 2014-04-10 14:26:25
Repository: rust
Actor: alexcrichton
Payload: {"shas":[["b36b2e89043fbaafb973999432306879e4348f29","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","rustc: Disallow importing through use statements\n\nResolve is currently erroneously allowing imports through private `use`\nstatements in some circumstances, even across module boundaries. For example,\nthis code compiles successfully today:\n\n    use std::c_str;\n    mod test {\n        use c_str::CString;\n    }\n\nThis should not be allowed because it was explicitly decided that private `use`\nstatements are purely bringing local names into scope, they are not\nparticipating further in name resolution.\n\nAs a consequence of this patch, this code, while valid today, is now invalid:\n\n    mod test {\n        use std::c_str;\n\n        unsafe fn foo() {\n            ::test::c_str::CString::new(0 as *u8, false);\n        }\n    }\n\nWhile plausibly acceptable, I found it to be more consistent if private imports\nwere only considered candidates to resolve the first component in a path, and no\nothers.\n\nCloses #12612","Alex Crichton",true],["015a9c58b2925a8ee1e31aede71740b9d5a5ec8f","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","rustc: Don't succeed on shadowed nonexistent import\n\nPreviously resolve was checking the \"import resolution\" for whether an import\nhad succeeded or not, but this was the same structure filled in by a previous\nimport if a name is shadowed. Instead, this alters resolve to consult the local\nresolve state (as opposed to the shared one) to test whether an import succeeded\nor not.\n\nCloses #13404","Alex Crichton",true],["1100f0ad1783bd87d444406ab394ca405f0ab9a9","60c6d277a8bd81de7fdde19201bf9c58a3df08f4@alexcrichton.com","rustc: Don't allow priv use to shadow pub use\n\nPreviously, a private use statement would shadow a public use statement, all of\na sudden publicly exporting the privately used item. The correct behavior here\nis to only shadow the use for the module in question, but for now it just\nreverts the entire name to private so the pub use doesn't have much effect.\n\nThe behavior isn't exactly what we want, but this no longer has backwards\ncompatibility hazards.","Alex Crichton",true]],"size":3,"ref":"refs/heads/resolve-fixes","head":"1100f0ad1783bd87d444406ab394ca405f0ab9a9"}