]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | // Copyright 2015 The Rust Project Developers. See the COPYRIGHT |
223e47cc LB |
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 | ||
041b39d2 XL |
11 | use std::ops::Add; //~ NOTE previous import of the trait `Add` here |
12 | use std::ops::Sub; //~ NOTE previous import of the trait `Sub` here | |
13 | use std::ops::Mul; //~ NOTE previous import of the trait `Mul` here | |
14 | use std::ops::Div; //~ NOTE previous import of the trait `Div` here | |
15 | use std::ops::Rem; //~ NOTE previous import of the trait `Rem` here | |
85aaf69f | 16 | |
041b39d2 XL |
17 | type Add = bool; //~ ERROR the name `Add` is defined multiple times |
18 | //~| `Add` redefined here | |
19 | //~| NOTE `Add` must be defined only once in the type namespace of this module | |
20 | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times | |
21 | //~| `Sub` redefined here | |
22 | //~| NOTE `Sub` must be defined only once in the type namespace of this module | |
23 | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times | |
24 | //~| `Mul` redefined here | |
25 | //~| NOTE `Mul` must be defined only once in the type namespace of this module | |
26 | mod Div { } //~ ERROR the name `Div` is defined multiple times | |
27 | //~| `Div` redefined here | |
28 | //~| NOTE `Div` must be defined only once in the type namespace of this module | |
29 | trait Rem { } //~ ERROR the name `Rem` is defined multiple times | |
30 | //~| `Rem` redefined here | |
31 | //~| NOTE `Rem` must be defined only once in the type namespace of this module | |
223e47cc LB |
32 | |
33 | fn main() {} |