Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo fix --edition-idioms doesn't apply fixes and asks to report an issue #6323

Closed
bjorn3 opened this issue Nov 17, 2018 · 2 comments
Closed

Comments

@bjorn3
Copy link
Member

bjorn3 commented Nov 17, 2018

Problem

cargo fix --edition-idioms doesn't apply fixes and asks to report an issue.

Steps

$ git clone https://github.cim/bjorn3/rustc_codegen_cranelift.git
$ git checkout 16334be18e50be2a66675a860e4d600c288ff34c
$ cargo fix --edition-idioms
    Checking rustc_codegen_cranelift v0.1.0 (/Users/bjorn/Documents/rustc_codegen_cranelift)
warning: failed to automatically apply fixes suggested by rustc to crate `rustc_codegen_cranelift`

after fixes were automatically applied the compiler reported errors within these files:

  * src/allocator.rs
  * src/base.rs
  * src/common.rs
  * src/constant.rs
  * src/lib.rs
  * src/link.rs
  * src/link_copied.rs
  * src/unimpl.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see 
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:16:32
   |
16 |     fn get_param_ty(self, fx: &FunctionCx<impl Backend>) -> Type {
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: indicate the anonymous lifetimes: `FunctionCx<'_, '_, impl Backend>`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:81:53
   |
81 |     let (call_conv, inputs, output): (CallConv, Vec<Ty>, Ty) = match sig.abi {
   |                                                     ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:81:58
   |
81 |     let (call_conv, inputs, output): (CallConv, Vec<Ty>, Ty) = match sig.abi {
   |                                                          ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:90:33
   |
90 |             let mut inputs: Vec<Ty> = vec![sig.inputs()[0]];
   |                                 ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/abi.rs:328:41
    |
328 |         .collect::<Vec<(Local, ArgKind, Ty)>>();
    |                                         ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/abi.rs:593:32
    |
593 | pub fn codegen_return(fx: &mut FunctionCx<impl Backend>) {
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: indicate the anonymous lifetimes: `FunctionCx<'_, '_, impl Backend>`

warning: hidden lifetime parameters in types are deprecated
  --> src/allocator.rs:66:26
   |
66 |             let mut bcx: FunctionBuilder = FunctionBuilder::new(&mut ctx.func, &mut func_ctx);
   |                          ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/analyze.rs:49:72
   |
49 | fn analyze_non_ssa_place(flag_map: &mut HashMap<Local, Flags>, place: &Place) {
   |                                                                        ^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/base.rs:77:18
   |
77 |     let mut bcx: FunctionBuilder = FunctionBuilder::new(&mut func, &mut func_ctx);
   |                  ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/base.rs:143:21
    |
143 | fn verify_func(tcx: TyCtxt, writer: crate::pretty_clif::CommentWriter, func: &Function) {
    |                     ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/common.rs:13:24
   |
13 | pub fn pointer_ty(tcx: TyCtxt) -> types::Type {
   |                        ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/common.rs:22:29
   |
22 | fn scalar_to_clif_type(tcx: TyCtxt, scalar: &Scalar) -> Type {
   |                             ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/common.rs:72:33
   |
72 | pub fn codegen_select(bcx: &mut FunctionBuilder, cond: Value, lhs: Value, rhs: Value) -> Value {
   |                                 ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/common.rs:625:27
    |
625 |     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    |                           ^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/intrinsics.rs:91:19
   |
91 |     substs: &'tcx Substs,
   |                   ^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/link_copied.rs:274:31
    |
274 |         fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    |                               ^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/main_shim.rs:66:26
   |
66 |             let mut bcx: FunctionBuilder = FunctionBuilder::new(&mut ctx.func, &mut func_ctx);
   |                          ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
 --> src/trap.rs:5:29
  |
5 | pub fn trap_panic(bcx: &mut FunctionBuilder) {
  |                             ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/trap.rs:10:35
   |
10 | pub fn trap_unreachable(bcx: &mut FunctionBuilder) {
   |                                   ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/unimpl.rs:23:24
   |
23 | pub fn try_unimpl(tcx: TyCtxt, log: &mut Option<File>, f: impl FnOnce()) {
   |                        ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/vtable.rs:127:21
    |
127 | fn write_usize(tcx: TyCtxt, buf: &mut [u8], idx: usize, num: u64) {
    |                     ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:158:21
    |
158 |     pub fn new(tcx: TyCtxt) -> CrateInfo {
    |                     ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:243:42
    |
243 |     fn load_wasm_imports(&mut self, tcx: TyCtxt, cnum: CrateNum) {
    |                                          ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:298:39
    |
298 |     fn provide(&self, providers: &mut Providers) {
    |                                       ^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:304:46
    |
304 |     fn provide_extern(&self, providers: &mut Providers) {
    |                                              ^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:294:38
    |
294 |     fn metadata_loader(&self) -> Box<MetadataLoader + Sync> {
    |                                      ^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn MetadataLoader + Sync`
    |
    = note: `-W bare-trait-objects` implied by `-W rust-2018-idioms`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:311:33
    |
311 |         _rx: mpsc::Receiver<Box<Any + Send>>,
    |                                 ^^^^^^^^^^ help: use `dyn`: `dyn Any + Send`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:312:14
    |
312 |     ) -> Box<Any> {
    |              ^^^ help: use `dyn`: `dyn Any`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:439:18
    |
439 |         res: Box<Any>,
    |                  ^^^ help: use `dyn`: `dyn Any`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:515:41
    |
515 | pub fn __rustc_codegen_backend() -> Box<CodegenBackend> {
    |                                         ^^^^^^^^^^^^^^ help: use `dyn`: `dyn CodegenBackend`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:16:32
   |
16 |     fn get_param_ty(self, fx: &FunctionCx<impl Backend>) -> Type {
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: indicate the anonymous lifetimes: `FunctionCx<'_, '_, impl Backend>`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:81:53
   |
81 |     let (call_conv, inputs, output): (CallConv, Vec<Ty>, Ty) = match sig.abi {
   |                                                     ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:81:58
   |
81 |     let (call_conv, inputs, output): (CallConv, Vec<Ty>, Ty) = match sig.abi {
   |                                                          ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/abi.rs:90:33
   |
90 |             let mut inputs: Vec<Ty> = vec![sig.inputs()[0]];
   |                                 ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/abi.rs:328:41
    |
328 |         .collect::<Vec<(Local, ArgKind, Ty)>>();
    |                                         ^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/abi.rs:593:32
    |
593 | pub fn codegen_return(fx: &mut FunctionCx<impl Backend>) {
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^ help: indicate the anonymous lifetimes: `FunctionCx<'_, '_, impl Backend>`

warning: hidden lifetime parameters in types are deprecated
  --> src/allocator.rs:66:26
   |
66 |             let mut bcx: FunctionBuilder = FunctionBuilder::new(&mut ctx.func, &mut func_ctx);
   |                          ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/analyze.rs:49:72
   |
49 | fn analyze_non_ssa_place(flag_map: &mut HashMap<Local, Flags>, place: &Place) {
   |                                                                        ^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/base.rs:77:18
   |
77 |     let mut bcx: FunctionBuilder = FunctionBuilder::new(&mut func, &mut func_ctx);
   |                  ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/base.rs:143:21
    |
143 | fn verify_func(tcx: TyCtxt, writer: crate::pretty_clif::CommentWriter, func: &Function) {
    |                     ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/common.rs:13:24
   |
13 | pub fn pointer_ty(tcx: TyCtxt) -> types::Type {
   |                        ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/common.rs:22:29
   |
22 | fn scalar_to_clif_type(tcx: TyCtxt, scalar: &Scalar) -> Type {
   |                             ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/common.rs:72:33
   |
72 | pub fn codegen_select(bcx: &mut FunctionBuilder, cond: Value, lhs: Value, rhs: Value) -> Value {
   |                                 ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/common.rs:625:27
    |
625 |     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    |                           ^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/intrinsics.rs:91:19
   |
91 |     substs: &'tcx Substs,
   |                   ^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/link_copied.rs:274:31
    |
274 |         fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
    |                               ^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/main_shim.rs:66:26
   |
66 |             let mut bcx: FunctionBuilder = FunctionBuilder::new(&mut ctx.func, &mut func_ctx);
   |                          ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
 --> src/trap.rs:5:29
  |
5 | pub fn trap_panic(bcx: &mut FunctionBuilder) {
  |                             ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/trap.rs:10:35
   |
10 | pub fn trap_unreachable(bcx: &mut FunctionBuilder) {
   |                                   ^^^^^^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
  --> src/unimpl.rs:23:24
   |
23 | pub fn try_unimpl(tcx: TyCtxt, log: &mut Option<File>, f: impl FnOnce()) {
   |                        ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/vtable.rs:127:21
    |
127 | fn write_usize(tcx: TyCtxt, buf: &mut [u8], idx: usize, num: u64) {
    |                     ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:158:21
    |
158 |     pub fn new(tcx: TyCtxt) -> CrateInfo {
    |                     ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:243:42
    |
243 |     fn load_wasm_imports(&mut self, tcx: TyCtxt, cnum: CrateNum) {
    |                                          ^^^^^^- help: indicate the anonymous lifetimes: `<'_, '_, '_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:298:39
    |
298 |     fn provide(&self, providers: &mut Providers) {
    |                                       ^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: hidden lifetime parameters in types are deprecated
   --> src/lib.rs:304:46
    |
304 |     fn provide_extern(&self, providers: &mut Providers) {
    |                                              ^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:294:38
    |
294 |     fn metadata_loader(&self) -> Box<MetadataLoader + Sync> {
    |                                      ^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn MetadataLoader + Sync`
    |
    = note: `-W bare-trait-objects` implied by `-W rust-2018-idioms`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:311:33
    |
311 |         _rx: mpsc::Receiver<Box<Any + Send>>,
    |                                 ^^^^^^^^^^ help: use `dyn`: `dyn Any + Send`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:312:14
    |
312 |     ) -> Box<Any> {
    |              ^^^ help: use `dyn`: `dyn Any`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:439:18
    |
439 |         res: Box<Any>,
    |                  ^^^ help: use `dyn`: `dyn Any`

warning: trait objects without an explicit `dyn` are deprecated
   --> src/lib.rs:515:41
    |
515 | pub fn __rustc_codegen_backend() -> Box<CodegenBackend> {
    |                                         ^^^^^^^^^^^^^^ help: use `dyn`: `dyn CodegenBackend`

warning: unused extern crate
  --> src/lib.rs:10:1
   |
10 | extern crate byteorder;
   | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
   |
   = note: `-W unused-extern-crates` implied by `-W rust-2018-idioms`

warning: unused extern crate
  --> src/lib.rs:11:1
   |
11 | extern crate syntax;
   | ^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:14:1
   |
14 | extern crate rustc_allocator;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:21:1
   |
21 | extern crate rustc_fs_util;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:25:1
   |
25 | extern crate ar;
   | ^^^^^^^^^^^^^^^^ help: remove it

warning: `extern crate` is not idiomatic in the new edition
  --> src/lib.rs:28:1
   |
28 | extern crate faerie;
   | ^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`

warning: `extern crate` is not idiomatic in the new edition
  --> src/lib.rs:30:1
   |
30 | extern crate cranelift;
   | ^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`

warning: unused extern crate
  --> src/lib.rs:31:1
   |
31 | extern crate cranelift_faerie;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:32:1
   |
32 | extern crate cranelift_module;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:33:1
   |
33 | extern crate cranelift_simplejit;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:34:1
   |
34 | extern crate target_lexicon;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: constant item is never used: `DROP_FN_INDEX`
 --> src/vtable.rs:5:1
  |
5 | const DROP_FN_INDEX: usize = 0;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

warning: outlives requirements can be inferred
   --> src/common.rs:606:47
    |
606 | pub struct FunctionCx<'a, 'tcx: 'a, B: Backend + 'a> {
    |                                               ^^^^^ help: remove this bound
    |
    = note: `-W explicit-outlives-requirements` implied by `-W rust-2018-idioms`

warning: unused extern crate
  --> src/lib.rs:10:1
   |
10 | extern crate byteorder;
   | ^^^^^^^^^^^^^^^^^^^^^^^ help: remove it
   |
   = note: `-W unused-extern-crates` implied by `-W rust-2018-idioms`

warning: unused extern crate
  --> src/lib.rs:11:1
   |
11 | extern crate syntax;
   | ^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:14:1
   |
14 | extern crate rustc_allocator;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:21:1
   |
21 | extern crate rustc_fs_util;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:25:1
   |
25 | extern crate ar;
   | ^^^^^^^^^^^^^^^^ help: remove it

warning: `extern crate` is not idiomatic in the new edition
  --> src/lib.rs:28:1
   |
28 | extern crate faerie;
   | ^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`

warning: `extern crate` is not idiomatic in the new edition
  --> src/lib.rs:30:1
   |
30 | extern crate cranelift;
   | ^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`

warning: unused extern crate
  --> src/lib.rs:31:1
   |
31 | extern crate cranelift_faerie;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:32:1
   |
32 | extern crate cranelift_module;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:33:1
   |
33 | extern crate cranelift_simplejit;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: unused extern crate
  --> src/lib.rs:34:1
   |
34 | extern crate target_lexicon;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it

warning: constant item is never used: `DROP_FN_INDEX`
 --> src/vtable.rs:5:1
  |
5 | const DROP_FN_INDEX: usize = 0;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

warning: outlives requirements can be inferred
   --> src/common.rs:606:47
    |
606 | pub struct FunctionCx<'a, 'tcx: 'a, B: Backend + 'a> {
    |                                               ^^^^^ help: remove this bound
    |
    = note: `-W explicit-outlives-requirements` implied by `-W rust-2018-idioms`

    Finished dev [unoptimized + debuginfo] target(s) in 7.15s

Notes

Output of cargo version:

cargo 1.32.0-nightly (241fac0e3 2018-11-09)
@ehuss
Copy link
Contributor

ehuss commented Nov 17, 2018

I think this is a consequence of using extern_crate_item_prelude and rustc_private. The extern crate declarations are removed, but those are still required. There are a few ways you can work around this:

  • Stop using extern_crate_item_prelude. Remove the feature, and fix all the errors, then do the idiom fix.
  • There is a cargo update coming soon that will allow you to use the --broken-code option to cargo fix so that it will leave the broken code, and then you can add these lines back:
    extern crate syntax;
    extern crate rustc_fs_util;
    extern crate rustc_allocator;
    

There was a related fix rust-lang/rust#54650 which dealt with this for proc_macro, but I don't think any of the private crates got the same treatment. Something similar was reported at rust-lang/rust#55592. I'm curious if rust-lang/rust#55884 will have any impact on this.

@alexcrichton
Copy link
Member

Thanks for the investigation @ehuss! Let's move this to rust-lang/rust#56038

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants