]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/try_err.rs
iterate List by value
[rust.git] / tests / ui / try_err.rs
index 5ef1b615dc70232f7ce0d17f0aa71dcec69018ba..5e85d091a2ae73359046f06a82d7e3ce744d9672 100644 (file)
@@ -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 {