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

Error parsing broken on nightly #205

Closed
jethrogb opened this issue May 8, 2016 · 0 comments
Closed

Error parsing broken on nightly #205

jethrogb opened this issue May 8, 2016 · 0 comments

Comments

@jethrogb
Copy link

jethrogb commented May 8, 2016

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
birkenfeld added a commit to birkenfeld/rust-playpen that referenced this issue May 9, 2016
The current nightlies add the following:

* color+bold sequences
* unpaired "reset" before a color+bold sequence

Fixes: rust-lang#205
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant