librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc

This commit is contained in:
Patrick Walton
2013-01-08 11:12:16 -08:00
parent fd872284bb
commit a8d37af247
250 changed files with 1342 additions and 453 deletions

View File

@@ -19,6 +19,7 @@ Miscellaneous helpers for common patterns.
#[forbid(deprecated_pattern)];
use cmp::Eq;
use prelude::*;
/// The identity function.
#[inline(always)]
@@ -104,6 +105,10 @@ pub fn unreachable() -> ! {
mod tests {
#[legacy_exports];
use option::{None, Some};
use util::{NonCopyable, id, replace, swap};
#[test]
fn identity_crisis() {
// Writing a test for the identity function. How did it come to this?