]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/auxiliary/use_from_trait_xc.rs
New upstream version 1.20.0+dfsg1
[rustc.git] / src / test / compile-fail / auxiliary / use_from_trait_xc.rs
CommitLineData
1a4d82fc
JJ
1// Copyright 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.
4//
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.
10
e9174d1e 11
1a4d82fc
JJ
12pub use self::sub::{Bar, Baz};
13
970d7e83 14pub trait Trait {
85aaf69f 15 fn foo(&self);
e9174d1e
SL
16 type Assoc;
17 const CONST: u32;
970d7e83
LB
18}
19
20struct Foo;
21
22impl Foo {
23 pub fn new() {}
e9174d1e
SL
24
25 pub const C: u32 = 0;
970d7e83 26}
1a4d82fc
JJ
27
28mod sub {
29 pub struct Bar;
30
31 impl Bar {
32 pub fn new() {}
33 }
34
35 pub enum Baz {}
36
37 impl Baz {
38 pub fn new() {}
39 }
40}