]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / tools / clippy / tests / ui-toml / toml_disallowed_methods / conf_disallowed_methods.rs
1 #![warn(clippy::disallowed_methods)]
2
3 extern crate regex;
4 use regex::Regex;
5
6 fn main() {
7     let re = Regex::new(r"ab.*c").unwrap();
8     re.is_match("abc");
9
10     let mut a = vec![1, 2, 3, 4];
11     a.iter().sum::<i32>();
12
13     a.sort_unstable();
14
15     let _ = 2.0f32.clamp(3.0f32, 4.0f32);
16     let _ = 2.0f64.clamp(3.0f64, 4.0f64);
17 }