1 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Crate use statements
17 static b: bool = false;
19 static b: bool = true;
24 // This symbol doesn't exist and would be a link error if this
25 // module was translated
66 // This needs to parse but would fail in typeck. Since it's not in
67 // the current config it should not be typechecked.
68 pub fn bogus() { return 0; }
72 // Submodules have slightly different code paths than the top-level
73 // module, so let's make sure this jazz works here as well
80 // Since the bogus configuration isn't defined main will just be
81 // parsed, but nothing further will be done with it
83 pub fn main() { panic!() }
86 // Exercise some of the configured items in ways that wouldn't be possible
87 // if they had the bogus definition
95 fn test_in_fn_ctxt() {
107 mod test_foreign_items {
111 pub fn write() -> String;
112 pub fn write() -> String;
117 mod test_use_statements {
127 impl Fooable for Foo {