]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_driver/lib.rs
Rollup merge of #52718 - fintelia:patch-2, r=cramertj
[rust.git] / src / librustc_driver / lib.rs
index 2100ceea22849713c853d10cf810dd61ae7628b3..000025c49a698a4a230eb93819d370b0254851ad 100644 (file)
@@ -1229,10 +1229,7 @@ fn sort_lints(sess: &Session, lints: Vec<(&'static Lint, bool)>) -> Vec<&'static
     fn sort_lint_groups(lints: Vec<(&'static str, Vec<lint::LintId>, bool)>)
                         -> Vec<(&'static str, Vec<lint::LintId>)> {
         let mut lints: Vec<_> = lints.into_iter().map(|(x, y, _)| (x, y)).collect();
-        lints.sort_by(|&(x, _): &(&'static str, Vec<lint::LintId>),
-                       &(y, _): &(&'static str, Vec<lint::LintId>)| {
-            x.cmp(y)
-        });
+        lints.sort_by_key(|ref l| l.0);
         lints
     }