File tree Expand file tree Collapse file tree 8 files changed +172
-0
lines changed Expand file tree Collapse file tree 8 files changed +172
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ #![ crate_type="rlib" ]
12
+ #![ allow( warnings) ]
13
+
14
+ #[ export_name="fail" ]
15
+ pub fn a ( ) {
16
+ }
17
+
18
+ #[ export_name="fail" ]
19
+ pub fn b ( ) {
20
+ //~^ symbol `fail` already exists
21
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ #![ crate_type="rlib" ]
12
+ #![ allow( warnings) ]
13
+
14
+ mod a {
15
+ #[ no_mangle]
16
+ pub extern fn fail ( ) {
17
+ }
18
+ }
19
+
20
+ mod b {
21
+ #[ no_mangle]
22
+ pub extern fn fail ( ) {
23
+ //~^ symbol `fail` already exists
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ #![ crate_type="rlib" ]
12
+ #![ allow( warnings) ]
13
+
14
+ #[ export_name="fail" ]
15
+ pub fn a ( ) {
16
+ }
17
+
18
+ #[ no_mangle]
19
+ pub fn fail ( ) {
20
+ //~^ symbol `fail` already exists
21
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ #![ crate_type="rlib" ]
12
+ #![ allow( warnings) ]
13
+
14
+
15
+ pub trait A {
16
+ fn fail ( self ) ;
17
+ }
18
+
19
+ struct B ;
20
+ struct C ;
21
+
22
+ impl A for B {
23
+ #[ no_mangle]
24
+ fn fail ( self ) { }
25
+ }
26
+
27
+ impl A for C {
28
+ #[ no_mangle]
29
+ fn fail ( self ) { }
30
+ //~^ symbol `fail` already exists
31
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ #![ crate_type="rlib" ]
12
+ #![ allow( warnings) ]
13
+
14
+ #[ export_name="fail" ]
15
+ static HELLO : u8 = 0 ;
16
+
17
+ #[ export_name="fail" ]
18
+ pub fn b ( ) {
19
+ //~^ symbol `fail` already exists
20
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ #![ crate_type="rlib" ]
11
+ #![ allow( warnings) ]
12
+
13
+ #[ export_name="fail" ]
14
+ static HELLO : u8 = 0 ;
15
+
16
+ #[ export_name="fail" ]
17
+ static HELLO_TWICE : u16 = 0 ;
18
+ //~^ symbol `fail` already exists
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ #![ crate_type="rlib" ]
12
+ #![ allow( warnings) ]
13
+
14
+ extern {
15
+ fn fail ( ) ;
16
+ }
17
+
18
+ #[ export_name="fail" ]
19
+ pub fn a ( ) {
20
+ //~^ symbol `fail` already exists
21
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 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
+ //
11
+ // error-pattern: entry symbol `main` defined multiple times
12
+ #![ allow( warnings) ]
13
+
14
+ #[ no_mangle]
15
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments