Add a test reproducing the quadratic json explosion

This commit is contained in:
Oliver Schneider 2017-10-24 16:22:35 +02:00
parent a789fa0440
commit cf8600d1bb
No known key found for this signature in database
GPG Key ID: A69F8D225B3AD7D9
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// compile-flags: --error-format json
// The output for humans should just highlight the whole span without showing
// the suggested replacement, but we also want to test that suggested
// replacement only removes one set of parentheses, rather than naïvely
// stripping away any starting or ending parenthesis characters—hence this
// test of the JSON error format.
fn main() {
let x: Iter;
}

File diff suppressed because one or more lines are too long