Skip to content
This repository was archived by the owner on May 8, 2021. It is now read-only.

Error compiling SDK #58

Closed
atozen opened this issue Jan 3, 2019 · 1 comment
Closed

Error compiling SDK #58

atozen opened this issue Jan 3, 2019 · 1 comment
Labels
question Further information is requested

Comments

@atozen
Copy link

atozen commented Jan 3, 2019

The output from $ cargo build is

Compiling proc-macro-hack v0.5.4
Compiling synstructure v0.10.1
Compiling tokio-async-await v0.1.4
Compiling protobuf-codegen v2.2.2
error[E0599]: no function or associated item named `pinned` found for type `std::boxed::Box<_>` in the current scope
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-async-await-0.1.4/src/compat/backward.rs:22:21
|
22 |         Compat(Box::pinned(future))
|                -----^^^^^^
|                |
|                function or associated item not found in `std::boxed::Box<_>

The code in line 22 of backwards.rs is part of

/// Convert an 0.3 `Future` to an 0.1 `Future`.
#[derive(Debug)]
pub struct Compat<T>(Pin<Box<T>>);

impl<T> Compat<T> {
    /// Create a new `Compat` backed by `future`.
    pub fn new(future: T) -> Compat<T> {
        Compat(Box::pinned(future))
    }
}

active toolchain

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.33.0-nightly (b2b7a063a 2019-01-01)

@mehcode
Copy link
Member

mehcode commented Jan 3, 2019

This is the downside of using a nightly toolchain. Hopefully, we can move off of that when async/await is stabilized in Rust (should be Q1). A change in the nightly compiler broke the tokio-async-await crate. See tokio-rs/tokio#814.

To fix this locally, add this to the bottom of your Cargo.toml.

[patch.crates-io]
tokio-async-await = { git = "https://github.com/tokio-rs/tokio", rev = "cbecb877971826871fa409364722cf684bf3cabf" }

As soon as tokio-async-await is released at 0.1.5 you should be able to remove this.

@mehcode mehcode added the question Further information is requested label Jan 3, 2019
@mehcode mehcode closed this as completed Jan 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants