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.
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.
11 #![allow(non_snake_case)]
13 register_long_diagnostics! {
15 A link name was given with an empty name. Erroneous code example:
18 #[link(name = "")] extern {} // error: #[link(name = "")] given with empty name
21 The rust compiler cannot link to an external library if you don't give it its
25 #[link(name = "some_lib")] extern {} // ok!
30 An unknown "kind" was specified for a link attribute. Erroneous code example:
33 #[link(kind = "wonderful_unicorn")] extern {}
34 // error: unknown kind: `wonderful_unicorn`
37 Please specify a valid "kind" value, from one of the following:
44 A link was used without a name parameter. Erroneous code example:
47 #[link(kind = "dylib")] extern {}
48 // error: #[link(...)] specified without `name = "foo"`
51 Please add the name parameter to allow the rust compiler to find the library
55 #[link(kind = "dylib", name = "some_lib")] extern {} // ok!
61 register_diagnostics! {
62 E0455, // native frameworks are only available on OSX targets
63 E0456, // plugin `..` is not available for triple `..`
64 E0457, // plugin `..` only found in rlib format, but must be available...
65 E0514, // metadata version mismatch
66 E0460, // found possibly newer version of crate `..`
67 E0461, // couldn't find crate `..` with expected target triple ..
68 E0462, // found staticlib `..` instead of rlib or dylib
69 E0463, // can't find crate for `..`
70 E0464, // multiple matching crates for `..`
71 E0465, // multiple .. candidates for `..` found
72 E0466, // bad macro import
73 E0467, // bad macro reexport
74 E0468, // an `extern crate` loading macros must be at the crate root
75 E0469, // imported macro not found
76 E0470, // reexported macro not found