1 // Copyright 2018 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.
13 #![feature(uniform_paths)]
15 pub const A: usize = 0;
18 pub const B: usize = 1;
21 pub const C: usize = 2;
28 pub fn test() -> String {
29 format!("{} {} {}", crate::A, crate::foo::B, C)
32 pub fn test_use() -> String {
36 format!("{} {} {}", A, B, C)
39 pub fn test_enum() -> String {
42 V1(i) => { format!("V1: {}", i) }
43 V2(s) => { format!("V2: {}", s) }
48 pub fn test() -> String {
49 format!("{} {} {}", crate::A, B, bar::C)
52 pub fn test_use() -> String {
56 format!("{} {} {}", A, B, C)
59 pub fn test_enum() -> String {
61 match bar::E::V1(10) {
62 V1(i) => { format!("V1: {}", i) }
63 V2(s) => { format!("V2: {}", s) }
68 pub fn test() -> String {
69 format!("{} {} {}", A, foo::B, foo::bar::C)
72 pub fn test_use() -> String {
76 format!("{} {} {}", A, B, C)
79 pub fn test_enum() -> String {
81 match foo::bar::E::V1(10) {
82 V1(i) => { format!("V1: {}", i) }
83 V2(s) => { format!("V2: {}", s) }
97 foo::bar::test_enum(),