Skip to content

span misidentified within format! on "consider removing this semicolon" #13428

Closed
@pnkfelix

Description

@pnkfelix

Code:

#![crate_type="lib"]
pub fn foo() -> ~str {
    format!("Hello {:s}",
            "world");
}

Compilation attempt:

% rustc --version
/Users/fklock/opt/rust-dbg/bin/rustc 0.11-pre (0deb16a 2014-04-07 02:26:37 -0700)
host: x86_64-apple-darwin
% rustc /tmp/f.rs
/tmp/f.rs:3:25: 3:25 note: consider removing this semicolon:
/tmp/f.rs:3     format!("Hello {:s}",
                                    ^
note: in expansion of format_args!
...

It should be pointing at the semi-colon on the next line, not the comma on this line.

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