]> git.proxmox.com Git - rustc.git/blob - src/test/compile-fail/redundant-link-args.rs
e7cf7c97459075c6299713cc24be6b2777ae4d58
[rustc.git] / src / test / compile-fail / redundant-link-args.rs
1 // Copyright 2012 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 // ignore-test
12
13 // error-pattern:library 'm' already added: can't specify link_args.
14
15 /* I think it should undefined to have multiple modules that link in the same
16 library, but provide different link arguments. Unfortunately we don't track
17 link_args by module -- they are just appended as discovered into the crate
18 store -- but for now, it should be an error to provide link_args on a module
19 that's already been included (with or without link_args). */
20
21 #[link_name= "m"]
22 #[link_args="-foo"] // this could have been elided.
23 extern {
24 }
25
26 #[link_name= "m"]
27 #[link_args="-bar"] // this is the actual error trigger.
28 extern {
29 }