2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(unused_must_use)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2013-06-26 10:37:25 -07:00
|
|
|
mod x {
|
2015-03-25 17:06:52 -07:00
|
|
|
pub fn g() -> usize {14}
|
2013-06-26 10:37:25 -07:00
|
|
|
}
|
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main(){
|
2013-06-26 10:37:25 -07:00
|
|
|
// should *not* shadow the module x:
|
2015-01-25 22:05:03 +01:00
|
|
|
let x = 9;
|
2013-06-26 10:37:25 -07:00
|
|
|
// use it to avoid warnings:
|
|
|
|
x+3;
|
|
|
|
assert_eq!(x::g(),14);
|
|
|
|
}
|