about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/errors.rs
diff options
context:
space:
mode:
authorMatthew Kelly <matthew.kelly2@gmail.com>2022-08-31 19:39:39 -0400
committerMatthew Kelly <matthew.kelly2@gmail.com>2022-08-31 19:39:39 -0400
commiteda2a401457ba645a32bdc5b9e7e90214e3e4e24 (patch)
tree76c4a12cb26666f03aa37a81abe27782def16f1d /compiler/rustc_mir_dataflow/src/errors.rs
parent4a443dfb8227d407ff3f0542cb6e688833708ba9 (diff)
parent9243168fa5615ec8ebe9164c6bc2fdcccffd08b6 (diff)
Merge remote-tracking branch 'origin/master' into mpk/add-long-error-message-for-E0311
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/errors.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/errors.rs71
1 files changed, 71 insertions, 0 deletions
diff --git a/compiler/rustc_mir_dataflow/src/errors.rs b/compiler/rustc_mir_dataflow/src/errors.rs
new file mode 100644
index 00000000000..cc14257876c
--- /dev/null
+++ b/compiler/rustc_mir_dataflow/src/errors.rs
@@ -0,0 +1,71 @@
+use rustc_macros::SessionDiagnostic;
+use rustc_span::{Span, Symbol};
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::path_must_end_in_filename)]
+pub(crate) struct PathMustEndInFilename {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::unknown_formatter)]
+pub(crate) struct UnknownFormatter {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::duplicate_values_for)]
+pub(crate) struct DuplicateValuesFor {
+    #[primary_span]
+    pub span: Span,
+    pub name: Symbol,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::requires_an_argument)]
+pub(crate) struct RequiresAnArgument {
+    #[primary_span]
+    pub span: Span,
+    pub name: Symbol,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::stop_after_dataflow_ended_compilation)]
+pub(crate) struct StopAfterDataFlowEndedCompilation;
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::peek_must_be_place_or_ref_place)]
+pub(crate) struct PeekMustBePlaceOrRefPlace {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::peek_must_be_not_temporary)]
+pub(crate) struct PeekMustBeNotTemporary {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::peek_bit_not_set)]
+pub(crate) struct PeekBitNotSet {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::peek_argument_not_a_local)]
+pub(crate) struct PeekArgumentNotALocal {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(SessionDiagnostic)]
+#[diag(mir_dataflow::peek_argument_untracked)]
+pub(crate) struct PeekArgumentUntracked {
+    #[primary_span]
+    pub span: Span,
+}