]> git.lizzy.rs Git - rust.git/commitdiff
Add error description for E0455
authorCristian Oliveira <contato@cristianoliveira.com.br>
Wed, 4 May 2016 03:40:53 +0000 (00:40 -0300)
committerCristian Oliveira <contato@cristianoliveira.com.br>
Tue, 10 May 2016 23:16:29 +0000 (20:16 -0300)
- Adding name attribute to the sample code - Fix description sentences

src/librustc_metadata/diagnostics.rs

index 8fa23de9a2d16ffc618ea2a865a6d50f9b7def8d..ae9f500c5de59113ba5165bffa00c42feca1663a 100644 (file)
 ```
 "##,
 
+E0455: r##"
+Linking with `kind=framework` is only supported when targeting OS X,
+as frameworks are specific to that operating system.
+
+Erroneous code example:
+
+```compile_fail"
+#[link(name = "FooCoreServices",  kind = "framework")] extern {}
+// OS used to compile is Linux for example
+```
+
+To solve this error you can use conditional compilation:
+
+```
+#[cfg_attr(target="macos", link(name = "FooCoreServices", kind = "framework"))]
+extern {}
+```
+
+See more: https://doc.rust-lang.org/book/conditional-compilation.html
+"##,
+
 E0458: r##"
 An unknown "kind" was specified for a link attribute. Erroneous code example:
 
@@ -73,7 +94,6 @@
 }
 
 register_diagnostics! {
-    E0455, // native frameworks are only available on OSX targets
     E0456, // plugin `..` is not available for triple `..`
     E0457, // plugin `..` only found in rlib format, but must be available...
     E0514, // metadata version mismatch