rustc_mir_dataflow/
errors.rs1use rustc_macros::Diagnostic;
2use rustc_span::Span;
3
4#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
StopAfterDataFlowEndedCompilation where
G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
StopAfterDataFlowEndedCompilation => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("stop_after_dataflow ended compilation")));
;
diag
}
}
}
}
};Diagnostic)]
5#[diag("stop_after_dataflow ended compilation")]
6pub(crate) struct StopAfterDataFlowEndedCompilation;
7
8#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
PeekMustBePlaceOrRefPlace where G: rustc_errors::EmissionGuarantee
{
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
PeekMustBePlaceOrRefPlace { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("rustc_peek: argument expression must be either `place` or `&place`")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
9#[diag("rustc_peek: argument expression must be either `place` or `&place`")]
10pub(crate) struct PeekMustBePlaceOrRefPlace {
11 #[primary_span]
12 pub span: Span,
13}
14
15#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
PeekMustBeNotTemporary where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
PeekMustBeNotTemporary { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("dataflow::sanity_check cannot feed a non-temp to rustc_peek")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
16#[diag("dataflow::sanity_check cannot feed a non-temp to rustc_peek")]
17pub(crate) struct PeekMustBeNotTemporary {
18 #[primary_span]
19 pub span: Span,
20}
21
22#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for PeekBitNotSet
where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
PeekBitNotSet { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("rustc_peek: bit not set")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
23#[diag("rustc_peek: bit not set")]
24pub(crate) struct PeekBitNotSet {
25 #[primary_span]
26 pub span: Span,
27}
28
29#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
PeekArgumentNotALocal where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
PeekArgumentNotALocal { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("rustc_peek: argument was not a local")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
30#[diag("rustc_peek: argument was not a local")]
31pub(crate) struct PeekArgumentNotALocal {
32 #[primary_span]
33 pub span: Span,
34}
35
36#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
PeekArgumentUntracked where G: rustc_errors::EmissionGuarantee {
#[track_caller]
fn into_diag(self, dcx: rustc_errors::DiagCtxtHandle<'_sess>,
level: rustc_errors::Level) -> rustc_errors::Diag<'_sess, G> {
match self {
PeekArgumentUntracked { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("rustc_peek: argument untracked")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
37#[diag("rustc_peek: argument untracked")]
38pub(crate) struct PeekArgumentUntracked {
39 #[primary_span]
40 pub span: Span,
41}