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

Rocket does not compile on nightly-2021-10-15 #1948

Closed
mpajkowski opened this issue Oct 16, 2021 · 8 comments
Closed

Rocket does not compile on nightly-2021-10-15 #1948

mpajkowski opened this issue Oct 16, 2021 · 8 comments
Labels
nightly breakage Breakage on the nightly channel only upstream An unresolvable issue: an upstream dependency bug

Comments

@mpajkowski
Copy link

mpajkowski commented Oct 16, 2021

Description

Compilation fails with following error:

error[E0277]: the trait bound `(dyn catcher::handler::Handler + 'static): catcher::handler::Cloneable` is not satisfied
   --> /home/mpa/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.5.0-rc.1/src/catcher/handler.rs:150:14
    |
150 |         self.clone_handler()
    |              ^^^^^^^^^^^^^ the trait `catcher::handler::Cloneable` is not implemented for `(dyn catcher::handler::Handler + 'static)`

error[E0277]: the trait bound `(dyn route::handler::Handler + 'static): route::handler::Cloneable` is not satisfied
   --> /home/mpa/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.5.0-rc.1/src/route/handler.rs:316:14
    |
316 |         self.clone_handler()
    |              ^^^^^^^^^^^^^ the trait `route::handler::Cloneable` is not implemented for `(dyn route::handler::Handler + 'static)`

To Reproduce

main.rs:

fn main() {
    println!("Hello, world!");
}

Cargo.toml:

[package]
name = "rocket-build-failure"
version = "0.1.0"
edition = "2018"

[dependencies]
rocket = "0.5.0-rc.1"

rust-toolchain.toml:

[toolchain]
channel = "nightly-2021-10-15"

Environment:

  • Arch Linux 5.4.12-arch1-1
  • rocket 0.5.0-rc.1
  • toolchain: nightly-x86_64-unknown-linux-gnu (c1026539b 2021-10-15)
@mpajkowski mpajkowski added the triage A bug report being investigated label Oct 16, 2021
@lambda-fairy
Copy link

A similar issue affects Rocket 0.4.10: rust-lang/rust#89935

@nbdd0121
Copy link

nbdd0121 commented Oct 16, 2021

Minimised:

trait Foo: Baz {}
trait Bar {}
trait Baz: Bar {
    fn bar(&self);
}

impl<T: Foo> Bar for T {}
impl<T: Foo> Baz for T {
    fn bar(&self) {}
}

fn accept_foo(x: Box<dyn Foo>) {
    x.bar();
}

Oops... wrong repo, was trying to post to the rust issue. I guess I'll leave the comment here though :)

sargunv added a commit to sargunv/svurl that referenced this issue Oct 16, 2021
@jebrosen jebrosen added nightly breakage Breakage on the nightly channel only upstream An unresolvable issue: an upstream dependency bug and removed triage A bug report being investigated labels Oct 17, 2021
@helxsz
Copy link

helxsz commented Oct 19, 2021

same problem happened on me, any work around?

@lambda-fairy
Copy link

@pineapplehunter
Copy link

I think the same issue is happening with the latest beta.

$ cargo version
cargo 1.57.0-beta (c7957a74b 2021-10-11)

@lambda-fairy
Copy link

@pineapplehunter Yes, the rustc fix was also backported to beta 1.57

rust-lang/rust#90025 (comment)

@mpajkowski
Copy link
Author

Right now rocket seems to compile just fine.

$ rustc -V
rustc 1.58.0-nightly (547a6ffee 2021-10-21)

@lambda-fairy
Copy link

Since the upstream issue has been fixed, @mpajkowski would you like to close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nightly breakage Breakage on the nightly channel only upstream An unresolvable issue: an upstream dependency bug
Projects
None yet
Development

No branches or pull requests

6 participants