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

Build Failing with Cargo Nightly #1141

Closed
SFzxc opened this issue Oct 29, 2020 · 16 comments · Fixed by #1166
Closed

Build Failing with Cargo Nightly #1141

SFzxc opened this issue Oct 29, 2020 · 16 comments · Fixed by #1166

Comments

@SFzxc
Copy link

SFzxc commented Oct 29, 2020

I am getting the following error when running cargo +nightly install racer:

   Compiling rustc-ap-rustc_data_structures v686.0.0
error[E0107]: wrong number of type arguments: expected 2, found 1
   --> /Users/tobi/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/graph/iterate/mod.rs:256:10
    |
256 |     ) -> ControlFlow<Self::BreakVal> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments

error[E0107]: wrong number of type arguments: expected 2, found 1
   --> /Users/tobi/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/graph/iterate/mod.rs:261:51
    |
261 |     fn node_settled(&mut self, _node: G::Node) -> ControlFlow<Self::BreakVal> {
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments

error[E0107]: wrong number of type arguments: expected 2, found 1
   --> /Users/tobi/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/graph/iterate/mod.rs:284:10
    |
284 |     ) -> ControlFlow<Self::BreakVal> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 type arguments

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0107`.
error: could not compile `rustc-ap-rustc_data_structures`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `racer v2.1.40`, intermediate artifacts can be found at `/var/folders/sw/jmc9rg0n17v550p30c7_wqmr0000gp/T/cargo-install8jfGll`

Caused by:
  build failed

MacOs:

rustup 1.22.1 (b01adbbc3 2020-07-08)
rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
cargo 1.49.0-nightly (dd83ae55c 2020-10-20)

Thanks

@w01fb0ss
Copy link

me too

@math715
Copy link

math715 commented Oct 30, 2020

me too
opensuse 15.2
rustup 1.22.1 (b01adbbc3 2020-07-08)
rustc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
cargo 1.49.0-nightly (dd83ae55c 2020-10-20)

@yiyoascen
Copy link

me too, on popOs 20

@nlopes
Copy link

nlopes commented Nov 1, 2020

If you do rustup update --force (this may mean you don't get all the components you have already installed) you should get a more up-to-date nightly (say 2020-10-31).

That one should build racer just fine.

This problem seems to be due to rust-ap-rustc_data_structures having been released on a newer rust src than what you have available in your rustup.

@SFzxc
Copy link
Author

SFzxc commented Nov 1, 2020

Thanks, @nlopes. I just checked, your temporary solution works fine!

@x10an14
Copy link

x10an14 commented Nov 1, 2020

Can confirm that @nlopes' suggestion works for me too! Thanks! =D

@yiyoascen
Copy link

Yes ty for @nlopes suggestion! Rust really has a friendly community

@voland62
Copy link

voland62 commented Nov 4, 2020

@nlopes advise works.

@Aganthor
Copy link

Aganthor commented Nov 6, 2020

I can confirm that the solution works.

@saehun
Copy link

saehun commented Nov 7, 2020

same here

@Polensky
Copy link

I have tried @nlopes' suggestion but i still get errors when building racer.

rustup 1.23.0 (00924c9ba 2020-11-27)
rustc 1.50.0-nightly (6a889570e 2020-11-27)
cargo 1.50.0-nightly (bfca1cd22 2020-11-24)

Error when running cargo +nightly install racer:

   Compiling rustc-ap-rustc_data_structures v686.0.0
error[E0557]: feature has been removed
  --> /home/polensky/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/lib.rs:18:12
   |
18 | #![feature(optin_builtin_traits)]
   |            ^^^^^^^^^^^^^^^^^^^^ feature has been removed
   |
   = note: renamed to `auto_traits`

error[E0658]: auto traits are experimental and possibly buggy
  --> /home/polensky/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/sync.rs:30:9
   |
30 |         pub auto trait Send {}
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` to the crate attributes to enable

error[E0658]: auto traits are experimental and possibly buggy
  --> /home/polensky/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/sync.rs:31:9
   |
31 |         pub auto trait Sync {}
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0557, E0658.
For more information about an error, try `rustc --explain E0557`.
error: could not compile `rustc-ap-rustc_data_structures`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `racer v2.1.40`, intermediate artifacts can be found at `/tmp/cargo-installN6A2q8`

Caused by:
  build failed

@fx-kirin
Copy link

I think you just need to build it from the latest master.

@Polensky
Copy link

I think you just need to build it from the latest master.

I thought the command cargo +nightly install racer was doing that. I can see the version 2.1.40 in the output which match the latest release on the GitHub page.

@WanderHuang
Copy link

I have tried @nlopes' suggestion but i still get errors when building racer.

rustup 1.23.0 (00924c9ba 2020-11-27)
rustc 1.50.0-nightly (6a889570e 2020-11-27)
cargo 1.50.0-nightly (bfca1cd22 2020-11-24)

Error when running cargo +nightly install racer:

   Compiling rustc-ap-rustc_data_structures v686.0.0
error[E0557]: feature has been removed
  --> /home/polensky/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/lib.rs:18:12
   |
18 | #![feature(optin_builtin_traits)]
   |            ^^^^^^^^^^^^^^^^^^^^ feature has been removed
   |
   = note: renamed to `auto_traits`

error[E0658]: auto traits are experimental and possibly buggy
  --> /home/polensky/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/sync.rs:30:9
   |
30 |         pub auto trait Send {}
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` to the crate attributes to enable

error[E0658]: auto traits are experimental and possibly buggy
  --> /home/polensky/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_data_structures-686.0.0/src/sync.rs:31:9
   |
31 |         pub auto trait Sync {}
   |         ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0557, E0658.
For more information about an error, try `rustc --explain E0557`.
error: could not compile `rustc-ap-rustc_data_structures`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `racer v2.1.40`, intermediate artifacts can be found at `/tmp/cargo-installN6A2q8`

Caused by:
  build failed

Same problem.

> rustup -V
rustup 1.23.1 (3df2264a9 2020-11-30)
> rustc -V
rustc 1.52.0-nightly (9778068cb 2021-02-07)
> cargo -V
cargo 1.51.0-nightly (34170fcd6 2021-02-04)

@jacklanda
Copy link

If you do rustup update --force (this may mean you don't get all the components you have already installed) you should get a more up-to-date nightly (say 2020-10-31).

That one should build racer just fine.

This problem seems to be due to rust-ap-rustc_data_structures having been released on a newer rust src than what you have available in your rustup.

This work for me too, thx!

@kiamazi
Copy link

kiamazi commented May 3, 2021

stable-x86_64-unknown-linux-gnu unchanged - rustc 1.51.0 (2fd73fabe 2021-03-23)
nightly-x86_64-unknown-linux-gnu updated - rustc 1.54.0-nightly (4de757209 2021-05-01) (from rustc 1.53.0-nightly (42816d61e 2021-04-24))
ubuntu 20.04

error[E0658]: unsizing casts to types besides slices are not allowed in const fn
   --> ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-rustc_ast-712.0.0/src/ptr.rs:136:37
    |
136 |                 std::mem::transmute(NonNull::<[T; 0]>::dangling() as NonNull<[T]>)
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #64992 <https://github.com/rust-lang/rust/issues/64992> for more information
    = help: add `#![feature(const_fn_unsize)]` to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `rustc-ap-rustc_ast`

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

Successfully merging a pull request may close this issue.