1 syntax::register_diagnostics! {
3 A link name was given with an empty name. Erroneous code example:
5 ```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
6 #[link(name = "")] extern {}
7 // error: `#[link(name = "")]` given with empty name
10 The rust compiler cannot link to an external library if you don't give it its
14 #[link(name = "some_lib")] extern {} // ok!
19 Linking with `kind=framework` is only supported when targeting macOS,
20 as frameworks are specific to that operating system.
22 Erroneous code example:
24 ```ignore (should-compile_fail-but-cannot-doctest-conditionally-without-macos)
25 #[link(name = "FooCoreServices", kind = "framework")] extern {}
26 // OS used to compile is Linux for example
29 To solve this error you can use conditional compilation:
32 #[cfg_attr(target="macos", link(name = "FooCoreServices", kind = "framework"))]
37 https://doc.rust-lang.org/reference/attributes.html#conditional-compilation
41 An unknown "kind" was specified for a link attribute. Erroneous code example:
43 ```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
44 #[link(kind = "wonderful_unicorn")] extern {}
45 // error: unknown kind: `wonderful_unicorn`
48 Please specify a valid "kind" value, from one of the following:
57 A link was used without a name parameter. Erroneous code example:
59 ```ignore (cannot-test-this-because-rustdoc-stops-compile-fail-before-codegen)
60 #[link(kind = "dylib")] extern {}
61 // error: `#[link(...)]` specified without `name = "foo"`
64 Please add the name parameter to allow the rust compiler to find the library
68 #[link(kind = "dylib", name = "some_lib")] extern {} // ok!
73 A plugin/crate was declared but cannot be found. Erroneous code example:
77 #![plugin(cookie_monster)] // error: can't find crate for `cookie_monster`
78 extern crate cake_is_a_lie; // error: can't find crate for `cake_is_a_lie`
81 You need to link your code to the relevant crate in order to be able to use it
82 (through Cargo or the `-L` option of rustc example). Plugins are crates as
83 well, and you link to them the same way.
86 E0456, // plugin `..` is not available for triple `..`
87 E0457, // plugin `..` only found in rlib format, but must be available...
88 E0514, // metadata version mismatch
89 E0460, // found possibly newer version of crate `..`
90 E0461, // couldn't find crate `..` with expected target triple ..
91 E0462, // found staticlib `..` instead of rlib or dylib
92 E0464, // multiple matching crates for `..`
93 E0465, // multiple .. candidates for `..` found
94 E0519, // local crate and dependency have same (crate-name, disambiguator)
95 // two dependencies have same (crate-name, disambiguator) but different SVH