File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,27 @@ name. Example:
2626```
2727"## ,
2828
29+ E0455 : r##"
30+ Linking with `kind=framework` is only supported when targeting OS X,
31+ as frameworks are specific to that operating system.
32+
33+ Erroneous code example:
34+
35+ ```compile_fail"
36+ #[link(name = "FooCoreServices", kind = "framework")] extern {}
37+ // OS used to compile is Linux for example
38+ ```
39+
40+ To solve this error you can use conditional compilation:
41+
42+ ```
43+ #[cfg_attr(target="macos", link(name = "FooCoreServices", kind = "framework"))]
44+ extern {}
45+ ```
46+
47+ See more: https://doc.rust-lang.org/book/conditional-compilation.html
48+ "## ,
49+
2950E0458 : r##"
3051An unknown "kind" was specified for a link attribute. Erroneous code example:
3152
@@ -73,7 +94,6 @@ well, and you link to them the same way.
7394}
7495
7596register_diagnostics ! {
76- E0455 , // native frameworks are only available on OSX targets
7797 E0456 , // plugin `..` is not available for triple `..`
7898 E0457 , // plugin `..` only found in rlib format, but must be available...
7999 E0514 , // metadata version mismatch
You can’t perform that action at this time.
0 commit comments