]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/issue-24081.rs
New upstream version 1.20.0+dfsg1
[rustc.git] / src / test / compile-fail / issue-24081.rs
CommitLineData
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
11use std::ops::Add; //~ NOTE previous import of the trait `Add` here
12use std::ops::Sub; //~ NOTE previous import of the trait `Sub` here
13use std::ops::Mul; //~ NOTE previous import of the trait `Mul` here
14use std::ops::Div; //~ NOTE previous import of the trait `Div` here
15use std::ops::Rem; //~ NOTE previous import of the trait `Rem` here
85aaf69f 16
041b39d2
XL
17type 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
20struct 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
23enum 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
26mod 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
29trait 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
33fn main() {}