diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-08-23 20:40:04 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-23 20:40:04 +0530 |
| commit | 35f2d125ca6194cd4b6eabdf19d7c49f050eab28 (patch) | |
| tree | 0c1319a576dec756e8fc7b234b9c76aa8470335f /compiler/rustc_plugin_impl/src/errors.rs | |
| parent | f42cdf76e16693b5d5e677a41dd31c7d5cc42a14 (diff) | |
| parent | 8c2413c4c609127db344044d6740c9de03aa7ce2 (diff) | |
| download | rust-35f2d125ca6194cd4b6eabdf19d7c49f050eab28.tar.gz rust-35f2d125ca6194cd4b6eabdf19d7c49f050eab28.zip | |
Rollup merge of #100768 - Facel3ss1:plugin-impl-translation, r=davidtwco
Migrate `rustc_plugin_impl` to `SessionDiagnostic` Migration of the `rustc_plugin_impl` crate. ~Draft PR because it is blocked on #100694 for `#[fatal(...)]` support~ (this has been merged, and I've changed over to `#[diag(...)]` now too), but I would also like to know if what I did with `LoadPluginError` is okay, because all it does is display the error message from `libloading` ([See conversation on zulip](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.23100717.20diagnostic.20translation/near/294327843)). This crate is apparently for a deprecated feature which is used by servo, so I don't know how much this matters anyway.
Diffstat (limited to 'compiler/rustc_plugin_impl/src/errors.rs')
| -rw-r--r-- | compiler/rustc_plugin_impl/src/errors.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_plugin_impl/src/errors.rs b/compiler/rustc_plugin_impl/src/errors.rs new file mode 100644 index 00000000000..2bdb6e4feca --- /dev/null +++ b/compiler/rustc_plugin_impl/src/errors.rs @@ -0,0 +1,20 @@ +//! Errors emitted by plugin_impl + +use rustc_macros::SessionDiagnostic; +use rustc_span::Span; + +#[derive(SessionDiagnostic)] +#[diag(plugin_impl::load_plugin_error)] +pub struct LoadPluginError { + #[primary_span] + pub span: Span, + pub msg: String, +} + +#[derive(SessionDiagnostic)] +#[diag(plugin_impl::malformed_plugin_attribute, code = "E0498")] +pub struct MalformedPluginAttribute { + #[primary_span] + #[label] + pub span: Span, +} |
