Skip to content

New IO stdout is not flushed at program exit #23191

Closed
@shepmaster

Description

@shepmaster

I know that the new IO is being worked on, but I could see this being a sneaky thing that gets lost.

#![feature(io)]
use std::io::Write;
fn main() {
    write!(&mut std::io::stdout(), "Hello world").unwrap();
}

This code prints nothing. If we use stderr instead, there is output.

rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)

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