Skip to content

Commit

Permalink
Rollup merge of rust-lang#33393 - cristianoliveira:docs-error-explana…
Browse files Browse the repository at this point in the history
…tion, 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.
  • Loading branch information
eddyb committed May 13, 2016
2 parents bb7d0ce + 85e0242 commit be92e9b
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/librustc_metadata/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit be92e9b

Please sign in to comment.