]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/cmp.rs
Added diagnostic items to functions for Clippy
[rust.git] / library / core / src / cmp.rs
index 879deed3bed5e63a11a9886723742f54f76a486f..79610bb409d37c06b383ea7622452560b179ebf6 100644 (file)
@@ -1104,6 +1104,7 @@ fn ge(&self, other: &Rhs) -> bool {
 #[inline]
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "cmp_min")]
 pub fn min<T: Ord>(v1: T, v2: T) -> T {
     v1.min(v2)
 }
@@ -1166,6 +1167,7 @@ pub fn min_by_key<T, F: FnMut(&T) -> K, K: Ord>(v1: T, v2: T, mut f: F) -> T {
 #[inline]
 #[must_use]
 #[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "cmp_max")]
 pub fn max<T: Ord>(v1: T, v2: T) -> T {
     v1.max(v2)
 }