]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs
Merge 'rust-clippy/master' into clippyup
[rust.git] / src / tools / clippy / tests / ui-toml / toml_disallowed_methods / conf_disallowed_methods.rs
index 338b3b5b28f429b9700d5849886109698f758242..3397fa1ec69278b088ee7adf767b7bca8490e566 100644 (file)
@@ -14,4 +14,10 @@ fn main() {
 
     let _ = 2.0f32.clamp(3.0f32, 4.0f32);
     let _ = 2.0f64.clamp(3.0f64, 4.0f64);
+
+    let indirect: fn(&str) -> Result<Regex, regex::Error> = Regex::new;
+    let re = indirect(".").unwrap();
+
+    let in_call = Box::new(f32::clamp);
+    let in_method_call = ["^", "$"].into_iter().map(Regex::new);
 }