Skip to content

rustc compiler bug? #59762

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

Closed
baladithyab opened this issue Apr 6, 2019 · 1 comment
Closed

rustc compiler bug? #59762

baladithyab opened this issue Apr 6, 2019 · 1 comment

Comments

@baladithyab
Copy link

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!!

@jonas-schievink
Copy link
Contributor

duplicate of #59731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants