Skip to content

eprint doesn't work inside the rustc_driver #44244

Closed
@MaikKlein

Description

@MaikKlein
#![feature(rustc_private)]
extern crate rustc_driver;
use rustc_driver::{get_args, run, run_compiler, RustcDefaultCalls};

fn main() {
    let mut calls = RustcDefaultCalls {};
    run(move || {
        println!("Works");
        eprintln!("Doesn't work");
        run_compiler(&get_args(), &mut calls, None, None)
    });
}

playground

Is this expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.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