Skip to content

Commit a22f54a

Browse files
committed
Auto merge of #6053 - dwijnand:finish-removing-PreviewNotFound, r=alexcrichton
Finish removing PreviewNotFound None
2 parents 93e3216 + 1ecd081 commit a22f54a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/cargo/util/diagnostic_server.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ pub enum Message {
4040
file: String,
4141
message: String,
4242
},
43-
PreviewNotFound {
44-
file: String,
45-
edition: String,
46-
},
4743
EditionAlreadyEnabled {
4844
file: String,
4945
edition: String,
@@ -81,7 +77,6 @@ impl Message {
8177

8278
pub struct DiagnosticPrinter<'a> {
8379
config: &'a Config,
84-
preview_not_found: HashSet<String>,
8580
edition_already_enabled: HashSet<String>,
8681
idiom_mismatch: HashSet<String>,
8782
}
@@ -90,7 +85,6 @@ impl<'a> DiagnosticPrinter<'a> {
9085
pub fn new(config: &'a Config) -> DiagnosticPrinter<'a> {
9186
DiagnosticPrinter {
9287
config,
93-
preview_not_found: HashSet::new(),
9488
edition_already_enabled: HashSet::new(),
9589
idiom_mismatch: HashSet::new(),
9690
}
@@ -140,21 +134,6 @@ impl<'a> DiagnosticPrinter<'a> {
140134
write!(self.config.shell().err(), "{}", PLEASE_REPORT_THIS_BUG)?;
141135
Ok(())
142136
}
143-
Message::PreviewNotFound { file, edition } => {
144-
// By default we're fixing a lot of things concurrently, don't
145-
// warn about the same file multiple times.
146-
if !self.preview_not_found.insert(file.clone()) {
147-
return Ok(())
148-
}
149-
self.config.shell().warn(&format!(
150-
"failed to find `#![feature(rust_{}_preview)]` in `{}`\n\
151-
this may cause `cargo fix` to not be able to fix all\n\
152-
issues in preparation for the {0} edition",
153-
edition,
154-
file,
155-
))?;
156-
Ok(())
157-
}
158137
Message::EditionAlreadyEnabled { file, edition } => {
159138
// Like above, only warn once per file
160139
if !self.edition_already_enabled.insert(file.clone()) {

0 commit comments

Comments
 (0)