Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cargo fails to compile with 'impl Trait' error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Sun Sep 09, 2018 1:43 pm    Post subject: cargo fails to compile with 'impl Trait' error Reply with quote

[Moderator note: the first two posts in this thread were originally one thread; the second three were originally a separate thread. All posts after those 5 were made after the threads were merged. -Hu]

dev-util/cargo-0.29.0 fails to compile with:

`impl Trait` in return position is experimental (see issue #34511)

Anybody else seeing this?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30908
Location: here

PostPosted: Sun Sep 09, 2018 2:00 pm    Post subject: Reply with quote

Bug, unmask virtual/rust-1.28.0 for solve problem
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 541
Location: Germany

PostPosted: Sun Sep 09, 2018 3:03 pm    Post subject: dev-util/cargo-0.29.0 fails to compile Reply with quote

I've tried to run update today and got problem with dev-util/cargo-0.29.0. It refuses to compile.

Here's what I get:

Code:

   Compiling cargo v0.29.0 (file:///var/tmp/portage/dev-util/cargo-0.29.0/work/cargo-0.29.0)
error[E0658]: `impl Trait` in return position is experimental (see issue #34511)
   --> src/cargo/core/resolver/types.rs:209:37
    |
209 |     pub fn flatten<'s>(&'s self) -> impl Iterator<Item=(&PackageId, Dependency)> + 's {
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead
   --> src/cargo/lib.rs:172:30
    |
172 |         for err in cargo_err.causes().skip(1) {
    |                              ^^^^^^
    |
    = note: #[warn(deprecated)] on by default

warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead
   --> src/cargo/lib.rs:178:30
    |
178 |         for err in cargo_err.causes().skip(1) {
    |                              ^^^^^^

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
  --> src/cargo/core/compiler/build_plan.rs:87:17
   |
87 |                 Some(s) => s,
   |                 ^^^^^^^ help: consider using a reference: `&Some(s)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
  --> src/cargo/core/compiler/build_plan.rs:88:17
   |
88 |                 None => continue,
   |                 ^^^^ help: consider using a reference: `&None`

warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead
   --> src/cargo/core/compiler/fingerprint.rs:682:21
    |
682 |     for cause in ce.causes().skip(1) {
    |                     ^^^^^^

error[E0658]: use of unstable library feature 'box_leak': needs an FCP to stabilize (see issue #46179)
  --> src/cargo/core/interning.rs:13:5
   |
13 |     Box::leak(s.into_boxed_str())
   |     ^^^^^^^^^

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/core/resolver/context.rs:406:13
    |
406 |             FeatureValue::Feature(feat) => self.require_feature(feat.as_str()),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&FeatureValue::Feature(feat)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/core/resolver/context.rs:407:13
    |
407 |             FeatureValue::Crate(dep) => Ok(self.require_dependency(dep.as_str())),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&FeatureValue::Crate(dep)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/core/resolver/context.rs:408:13
    |
408 |             FeatureValue::CrateFeature(dep, dep_feat) => {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&FeatureValue::CrateFeature(dep, dep_feat)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/ops/cargo_test.rs:158:13
    |
158 |           let Doctest {
    |  _____________^
159 | |             package,
160 | |             target,
161 | |             deps,
162 | |         } = doctest_info;
    | |_________^
help: consider using a reference
    |
158 |         let &Doctest {
159 |             package,
160 |             target,
161 |             deps,
162 |         } = doctest_info;
    |

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/util/config.rs:805:13
    |
805 |             ConfigKeyPart::Part(s) => s.replace("-", "_").to_uppercase(),
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::Part(s)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/util/config.rs:806:13
    |
806 |             ConfigKeyPart::CasePart(s) => s.clone(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::CasePart(s)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/util/config.rs:812:13
    |
812 |             ConfigKeyPart::Part(s) => s.clone(),
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::Part(s)`

error[E0658]: non-reference pattern used to match a reference (see issue #42640)
   --> src/cargo/util/config.rs:813:13
    |
813 |             ConfigKeyPart::CasePart(s) => s.clone(),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::CasePart(s)`

warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead
   --> src/cargo/util/config.rs:924:14
    |
924 |             .causes()
    |              ^^^^^^

warning: use of deprecated item 'failure::Error::cause': please use 'as_fail()' method instead
  --> src/cargo/util/errors.rs:59:20
   |
59 |         self.inner.cause().cause()
   |                    ^^^^^

warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead
  --> src/cargo/util/network.rs:10:18
   |
10 |     for e in err.causes() {
   |                  ^^^^^^

error: aborting due to 12 previous errors

error: Could not compile `cargo`.



As far as I understand, this is needed to build newer version of firefox. Any recommendations?
Back to top
View user's profile Send private message
paluszak
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 265
Location: Warsaw, Poland

PostPosted: Sun Sep 09, 2018 3:08 pm    Post subject: Reply with quote

Same here... Seems we hit this bug. I masked dev-util/cargo-0.29.0 as a temporary fix.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30908
Location: here

PostPosted: Sun Sep 09, 2018 3:10 pm    Post subject: Reply with quote

Duplicate of https://forums.gentoo.org/viewtopic-t-1086258-highlight-cargo.html .
Unmask virtual/rust-1.28.0 update virtual/rust, dev-lang/rust and dev-lang/rust-bin with eselect set rust 1.28 and the update cargo
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30908
Location: here

PostPosted: Mon Sep 10, 2018 5:42 am    Post subject: Reply with quote

Problem solved
Code:
commit abfc0a24982b42b8f7bb82fd1f3acd5302949343
Author: Mikle Kolyada <zlogene@gentoo.org>
Date:   Sun Sep 9 18:25:44 2018 +0300

    virtual/rust: amd64 stable wrt bug #662904
   
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Mon Sep 10, 2018 1:59 pm    Post subject: Reply with quote

Should be fixed in the tree? Still failing here.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30908
Location: here

PostPosted: Mon Sep 10, 2018 2:14 pm    Post subject: Reply with quote

grant123 wrote:
Should be fixed in the tree? Still failing here.

Yes, but you can check if virtual/rust-1.28.0 is stable now
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Pistos
Apprentice
Apprentice


Joined: 29 Jul 2003
Posts: 175
Location: Canada

PostPosted: Mon Sep 10, 2018 5:28 pm    Post subject: Reply with quote

I still can't get past cargo to get at firefox. My build log and emerge info, and also current versions of rust and cargo: https://gist.github.com/Pistos/608f6dc2adc0366d152c6a55f777913f
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30908
Location: here

PostPosted: Mon Sep 10, 2018 5:41 pm    Post subject: Reply with quote

Try with
Code:
# emerge -u dev-lang/rust-bin
# eselect rust set rust-1.28.0
#  emerge -u =cargo-0.29.0

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Pistos
Apprentice
Apprentice


Joined: 29 Jul 2003
Posts: 175
Location: Canada

PostPosted: Tue Sep 11, 2018 1:09 am    Post subject: Reply with quote

@fedeliallalinea Turns out I needed to depclean first. Had rust-1.25.0 installed, and I think that was the one that was causing the problems.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30908
Location: here

PostPosted: Tue Sep 11, 2018 5:41 am    Post subject: Reply with quote

Pistos wrote:
@fedeliallalinea Turns out I needed to depclean first. Had rust-1.25.0 installed, and I think that was the one that was causing the problems.

If you use eselect for set rust-1.28 you can depclean after update
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
erg_samowzbudnik
Apprentice
Apprentice


Joined: 09 Sep 2011
Posts: 211
Location: European sticks

PostPosted: Mon Sep 24, 2018 10:10 am    Post subject: Reply with quote

What fixed it for me was to recompile those rust packages and 'eselect rust set rust-bin-1.28.0' rather than rust
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum