about summary refs log tree commit diff
path: root/compiler/rustc_plugin_impl/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-23 15:12:09 +0000
committerbors <bors@rust-lang.org>2022-08-23 15:12:09 +0000
commita1bea1551b8312b6abfbbf7d49bafac2e6ce8ee4 (patch)
tree0ed13d7fbdb1bbecb2499452d47625c915ec93b2 /compiler/rustc_plugin_impl/src/errors.rs
parent1cff5642037b83ce1239a624bbe617a9aa0d59b1 (diff)
parent28ead17745916a602fed4ed41a104fb7856544f5 (diff)
downloadrust-a1bea1551b8312b6abfbbf7d49bafac2e6ce8ee4.tar.gz
rust-a1bea1551b8312b6abfbbf7d49bafac2e6ce8ee4.zip
Auto merge of #100920 - Dylan-DPC:rollup-vlcw3sr, r=Dylan-DPC
Rollup of 9 pull requests

Successful merges:

 - #99249 (Do not re-parse function signatures to suggest generics)
 - #100309 (Extend comma suggestion to cases where fields arent missing)
 - #100368 (InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed>)
 - #100768 (Migrate `rustc_plugin_impl` to `SessionDiagnostic`)
 - #100835 (net listen backlog update, follow-up from #97963.)
 - #100851 (Fix rustc_parse_format precision & width spans)
 - #100857 (Refactor query modifier parsing)
 - #100907 (Fix typo in UnreachableProp)
 - #100909 (Minor `ast::LitKind` improvements)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_plugin_impl/src/errors.rs')
-rw-r--r--compiler/rustc_plugin_impl/src/errors.rs20
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,
+}