From 5e07f5a792329674f6849c1da688e36499983532 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Tue, 13 Jan 2015 10:11:34 +0200 Subject: [PATCH] Added another test with success local-item shadowing --- src/test/run-pass/blind-item-local-shadow.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/run-pass/blind-item-local-shadow.rs diff --git a/src/test/run-pass/blind-item-local-shadow.rs b/src/test/run-pass/blind-item-local-shadow.rs new file mode 100644 index 00000000000..d019215ca04 --- /dev/null +++ b/src/test/run-pass/blind-item-local-shadow.rs @@ -0,0 +1,19 @@ +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +mod bar { + pub fn foo() -> uint { 42 } +} + +fn main() { + let foo = |&:| 5u; + use bar::foo; + assert_eq!(foo(), 5u); +} -- 2.44.0