Skip to content

Compiling a Rocket application on the 2015 edition doesn't emit errors #89699

Closed
@ferrohd

Description

@ferrohd

When trying to compile any Rocket application in the 2015 edition the compiler says an error occured without showing any actual error:

$ RUST_BACKTRACE=1 cargo build
   Compiling repro v0.1.0
error: could not compile `repro`
$

Switching to the 2018 edition fixes the problem, by either showing errors or properly compiling the application. Minimal reproduction:

// src/main.rs

#[rocket::launch]
fn foo() -> _ {
    rocket::build()
}
# Cargo.toml

[package]
name = "repro"
version = "0.1.0"
edition = "2015"

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

Meta

rustc --version --verbose:

rustc 1.55.0 (c8dfcfe04 2021-09-06)
binary: rustc
commit-hash: c8dfcfe046a7680554bf4eb612bad840e7631c4b
commit-date: 2021-09-06
host: x86_64-unknown-linux-gnu
release: 1.55.0
LLVM version: 12.0.1

Metadata

Metadata

Assignees

Labels

A-proc-macrosArea: Procedural macrosC-bugCategory: This is a bug.D-confusingDiagnostics: Confusing error or lint that should be reworked.D-editionDiagnostics: An error or lint that should account for edition differences.D-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions