diff options
| author | Chris Midgley <chris.midgley@dunecomputers.co.uk> | 2021-07-27 18:06:34 +0100 |
|---|---|---|
| committer | Chris Midgley <chris.midgley@dunecomputers.co.uk> | 2021-07-27 18:06:34 +0100 |
| commit | 7f563f7f4e279c9a556537f0b99e9eec076782ae (patch) | |
| tree | e4e82652c4bc29233f4ceae0096c664a0aff5774 /compiler/rustc_error_codes/src | |
| parent | 3bc9dd0dd293ab82945e35888ed6d7ab802761ef (diff) | |
| download | rust-7f563f7f4e279c9a556537f0b99e9eec076782ae.tar.gz rust-7f563f7f4e279c9a556537f0b99e9eec076782ae.zip | |
Add long explanation for E0498
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0498.md | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes.rs b/compiler/rustc_error_codes/src/error_codes.rs index 6f65d386f0d..65999ba707c 100644 --- a/compiler/rustc_error_codes/src/error_codes.rs +++ b/compiler/rustc_error_codes/src/error_codes.rs @@ -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 diff --git a/compiler/rustc_error_codes/src/error_codes/E0498.md b/compiler/rustc_error_codes/src/error_codes/E0498.md new file mode 100644 index 00000000000..822a1a9138a --- /dev/null +++ b/compiler/rustc_error_codes/src/error_codes/E0498.md @@ -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`: + +``` +#![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 |
