about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-05-15 20:13:40 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-05-15 20:13:40 +0530
commit03ec483a72a76e63fc09c64b34f0bbd293a4c162 (patch)
treea108640459fd2a43287d61f829d8f5264de92ef1 /src
parentc3086c2ef839a42f0cfa00df1b00785a975de8d3 (diff)
parent85e02429b2ef07e11a40ebf6df28b37bcba528b2 (diff)
downloadrust-03ec483a72a76e63fc09c64b34f0bbd293a4c162.tar.gz
rust-03ec483a72a76e63fc09c64b34f0bbd293a4c162.zip
Rollup merge of #33393 - cristianoliveira:docs-error-explanation, r=steveklabnik
Add error description for E0455

r? @GuillaumeGomez.

About this error there is no much thing to explain. The short description says enough to understand. Feel free to review.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_metadata/diagnostics.rs22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/librustc_metadata/diagnostics.rs b/src/librustc_metadata/diagnostics.rs
index 8fa23de9a2d..ae9f500c5de 100644
--- a/src/librustc_metadata/diagnostics.rs
+++ b/src/librustc_metadata/diagnostics.rs
@@ -26,6 +26,27 @@ name. Example:
 ```
 "##,
 
+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 @@ well, and you link to them the same way.
 }
 
 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