|
5 | 5 | extern crate rustc_session;
|
6 | 6 | extern crate rustc_errors;
|
7 | 7 | extern crate rustc_lint;
|
8 |
| -extern crate syntax; |
| 8 | +extern crate rustc_ast; |
9 | 9 | extern crate rustc_span;
|
10 | 10 |
|
11 | 11 | use rustc_session::{declare_tool_lint, declare_lint_pass};
|
12 | 12 | use rustc_errors::{DiagnosticBuilder, Applicability};
|
13 | 13 | use rustc_lint::{EarlyContext, EarlyLintPass, LintContext, Lint};
|
14 |
| -use syntax::ast::Expr; |
| 14 | +use rustc_ast::ast::Expr; |
15 | 15 | use rustc_span::source_map::Span;
|
16 | 16 |
|
17 | 17 | #[allow(unused_variables)]
|
@@ -41,11 +41,17 @@ impl EarlyLintPass for Pass {
|
41 | 41 | db.span_suggestion(expr.span, help_msg, sugg.to_string(), Applicability::MachineApplicable);
|
42 | 42 | });
|
43 | 43 | span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
|
44 |
| - db.span_help(expr.span, help_msg) |
| 44 | + db.span_help(expr.span, help_msg); |
45 | 45 | });
|
46 |
| - span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| |
47 |
| - db.span_note(expr.span, note_msg) |
48 |
| - ); |
| 46 | + span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| { |
| 47 | + db.span_note(expr.span, note_msg); |
| 48 | + }); |
| 49 | + span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| { |
| 50 | + db.note(note_msg); |
| 51 | + }); |
| 52 | + span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| { |
| 53 | + db.help(help_msg); |
| 54 | + }) |
49 | 55 | }
|
50 | 56 | }
|
51 | 57 |
|
|
0 commit comments