Add a test reproducing the quadratic json explosion
This commit is contained in:
parent
a789fa0440
commit
cf8600d1bb
21
src/test/ui/lint/use_suggestion_json.rs
Normal file
21
src/test/ui/lint/use_suggestion_json.rs
Normal 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;
|
||||
}
|
2
src/test/ui/lint/use_suggestion_json.stderr
Normal file
2
src/test/ui/lint/use_suggestion_json.stderr
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user