Rollup merge of #131809 - collinoc:fix-retain-mut-docs, r=jhpratt · qinheping/verify-rust-std@5ec2cbc (original) (raw)

Original file line number Diff line number Diff line change
@@ -1082,7 +1082,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
1082 1082
1083 1083 /// Retains only the elements specified by the predicate.
1084 1084 ///
1085 - /// In other words, remove all elements `e` for which `f(&e)` returns false.
1085 + /// In other words, remove all elements `e` for which `f(&mut e)` returns false.
1086 1086 /// This method operates in place, visiting each element exactly once in the
1087 1087 /// original order, and preserves the order of the retained elements.
1088 1088 ///