about summary refs log tree commit diff
path: root/tests/ui/try_err.fixed
diff options
context:
space:
mode:
authorPhilipp Hansch <dev@phansch.net>2019-10-24 07:52:01 +0200
committerPhilipp Hansch <dev@phansch.net>2019-10-24 07:52:01 +0200
commit52f52900a4dc90c6727432863c2c66aecbeea69f (patch)
tree8e33e11408e4805de7a6b31ce916dfebf7166d0a /tests/ui/try_err.fixed
parent850dfdae60cd8b28a40b099f8e390534205b9ede (diff)
downloadrust-52f52900a4dc90c6727432863c2c66aecbeea69f.tar.gz
rust-52f52900a4dc90c6727432863c2c66aecbeea69f.zip
Don't emit try_err lint in external macros
Diffstat (limited to 'tests/ui/try_err.fixed')
-rw-r--r--tests/ui/try_err.fixed7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/try_err.fixed b/tests/ui/try_err.fixed
index a2087316e37..29d9139d3e3 100644
--- a/tests/ui/try_err.fixed
+++ b/tests/ui/try_err.fixed
@@ -1,7 +1,11 @@
 // run-rustfix
+// aux-build:macro_rules.rs
 
 #![deny(clippy::try_err)]
 
+#[macro_use]
+extern crate macro_rules;
+
 // Tests that a simple case works
 // Should flag `Err(err)?`
 pub fn basic_test() -> Result<i32, i32> {
@@ -77,6 +81,9 @@ fn main() {
     negative_test().unwrap();
     closure_matches_test().unwrap();
     closure_into_test().unwrap();
+
+    // We don't want to lint in external macros
+    try_err!();
 }
 
 macro_rules! bar {