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 fails to build on latest nightly #89935

Closed
lambda-fairy opened this issue Oct 16, 2021 · 7 comments · Fixed by #90025
Closed

Rocket fails to build on latest nightly #89935

lambda-fairy opened this issue Oct 16, 2021 · 7 comments · Fixed by #90025
Labels
C-bug Category: This is a bug. P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@lambda-fairy
Copy link
Contributor

Code

I created a project with the following Cargo.toml:

[package]
name = "ducks"
version = "0.1.0"
edition = "2018"

[dependencies]
rocket = "=0.4.10"

Cargo.lock

On the latest nightly, this fails to build with:

error[E0277]: the trait bound `(dyn handler::Handler + 'static): handler::Handler` is not satisfied
   --> /Users/wongchris/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/rocket-0.4.10/src/rocket.rs:299:41
    |
299 |             let outcome = route.handler.handle(request, data);
    |                                         ^^^^^^ the trait `handler::Handler` is not implemented for `(dyn handler::Handler + 'static)`

There is no such error with +nightly-2021-10-14.

Version it worked on

rustc +nightly-2021-10-14 --version --verbose:

rustc 1.57.0-nightly (dfc5add91 2021-10-13)
binary: rustc
commit-hash: dfc5add915e8bf4accbb7cf4de00351a7c6126a1
commit-date: 2021-10-13
host: x86_64-apple-darwin
release: 1.57.0-nightly
LLVM version: 13.0.0

Version with regression

rustc +nightly-2021-10-16 --version --verbose:

rustc 1.57.0-nightly (c1026539b 2021-10-15)
binary: rustc
commit-hash: c1026539bd22e9d070988deaa47b1360cbc76436
commit-date: 2021-10-15
host: x86_64-apple-darwin
release: 1.57.0-nightly
LLVM version: 13.0.0
@lambda-fairy lambda-fairy added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Oct 16, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 16, 2021
@lambda-fairy
Copy link
Contributor Author

A similar issue affects Rocket 0.5.0-rc.1: rwf2/Rocket#1948

Since Rocket 0.5 builds on stable...

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged

@rustbot rustbot added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. and removed regression-untriaged Untriaged performance or correctness regression. labels Oct 16, 2021
@Aaron1011
Copy link
Member

Bisected to #86011

@nbdd0121
Copy link
Contributor

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();
}

@hkmatsumoto
Copy link
Member

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-critical

@rustbot rustbot added P-critical Critical priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Oct 16, 2021
@JohnTitor
Copy link
Member

Bisected to #86011

cc @estebank and @tlyu for awareness.

[..], because in theory, the ordering of trait bounds should be irrelevant to type checking results, right?

Uhm, seems actually not?

@emirhg
Copy link

emirhg commented Oct 17, 2021

Bisected to #86011

Based on this I downgraded my Rust version and it worked. I'm using Rocket v0.4.9 rustup default nightly-2021-10-05 did the trick.

@estebank estebank added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 18, 2021
@estebank
Copy link
Contributor

Let's revert #86011.

JohnTitor added a commit to JohnTitor/rust that referenced this issue Oct 18, 2021
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 18, 2021
Revert rust-lang#86011 to fix an incorrect bound check

This reverts commit 36a1076, reversing
changes made to e1e9319.

Fixes rust-lang#89935
r? `@estebank`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Oct 19, 2021
Revert rust-lang#86011 to fix an incorrect bound check

This reverts commit 36a1076, reversing
changes made to e1e9319.

Fixes rust-lang#89935
r? `@estebank`
@bors bors closed this as completed in d8b3764 Oct 20, 2021
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this issue Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. P-critical Critical priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants