]> git.lizzy.rs Git - rust.git/blob - tests/ui/outer_expn_data.rs
Auto merge of #4478 - tsurai:master, r=flip1995
[rust.git] / tests / ui / outer_expn_data.rs
1 // run-rustfix
2
3 #![deny(clippy::internal)]
4 #![feature(rustc_private)]
5
6 #[macro_use]
7 extern crate rustc;
8 use rustc::hir::Expr;
9 use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
10
11 declare_lint! {
12     pub TEST_LINT,
13     Warn,
14     ""
15 }
16
17 declare_lint_pass!(Pass => [TEST_LINT]);
18
19 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
20     fn check_expr(&mut self, _cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
21         let _ = expr.span.ctxt().outer_expn().expn_data();
22     }
23 }
24
25 fn main() {}