Skip to content

rustc compiler bug? #59762

@baladithyab

Description

@baladithyab

Compiling diesel_tut v0.1.0 (/home/codeseys/Documents/Rust/diesel_tut)
error: internal compiler error: src/librustc/ty/query/plumbing.rs:1195: Cannot force dep node: coherent_trait(core[c27c]::ops[0]::drop[0]::Drop[0])

thread 'rustc' panicked at 'Box', src/librustc_errors/lib.rs:635:9
note: Run with RUST_BACKTRACE=1 environment variable to display a backtrace.
error: aborting due to previous error

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.35.0-nightly (acd8dd6 2019-04-05) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

error: Could not compile diesel_tut.

To learn more, run the command again with --verbose.

I got this with

#![feature(proc_macro_hygiene, decl_macro)]

#[macro_use] extern crate rocket;
extern crate rocket_contrib;
extern crate serde;

#[macro_use]
extern crate serde_derive;

use rocket_contrib::templates::Template;
use rocket::request::Form;

#[derive(Serialize)]
struct Context {
    header: String,
}

#[derive(FromForm)]
struct User{
    username: String,
    password: String,
}

#[get("/")]
fn index() -> Template {
    let context = Context {
        header: "Hello!".to_string(),
    };
    Template::render("index", &context)
}

#[post("/")]
fn login(userdata: Form<User>) -> String{
    format!("Hello {}", userdata.username);
}

fn main() {
    rocket::ignite().mount("/", routes![index]).attach(Template::fairing()).launch();
}

but instead of compiling it gave me the above error/bug

I'm running rustc 1.35.0-nightly (acd8dd6 2019-04-05) running on x86_64-unknown-linux-gnu

I don't know what's happening but I had issues with windows not letting me access the .env file i had in the project directory with dotenv so i moved to ubuntu18.04 but now this issue pops up.
PLZ HALP!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions