Support lint expectations for `--force-warn` lints (RFC 2383)
@@ -433,7 +433,7 @@ mod tests {
Some(ignore_list),
);
let span = MultiSpan::from_span(mk_sp(BytePos(0), BytePos(1)));
- let non_fatal_diagnostic = build_diagnostic(DiagnosticLevel::Warning, Some(span));
+ let non_fatal_diagnostic = build_diagnostic(DiagnosticLevel::Warning(None), Some(span));
emitter.emit_diagnostic(&non_fatal_diagnostic);
assert_eq!(num_emitted_errors.load(Ordering::Acquire), 0);
assert_eq!(can_reset_errors.load(Ordering::Acquire), true);
@@ -457,7 +457,7 @@ mod tests {
None,
);
let span = MultiSpan::from_span(mk_sp(BytePos(0), BytePos(1)));
- let non_fatal_diagnostic = build_diagnostic(DiagnosticLevel::Warning, Some(span));
+ let non_fatal_diagnostic = build_diagnostic(DiagnosticLevel::Warning(None), Some(span));
emitter.emit_diagnostic(&non_fatal_diagnostic);
assert_eq!(num_emitted_errors.load(Ordering::Acquire), 1);
assert_eq!(can_reset_errors.load(Ordering::Acquire), false);
@@ -494,8 +494,8 @@ mod tests {
);
let bar_span = MultiSpan::from_span(mk_sp(BytePos(0), BytePos(1)));
let foo_span = MultiSpan::from_span(mk_sp(BytePos(21), BytePos(22)));
- let bar_diagnostic = build_diagnostic(DiagnosticLevel::Warning, Some(bar_span));
- let foo_diagnostic = build_diagnostic(DiagnosticLevel::Warning, Some(foo_span));
+ let bar_diagnostic = build_diagnostic(DiagnosticLevel::Warning(None), Some(bar_span));
+ let foo_diagnostic = build_diagnostic(DiagnosticLevel::Warning(None), Some(foo_span));
let fatal_diagnostic = build_diagnostic(DiagnosticLevel::Fatal, None);
emitter.emit_diagnostic(&bar_diagnostic);
emitter.emit_diagnostic(&foo_diagnostic);
