Skip to content

Commit 1e797e9

Browse files
committed
Auto merge of #13374 - cuishuang:master, r=Centri3
Remove unnecessary symbols and add missing symbols *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: Remove unnecessary symbols and add missing symbols
2 parents 0ee2650 + b0db9c2 commit 1e797e9

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

clippy_lints/src/methods/unnecessary_to_owned.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ fn check_if_applicable_to_argument<'tcx>(cx: &LateContext<'tcx>, arg: &Expr<'tcx
717717
// check that:
718718
// 1. This is a method with only one argument that doesn't come from a trait.
719719
// 2. That it has `Borrow` in its generic predicates.
720-
// 3. `Self` is a std "map type" (ie `HashSet`, `HashMap`, BTreeSet`, `BTreeMap`).
720+
// 3. `Self` is a std "map type" (ie `HashSet`, `HashMap`, `BTreeSet`, `BTreeMap`).
721721
fn check_borrow_predicate<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) {
722722
if let ExprKind::MethodCall(_, caller, &[arg], _) = expr.kind
723723
&& let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id)

tests/ui/crashes/ice-3969.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// https://github.com/rust-lang/rust-clippy/issues/3969
22
// used to crash: error: internal compiler error:
33
// src/librustc_traits/normalize_erasing_regions.rs:43: could not fully normalize `<i32 as
4-
// std::iter::Iterator>::Item test from rustc ./ui/trivial-bounds/trivial-bounds-inconsistent.rs
4+
// std::iter::Iterator>::Item` test from rustc ./ui/trivial-bounds/trivial-bounds-inconsistent.rs
55

66
// Check that tautalogically false bounds are accepted, and are used
77
// in type inference.
@@ -18,7 +18,7 @@ struct Dst<X: ?Sized> {
1818
struct TwoStrs(str, str)
1919
where
2020
str: Sized;
21-
//~^ ERROR: trait bound str: std::marker::Sized does not depend on any type or lifetim
21+
//~^ ERROR: trait bound str: std::marker::Sized does not depend on any type or lifetime
2222
//~| NOTE: `-D trivial-bounds` implied by `-D warnings`
2323

2424
fn unsized_local()

tests/ui/crashes/ice-6251.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// originally from glacier/fixed/77329.rs
2-
// assertion failed: `(left == right) ; different DefIds
2+
// assertion failed: `(left == right)` ; different DefIds
33
//@no-rustfix
44
fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
55
std::iter::empty()

tests/ui/floating_point_arithmetic_nostd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#![no_std]
55

66
// The following should not lint, as the suggested methods `{f16,f32,f64,f128}.mul_add()`
7-
// and ``{f16,f32,f64,f128}::abs()` are not available in no_std
7+
// and `{f16,f32,f64,f128}::abs()` are not available in no_std
88

99
pub fn mul_add() {
1010
let a: f64 = 1234.567;

tests/ui/unsafe_removed_from_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::cell::UnsafeCell as TotallySafeCell;
77
//~| NOTE: `-D clippy::unsafe-removed-from-name` implied by `-D warnings`
88

99
use std::cell::UnsafeCell as TotallySafeCellAgain;
10-
//~^ ERROR: removed `unsafe` from the name of `UnsafeCell` in use as `TotallySafeCellAgain
10+
//~^ ERROR: removed `unsafe` from the name of `UnsafeCell` in use as `TotallySafeCellAgain`
1111

1212
// Shouldn't error
1313
use std::cell::RefCell as ProbablyNotUnsafe;

0 commit comments

Comments
 (0)