Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Error parsing broken on nightly #205

Closed
@jethrogb

Description

@jethrogb

rust-lang/rust#32756 changed up the error printing format, this results in the error output on the playpen including bogus characters.

When compiling

fn main() {
    let b;
    {
        let a=1;
        b=&a;
    }
    println!("{}",b);
}

With nightly-2016-04-29, I get:

x.rs:5:6: 5:7 ^[[31merror: ^[(B^[[0m^[[1m`a` does not live long enough^[(B^[[0m
x.rs:5      b=&a;
^[[31m                 ^^[(B^[[0m
x.rs:2:8: 8:2 ^[[32mnote: ^[(B^[[0m^[[1mreference must be valid for the block suffix following statement 0 at 2:7...^[(B^[[0m
x.rs:2  let b;
x.rs:3  {
x.rs:4      let a=1;
x.rs:5      b=&a;
x.rs:6  }
x.rs:7  println!("{}",b);
       ...
x.rs:4:11: 6:3 ^[[32mnote: ^[(B^[[0m^[[1m...but borrowed value is only valid for the block suffix following statement 0 at 4:10^[(B^[[0m
x.rs:4      let a=1;
x.rs:5      b=&a;
x.rs:6  }
^[[31merror: ^[(B^[[0m^[[1maborting due to previous error^[(B^[[0m

Whereas with nightly-2016-05-07 I get:

x.rs:5:6: 5:7 ^[(B^[[0m^[[1m^[[31merror^[(B^[[0m: ^[[1m`a` does not live long enough^[(B^[[0m
x.rs^[(B^[[0m:5 ^[(B^[[0m       b=&a;^[(B^[[0m
       ^[(B^[[0m     ^[(B^[[0m^[[1m^[[31m^^[(B^[[0m
x.rs:2:8: 8:2 ^[(B^[[0m^[[1m^[[32mnote^[(B^[[0m: ^[[1mreference must be valid for the block suffix following statement 0 at 2:7...^[(B^[[0m
x.rs^[(B^[[0m:2 ^[(B^[[0m   let b;^[(B^[[0m
       ^[(B^[[0m       ^[(B^[[0m^[[1m^[[32m^^[(B^[[0m
x.rs:4:11: 6:3 ^[(B^[[0m^[[1m^[[32mnote^[(B^[[0m: ^[[1m...but borrowed value is only valid for the block suffix following statement 0 at 4:10^[(B^[[0m
x.rs^[(B^[[0m:4 ^[(B^[[0m       let a=1;^[(B^[[0m
       ^[(B^[[0m          ^[(B^[[0m^[[1m^[[32m^^[(B^[[0m
^[[1m^[[31merror^[(B^[[0m: ^[[1maborting due to previous error^[(B^[[0m

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