librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user