Skip to content

program hangs when using String::from_char with negativ value #18428

Closed
@konstin

Description

@konstin

The following program compiles, but when launched, it uses 100% of one cpu core but never finishes:

fn main() {
    println!("{}", String::from_char(-1, ' '));
}

EDIT: System & Version:

rustc 0.13.0-nightly (bd7138dd6 2014-10-27 23:02:55 +0000)
binary: rustc
commit-hash: bd7138dd698dde29fb4d7fd34529a863b85d947e
commit-date: 2014-10-27 23:02:55 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly

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