From e92806704b088471a3ced0a7dcc2aa46c99e1366 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sat, 29 Apr 2023 06:58:36 +0000 Subject: [PATCH] fix rustdoc and core test --- library/core/tests/clone.rs | 1 + src/librustdoc/html/format.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/library/core/tests/clone.rs b/library/core/tests/clone.rs index 33ca9f2c6a3a1..aafe5ced2e97f 100644 --- a/library/core/tests/clone.rs +++ b/library/core/tests/clone.rs @@ -1,4 +1,5 @@ #[test] +#[cfg_attr(not(bootstrap), allow(suspicious_double_ref_op))] fn test_borrowed_clone() { let x = 5; let y: &i32 = &x; diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index 1b445b8981e1a..297120da284b9 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -167,7 +167,7 @@ pub(crate) fn print_generic_bounds<'a, 'tcx: 'a>( display_fn(move |f| { let mut bounds_dup = FxHashSet::default(); - for (i, bound) in bounds.iter().filter(|b| bounds_dup.insert(b.clone())).enumerate() { + for (i, bound) in bounds.iter().filter(|b| bounds_dup.insert(*b)).enumerate() { if i > 0 { f.write_str(" + ")?; }