Skip to content

Commit 3c29c95

Browse files
authored
Rollup merge of rust-lang#87521 - midgleyc:long-E0498, r=GuillaumeGomez
Add long explanation for E0498 Helps with rust-lang#61137
2 parents b03f637 + bc70252 commit 3c29c95

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

compiler/rustc_error_codes/src/error_codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ E0493: include_str!("./error_codes/E0493.md"),
248248
E0495: include_str!("./error_codes/E0495.md"),
249249
E0496: include_str!("./error_codes/E0496.md"),
250250
E0497: include_str!("./error_codes/E0497.md"),
251+
E0498: include_str!("./error_codes/E0498.md"),
251252
E0499: include_str!("./error_codes/E0499.md"),
252253
E0500: include_str!("./error_codes/E0500.md"),
253254
E0501: include_str!("./error_codes/E0501.md"),
@@ -604,7 +605,6 @@ E0783: include_str!("./error_codes/E0783.md"),
604605
// E0488, // lifetime of variable does not enclose its declaration
605606
// E0489, // type/lifetime parameter not in scope here
606607
E0490, // a value of type `..` is borrowed for too long
607-
E0498, // malformed plugin attribute
608608
E0514, // metadata version mismatch
609609
E0519, // local crate and dependency have same (crate-name, disambiguator)
610610
// two dependencies have same (crate-name, disambiguator) but different SVH
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The `plugin` attribute was malformed.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0498
6+
#![feature(plugin)]
7+
#![plugin(foo(args))] // error: invalid argument
8+
#![plugin(bar="test")] // error: invalid argument
9+
```
10+
11+
The `#[plugin]` attribute should take a single argument: the name of the plugin.
12+
13+
For example, for the plugin `foo`:
14+
15+
```ignore (requires external plugin crate)
16+
#![feature(plugin)]
17+
#![plugin(foo)] // ok!
18+
```
19+
20+
See the [`plugin` feature] section of the Unstable book for more details.
21+
22+
[`plugin` feature]: https://doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html

src/test/ui-fulldeps/plugin-args.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ LL | #![plugin(empty_plugin(args))]
1414

1515
error: aborting due to previous error; 1 warning emitted
1616

17+
For more information about this error, try `rustc --explain E0498`.

src/test/ui/malformed/malformed-plugin-3.stderr

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ LL | #![plugin(foo="bleh")]
1414

1515
error: aborting due to previous error; 1 warning emitted
1616

17+
For more information about this error, try `rustc --explain E0498`.

0 commit comments

Comments
 (0)