1use std::path::{Path, PathBuf};
2
3use rustc_macros::Diagnostic;
4use rustc_span::{Span, Symbol};
5
6#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
UnrecognizedDepNode 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 {
UnrecognizedDepNode { span: __binding_0, name: __binding_1 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("unrecognized `DepNode` variant: {$name}")));
;
diag.arg("name", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
7#[diag("unrecognized `DepNode` variant: {$name}")]
8pub(crate) struct UnrecognizedDepNode {
9 #[primary_span]
10 pub span: Span,
11 pub name: Symbol,
12}
13
14#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
MissingIfThisChanged 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 {
MissingIfThisChanged { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("no `#[rustc_if_this_changed]` annotation detected")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
15#[diag("no `#[rustc_if_this_changed]` annotation detected")]
16pub(crate) struct MissingIfThisChanged {
17 #[primary_span]
18 pub span: Span,
19}
20
21#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for Ok 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 {
Ok { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("OK")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
22#[diag("OK")]
23pub(crate) struct Ok {
24 #[primary_span]
25 pub span: Span,
26}
27
28#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for NoPath 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 {
NoPath {
span: __binding_0, target: __binding_1, source: __binding_2
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("no path from `{$source}` to `{$target}`")));
;
diag.arg("target", __binding_1);
diag.arg("source", __binding_2);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
29#[diag("no path from `{$source}` to `{$target}`")]
30pub(crate) struct NoPath {
31 #[primary_span]
32 pub span: Span,
33 pub target: Symbol,
34 pub source: String,
35}
36
37#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
AssertionAuto<'a> 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 {
AssertionAuto {
span: __binding_0, name: __binding_1, e: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("`except` specified DepNodes that can not be affected for \"{$name}\": \"{$e}\"")));
;
diag.arg("name", __binding_1);
diag.arg("e", __binding_2);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
38#[diag("`except` specified DepNodes that can not be affected for \"{$name}\": \"{$e}\"")]
39pub(crate) struct AssertionAuto<'a> {
40 #[primary_span]
41 pub span: Span,
42 pub name: &'a str,
43 pub e: &'a str,
44}
45
46#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
UndefinedCleanDirtyItem 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 {
UndefinedCleanDirtyItem {
span: __binding_0, kind: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("clean/dirty auto-assertions not yet defined for Node::Item.node={$kind}")));
;
diag.arg("kind", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
47#[diag("clean/dirty auto-assertions not yet defined for Node::Item.node={$kind}")]
48pub(crate) struct UndefinedCleanDirtyItem {
49 #[primary_span]
50 pub span: Span,
51 pub kind: String,
52}
53
54#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
UndefinedCleanDirty 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 {
UndefinedCleanDirty { span: __binding_0, kind: __binding_1 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("clean/dirty auto-assertions not yet defined for {$kind}")));
;
diag.arg("kind", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
55#[diag("clean/dirty auto-assertions not yet defined for {$kind}")]
56pub(crate) struct UndefinedCleanDirty {
57 #[primary_span]
58 pub span: Span,
59 pub kind: String,
60}
61
62#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
RepeatedDepNodeLabel<'a> 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 {
RepeatedDepNodeLabel { span: __binding_0, label: __binding_1
} => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("dep-node label `{$label}` is repeated")));
;
diag.arg("label", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
63#[diag("dep-node label `{$label}` is repeated")]
64pub(crate) struct RepeatedDepNodeLabel<'a> {
65 #[primary_span]
66 pub span: Span,
67 pub label: &'a str,
68}
69
70#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
UnrecognizedDepNodeLabel<'a> 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 {
UnrecognizedDepNodeLabel {
span: __binding_0, label: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("dep-node label `{$label}` not recognized")));
;
diag.arg("label", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
71#[diag("dep-node label `{$label}` not recognized")]
72pub(crate) struct UnrecognizedDepNodeLabel<'a> {
73 #[primary_span]
74 pub span: Span,
75 pub label: &'a str,
76}
77
78#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
NotDirty<'a> 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 {
NotDirty { span: __binding_0, dep_node_str: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("`{$dep_node_str}` should be dirty but is not")));
;
diag.arg("dep_node_str", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
79#[diag("`{$dep_node_str}` should be dirty but is not")]
80pub(crate) struct NotDirty<'a> {
81 #[primary_span]
82 pub span: Span,
83 pub dep_node_str: &'a str,
84}
85
86#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
NotClean<'a> 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 {
NotClean { span: __binding_0, dep_node_str: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("`{$dep_node_str}` should be clean but is not")));
;
diag.arg("dep_node_str", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
87#[diag("`{$dep_node_str}` should be clean but is not")]
88pub(crate) struct NotClean<'a> {
89 #[primary_span]
90 pub span: Span,
91 pub dep_node_str: &'a str,
92}
93
94#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
NotLoaded<'a> 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 {
NotLoaded { span: __binding_0, dep_node_str: __binding_1 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("`{$dep_node_str}` should have been loaded from disk but it was not")));
;
diag.arg("dep_node_str", __binding_1);
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
95#[diag("`{$dep_node_str}` should have been loaded from disk but it was not")]
96pub(crate) struct NotLoaded<'a> {
97 #[primary_span]
98 pub span: Span,
99 pub dep_node_str: &'a str,
100}
101
102#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for UncheckedClean
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 {
UncheckedClean { span: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("found unchecked `#[rustc_clean]` attribute")));
;
diag.span(__binding_0);
diag
}
}
}
}
};Diagnostic)]
103#[diag("found unchecked `#[rustc_clean]` attribute")]
104pub(crate) struct UncheckedClean {
105 #[primary_span]
106 pub span: Span,
107}
108#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
DeleteOld<'a> 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 {
DeleteOld {
name: __binding_0, path: __binding_1, err: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("unable to delete old {$name} at `{$path}`: {$err}")));
;
diag.arg("name", __binding_0);
diag.arg("path", __binding_1);
diag.arg("err", __binding_2);
diag
}
}
}
}
};Diagnostic)]
109#[diag("unable to delete old {$name} at `{$path}`: {$err}")]
110pub(crate) struct DeleteOld<'a> {
111 pub name: &'a str,
112 pub path: PathBuf,
113 pub err: std::io::Error,
114}
115
116#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
CreateNew<'a> 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 {
CreateNew {
name: __binding_0, path: __binding_1, err: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to create {$name} at `{$path}`: {$err}")));
;
diag.arg("name", __binding_0);
diag.arg("path", __binding_1);
diag.arg("err", __binding_2);
diag
}
}
}
}
};Diagnostic)]
117#[diag("failed to create {$name} at `{$path}`: {$err}")]
118pub(crate) struct CreateNew<'a> {
119 pub name: &'a str,
120 pub path: PathBuf,
121 pub err: std::io::Error,
122}
123
124#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
WriteNew<'a> 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 {
WriteNew {
name: __binding_0, path: __binding_1, err: __binding_2 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to write {$name} to `{$path}`: {$err}")));
;
diag.arg("name", __binding_0);
diag.arg("path", __binding_1);
diag.arg("err", __binding_2);
diag
}
}
}
}
};Diagnostic)]
125#[diag("failed to write {$name} to `{$path}`: {$err}")]
126pub(crate) struct WriteNew<'a> {
127 pub name: &'a str,
128 pub path: PathBuf,
129 pub err: std::io::Error,
130}
131
132#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
CanonicalizePath 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 {
CanonicalizePath { path: __binding_0, err: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("incremental compilation: error canonicalizing path `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
133#[diag("incremental compilation: error canonicalizing path `{$path}`: {$err}")]
134pub(crate) struct CanonicalizePath {
135 pub path: PathBuf,
136 pub err: std::io::Error,
137}
138
139#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
CreateIncrCompDir<'a> 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 {
CreateIncrCompDir {
tag: __binding_0, path: __binding_1, err: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("could not create incremental compilation {$tag} directory `{$path}`: {$err}")));
;
diag.arg("tag", __binding_0);
diag.arg("path", __binding_1);
diag.arg("err", __binding_2);
diag
}
}
}
}
};Diagnostic)]
140#[diag("could not create incremental compilation {$tag} directory `{$path}`: {$err}")]
141pub(crate) struct CreateIncrCompDir<'a> {
142 pub tag: &'a str,
143 pub path: &'a Path,
144 pub err: std::io::Error,
145}
146
147#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
CreateLock<'a> 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 {
CreateLock {
lock_err: __binding_0,
session_dir: __binding_1,
is_unsupported_lock: __binding_2,
is_cargo: __binding_3 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("incremental compilation: could not create session directory lock file: {$lock_err}")));
;
diag.arg("lock_err", __binding_0);
diag.arg("session_dir", __binding_1);
if __binding_2 {
diag.note(rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("the filesystem for the incremental path at {$session_dir} does not appear to support locking, consider changing the incremental path to a filesystem that supports locking or disable incremental compilation")));
}
if __binding_3 {
diag.help(rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("incremental compilation can be disabled by setting the environment variable CARGO_INCREMENTAL=0 (see https://doc.rust-lang.org/cargo/reference/profiles.html#incremental)")));
}
if __binding_3 {
diag.help(rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("the entire build directory can be changed to a different filesystem by setting the environment variable CARGO_TARGET_DIR to a different path (see https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir)")));
}
diag
}
}
}
}
};Diagnostic)]
148#[diag("incremental compilation: could not create session directory lock file: {$lock_err}")]
149pub(crate) struct CreateLock<'a> {
150 pub lock_err: std::io::Error,
151 pub session_dir: &'a Path,
152 #[note(
153 "the filesystem for the incremental path at {$session_dir} does not appear to support locking, consider changing the incremental path to a filesystem that supports locking or disable incremental compilation"
154 )]
155 pub is_unsupported_lock: bool,
156 #[help(
157 "incremental compilation can be disabled by setting the environment variable CARGO_INCREMENTAL=0 (see https://doc.rust-lang.org/cargo/reference/profiles.html#incremental)"
158 )]
159 #[help(
160 "the entire build directory can be changed to a different filesystem by setting the environment variable CARGO_TARGET_DIR to a different path (see https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir)"
161 )]
162 pub is_cargo: bool,
163}
164
165#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
DeleteLock<'a> 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 {
DeleteLock { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("error deleting lock file for incremental compilation session directory `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
166#[diag("error deleting lock file for incremental compilation session directory `{$path}`: {$err}")]
167pub(crate) struct DeleteLock<'a> {
168 pub path: &'a Path,
169 pub err: std::io::Error,
170}
171
172#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
HardLinkFailed<'a> 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 {
HardLinkFailed { path: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("hard linking files in the incremental compilation cache failed. copying files instead. consider moving the cache directory to a file system which supports hard linking in session dir `{$path}`")));
;
diag.arg("path", __binding_0);
diag
}
}
}
}
};Diagnostic)]
173#[diag(
174 "hard linking files in the incremental compilation cache failed. copying files instead. consider moving the cache directory to a file system which supports hard linking in session dir `{$path}`"
175)]
176pub(crate) struct HardLinkFailed<'a> {
177 pub path: &'a Path,
178}
179
180#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
DeletePartial<'a> 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 {
DeletePartial { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to delete partly initialized session dir `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
181#[diag("failed to delete partly initialized session dir `{$path}`: {$err}")]
182pub(crate) struct DeletePartial<'a> {
183 pub path: &'a Path,
184 pub err: std::io::Error,
185}
186
187#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
DeleteFull<'a> 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 {
DeleteFull { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("error deleting incremental compilation session directory `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
188#[diag("error deleting incremental compilation session directory `{$path}`: {$err}")]
189pub(crate) struct DeleteFull<'a> {
190 pub path: &'a Path,
191 pub err: std::io::Error,
192}
193
194#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
Finalize<'a> 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 {
Finalize { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("error finalizing incremental compilation session directory `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
195#[diag("error finalizing incremental compilation session directory `{$path}`: {$err}")]
196pub(crate) struct Finalize<'a> {
197 pub path: &'a Path,
198 pub err: std::io::Error,
199}
200
201#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
InvalidGcFailed<'a> 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 {
InvalidGcFailed { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to garbage collect invalid incremental compilation session directory `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
202#[diag(
203 "failed to garbage collect invalid incremental compilation session directory `{$path}`: {$err}"
204)]
205pub(crate) struct InvalidGcFailed<'a> {
206 pub path: &'a Path,
207 pub err: std::io::Error,
208}
209
210#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
FinalizedGcFailed<'a> 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 {
FinalizedGcFailed { path: __binding_0, err: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to garbage collect finalized incremental compilation session directory `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
211#[diag(
212 "failed to garbage collect finalized incremental compilation session directory `{$path}`: {$err}"
213)]
214pub(crate) struct FinalizedGcFailed<'a> {
215 pub path: &'a Path,
216 pub err: std::io::Error,
217}
218
219#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
SessionGcFailed<'a> 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 {
SessionGcFailed { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to garbage collect incremental compilation session directory `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
220#[diag("failed to garbage collect incremental compilation session directory `{$path}`: {$err}")]
221pub(crate) struct SessionGcFailed<'a> {
222 pub path: &'a Path,
223 pub err: std::io::Error,
224}
225
226#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
AssertNotLoaded 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 {
AssertNotLoaded => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("we asserted that the incremental cache should not be loaded, but it was loaded")));
;
diag
}
}
}
}
};Diagnostic)]
227#[diag("we asserted that the incremental cache should not be loaded, but it was loaded")]
228pub(crate) struct AssertNotLoaded;
229
230#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for AssertLoaded
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 {
AssertLoaded => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("we asserted that an existing incremental cache directory should be successfully loaded, but it was not")));
;
diag
}
}
}
}
};Diagnostic)]
231#[diag(
232 "we asserted that an existing incremental cache directory should be successfully loaded, but it was not"
233)]
234pub(crate) struct AssertLoaded;
235
236#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for
DeleteIncompatible 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 {
DeleteIncompatible { path: __binding_0, err: __binding_1 }
=> {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to delete invalidated or incompatible incremental compilation session directory contents `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
237#[diag(
238 "failed to delete invalidated or incompatible incremental compilation session directory contents `{$path}`: {$err}"
239)]
240pub(crate) struct DeleteIncompatible {
241 pub path: PathBuf,
242 pub err: std::io::Error,
243}
244
245#[derive(const _: () =
{
impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for LoadDepGraph
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 {
LoadDepGraph { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("could not load dep-graph from `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
246#[diag("could not load dep-graph from `{$path}`: {$err}")]
247pub(crate) struct LoadDepGraph {
248 pub path: PathBuf,
249 pub err: std::io::Error,
250}
251
252#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
MoveDepGraph<'a> 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 {
MoveDepGraph {
from: __binding_0, to: __binding_1, err: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to move dependency graph from `{$from}` to `{$to}`: {$err}")));
;
diag.arg("from", __binding_0);
diag.arg("to", __binding_1);
diag.arg("err", __binding_2);
diag
}
}
}
}
};Diagnostic)]
253#[diag("failed to move dependency graph from `{$from}` to `{$to}`: {$err}")]
254pub(crate) struct MoveDepGraph<'a> {
255 pub from: &'a Path,
256 pub to: &'a Path,
257 pub err: std::io::Error,
258}
259
260#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
CreateDepGraph<'a> 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 {
CreateDepGraph { path: __binding_0, err: __binding_1 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("failed to create dependency graph at `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
261#[diag("failed to create dependency graph at `{$path}`: {$err}")]
262pub(crate) struct CreateDepGraph<'a> {
263 pub path: &'a Path,
264 pub err: std::io::Error,
265}
266
267#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
CopyWorkProductToCache<'a> 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 {
CopyWorkProductToCache {
from: __binding_0, to: __binding_1, err: __binding_2 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("error copying object file `{$from}` to incremental directory as `{$to}`: {$err}")));
;
diag.arg("from", __binding_0);
diag.arg("to", __binding_1);
diag.arg("err", __binding_2);
diag
}
}
}
}
};Diagnostic)]
268#[diag("error copying object file `{$from}` to incremental directory as `{$to}`: {$err}")]
269pub(crate) struct CopyWorkProductToCache<'a> {
270 pub from: &'a Path,
271 pub to: &'a Path,
272 pub err: std::io::Error,
273}
274
275#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
DeleteWorkProduct<'a> 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 {
DeleteWorkProduct { path: __binding_0, err: __binding_1 } =>
{
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("file-system error deleting outdated file `{$path}`: {$err}")));
;
diag.arg("path", __binding_0);
diag.arg("err", __binding_1);
diag
}
}
}
}
};Diagnostic)]
276#[diag("file-system error deleting outdated file `{$path}`: {$err}")]
277pub(crate) struct DeleteWorkProduct<'a> {
278 pub path: &'a Path,
279 pub err: std::io::Error,
280}
281
282#[derive(const _: () =
{
impl<'_sess, 'a, G> rustc_errors::Diagnostic<'_sess, G> for
CorruptFile<'a> 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 {
CorruptFile { path: __binding_0 } => {
let mut diag =
rustc_errors::Diag::new(dcx, level,
rustc_errors::DiagMessage::Inline(std::borrow::Cow::Borrowed("corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant")));
;
diag.arg("path", __binding_0);
diag
}
}
}
}
};Diagnostic)]
283#[diag(
284 "corrupt incremental compilation artifact found at `{$path}`. This file will automatically be ignored and deleted. If you see this message repeatedly or can provoke it without manually manipulating the compiler's artifacts, please file an issue. The incremental compilation system relies on hardlinks and filesystem locks behaving correctly, and may not deal well with OS crashes, so whatever information you can provide about your filesystem or other state may be very relevant"
285)]
286pub(crate) struct CorruptFile<'a> {
287 pub path: &'a Path,
288}