diff options
| author | Jeremy Fitzhardinge <jeremy@goop.org> | 2022-04-15 01:24:49 -0700 |
|---|---|---|
| committer | Jeremy Fitzhardinge <jsgf@fb.com> | 2022-04-27 10:04:25 -0700 |
| commit | 0529a13b5db43952a88504fb16fd561adbcdcc14 (patch) | |
| tree | e30ada702af203ba933e34bfd3ff2c1e734d3503 /compiler/rustc_errors/src/json.rs | |
| parent | 39f2f1846376c1522b2264069c94a19ef42ebb98 (diff) | |
| download | rust-0529a13b5db43952a88504fb16fd561adbcdcc14.tar.gz rust-0529a13b5db43952a88504fb16fd561adbcdcc14.zip | |
Plumb through rustc_lint_defs::Level as enum rather than string.
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index d680e7fab70..6ff52182d6b 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -171,7 +171,8 @@ impl Emitter for JsonEmitter { } } - fn emit_unused_externs(&mut self, lint_level: &str, unused_externs: &[&str]) { + fn emit_unused_externs(&mut self, lint_level: rustc_lint_defs::Level, unused_externs: &[&str]) { + let lint_level = lint_level.as_str(); let data = UnusedExterns { lint_level, unused_extern_names: unused_externs }; let result = if self.pretty { writeln!(&mut self.dst, "{}", as_pretty_json(&data)) |
