summary refs log tree commit diff
path: root/src/test/run-fail/issue-2156.rs
blob: 921842a32d20dba74d8995009aec30316f216f9d (plain)
1
2
3
4
5
6
7
8
9
10
// error-pattern:explicit failure
// Don't double free the string
use std;
import io::{reader, reader_util};

fn main() {
    do io::with_str_reader("") |rdr| {
        alt rdr.read_char() { '=' { } _ { fail } }
    }
}