Rollup merge of #87521 - midgleyc:long-E0498, r=GuillaumeGomez
Add long explanation for E0498 Helps with #61137
This commit is contained in:
commit
1d5f15f9fb
@ -248,6 +248,7 @@ E0493: include_str!("./error_codes/E0493.md"),
|
||||
E0495: include_str!("./error_codes/E0495.md"),
|
||||
E0496: include_str!("./error_codes/E0496.md"),
|
||||
E0497: include_str!("./error_codes/E0497.md"),
|
||||
E0498: include_str!("./error_codes/E0498.md"),
|
||||
E0499: include_str!("./error_codes/E0499.md"),
|
||||
E0500: include_str!("./error_codes/E0500.md"),
|
||||
E0501: include_str!("./error_codes/E0501.md"),
|
||||
@ -604,7 +605,6 @@ E0783: include_str!("./error_codes/E0783.md"),
|
||||
// E0488, // lifetime of variable does not enclose its declaration
|
||||
// E0489, // type/lifetime parameter not in scope here
|
||||
E0490, // a value of type `..` is borrowed for too long
|
||||
E0498, // malformed plugin attribute
|
||||
E0514, // metadata version mismatch
|
||||
E0519, // local crate and dependency have same (crate-name, disambiguator)
|
||||
// two dependencies have same (crate-name, disambiguator) but different SVH
|
||||
|
22
compiler/rustc_error_codes/src/error_codes/E0498.md
Normal file
22
compiler/rustc_error_codes/src/error_codes/E0498.md
Normal file
@ -0,0 +1,22 @@
|
||||
The `plugin` attribute was malformed.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0498
|
||||
#![feature(plugin)]
|
||||
#![plugin(foo(args))] // error: invalid argument
|
||||
#![plugin(bar="test")] // error: invalid argument
|
||||
```
|
||||
|
||||
The `#[plugin]` attribute should take a single argument: the name of the plugin.
|
||||
|
||||
For example, for the plugin `foo`:
|
||||
|
||||
```ignore (requires external plugin crate)
|
||||
#![feature(plugin)]
|
||||
#![plugin(foo)] // ok!
|
||||
```
|
||||
|
||||
See the [`plugin` feature] section of the Unstable book for more details.
|
||||
|
||||
[`plugin` feature]: https://doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html
|
@ -14,3 +14,4 @@ LL | #![plugin(empty_plugin(args))]
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0498`.
|
||||
|
@ -14,3 +14,4 @@ LL | #![plugin(foo="bleh")]
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0498`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user