about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui-internal/outer_expn_data.fixed
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-06 16:59:10 +0000
committerbors <bors@rust-lang.org>2020-12-06 16:59:10 +0000
commit0f6f2d681b39c5f95459cd09cb936b6ceb27cd82 (patch)
treeb57c673df3b1b2a2ab00415f850fc6acf0b61a75 /src/tools/clippy/tests/ui-internal/outer_expn_data.fixed
parentd577c535b4fac58c63c850b97d45b66993c6df3d (diff)
parent898ef0ff874cf99e8b320a3161654c3e289048f6 (diff)
Auto merge of #79765 - flip1995:clippyup, r=Manishearth
Update Clippy

Biweekly Clippy update (which I forgot about on Thursday)

This includes a `Cargo.lock` update, so probably needs `rollup=never`.

r? `@Manishearth`
Diffstat (limited to 'src/tools/clippy/tests/ui-internal/outer_expn_data.fixed')
-rw-r--r--src/tools/clippy/tests/ui-internal/outer_expn_data.fixed28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui-internal/outer_expn_data.fixed b/src/tools/clippy/tests/ui-internal/outer_expn_data.fixed
new file mode 100644
index 00000000000..b0b3498f057
--- /dev/null
+++ b/src/tools/clippy/tests/ui-internal/outer_expn_data.fixed
@@ -0,0 +1,28 @@
+// run-rustfix
+
+#![deny(clippy::internal)]
+#![feature(rustc_private)]
+
+extern crate rustc_hir;
+extern crate rustc_lint;
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_session;
+use rustc_hir::Expr;
+use rustc_lint::{LateContext, LateLintPass};
+
+declare_lint! {
+    pub TEST_LINT,
+    Warn,
+    ""
+}
+
+declare_lint_pass!(Pass => [TEST_LINT]);
+
+impl<'tcx> LateLintPass<'tcx> for Pass {
+    fn check_expr(&mut self, _cx: &LateContext<'tcx>, expr: &'tcx Expr) {
+        let _ = expr.span.ctxt().outer_expn_data();
+    }
+}
+
+fn main() {}