@@ -233,7 +233,6 @@ fn rustfix_crate(lock_addr: &str, rustc: &Path, filename: &Path, args: &FixArgs)
233
233
-> Result < FixedCrate , Error >
234
234
{
235
235
args. verify_not_preparing_for_enabled_edition ( ) ?;
236
- args. warn_if_preparing_probably_inert ( ) ?;
237
236
238
237
// First up we want to make sure that each crate is only checked by one
239
238
// process at a time. If two invocations concurrently check a crate then
@@ -596,38 +595,6 @@ impl FixArgs {
596
595
process:: exit ( 1 ) ;
597
596
}
598
597
599
- /// If we're preparing for an edition and we *don't* find the
600
- /// `rust_2018_preview` feature, for example, in the entry point file then
601
- /// it probably means that the edition isn't actually enabled, so we can't
602
- /// actually fix anything.
603
- ///
604
- /// If this is the case, issue a warning.
605
- fn warn_if_preparing_probably_inert ( & self ) -> CargoResult < ( ) > {
606
- let edition = match self . prepare_for_edition_resolve ( ) {
607
- Some ( s) => s,
608
- None => return Ok ( ( ) ) ,
609
- } ;
610
- let path = match & self . file {
611
- Some ( s) => s,
612
- None => return Ok ( ( ) ) ,
613
- } ;
614
- let contents = match fs:: read_to_string ( path) {
615
- Ok ( s) => s,
616
- Err ( _) => return Ok ( ( ) )
617
- } ;
618
-
619
- let feature_name = format ! ( "rust_{}_preview" , edition) ;
620
- if contents. contains ( & feature_name) {
621
- return Ok ( ( ) )
622
- }
623
- Message :: PreviewNotFound {
624
- file : path. display ( ) . to_string ( ) ,
625
- edition : edition. to_string ( ) ,
626
- } . post ( ) ?;
627
-
628
- Ok ( ( ) )
629
- }
630
-
631
598
fn prepare_for_edition_resolve ( & self ) -> Option < & str > {
632
599
match & self . prepare_for_edition {
633
600
PrepareFor :: Edition ( s) => Some ( s) ,
0 commit comments