regexident / cargo-modules

Visualize/analyze a Rust crate's internal structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compile fails: method `replace_one` is not a member of trait `std::iter::Step`

warner opened this issue · comments

I'm running nightly (cargo +nightly --version reports cargo 1.45.0-nightly (9fcb8c1d2 2020-05-25) and I'm seeing cargo +nightly install cargo-modules fail as it tries to build the rustc-ap-rustc_span crate. I might be doing something wrong, but I did notice that that crate is now up to version 661, whereas cargo-module has a Cargo.toml that calls for only version 657.

The full error is here:

   Compiling rustc-ap-rustc_span v657.0.0
error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^ not a member of trait `std::iter::Step`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^ not a member of trait `std::iter::Step`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^ not a member of trait `std::iter::Step`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^ not a member of trait `std::iter::Step`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^ not a member of trait `std::iter::Step`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `sub_usize` is not a member of trait `std::iter::Step`
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^ not a member of trait `std::iter::Step`
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^ not a member of trait `std::iter::Step`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^ not a member of trait `std::iter::Step`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^ not a member of trait `std::iter::Step`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^ not a member of trait `std::iter::Step`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^ not a member of trait `std::iter::Step`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `sub_usize` is not a member of trait `std::iter::Step`
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^ not a member of trait `std::iter::Step`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^ not a member of trait `std::iter::Step`
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^ not a member of trait `std::iter::Step`
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^ not a member of trait `std::iter::Step`
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^ not a member of trait `std::iter::Step`
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^ not a member of trait `std::iter::Step`
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `sub_usize` is not a member of trait `std::iter::Step`
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^ not a member of trait `std::iter::Step`
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0200]: the trait `std::iter::Step` requires an `unsafe impl` declaration
  --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:11:1
   |
11 | / rustc_index::newtype_index! {
12 | |     pub struct CrateId {
13 | |         ENCODABLE = custom
14 | |     }
15 | | }
   | |_^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0200]: the trait `std::iter::Step` requires an `unsafe impl` declaration
   --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/def_id.rs:118:1
    |
118 | / rustc_index::newtype_index! {
119 | |     /// A DefIndex is an index into the hir-map for a crate, identifying a
120 | |     /// particular definition. It should really be considered an interned
121 | |     /// shorthand for a particular DefPath.
...   |
128 | |     }
129 | | }
    | |_^
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0200]: the trait `std::iter::Step` requires an `unsafe impl` declaration
    --> /home/warner/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_span-657.0.0/symbol.rs:1034:1
     |
1034 | / rustc_index::newtype_index! {
1035 | |     pub struct SymbolIndex { .. }
1036 | | }
     | |_^
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 21 previous errors

Some errors have detailed explanations: E0200, E0407.
For more information about an error, try `rustc --explain E0200`.
error: could not compile `rustc-ap-rustc_span`.

Same here. Is anybody alive?

Should be fixed with 0.4.7.

Now it works, thanks.