Repository: rust
Issue: The compiler suggests the same thing twice
Labels: T-compiler,C-bug,A-suggestion-diagnostics,D-papercut

I tried this code:

```rust
use clippy_utils::diagnostics::span_lint_and_sugg;
use clippy_utils::source::snippet;
use clippy_utils::ty::{is_type_diagnostic_item, is_type_lang_item};
use if_chain::if_chain;
use rustc_errors::Applicability;
use rustc_hir::{Expr, ExprKind, LangItem};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::sym;

declare_clippy_lint! {
    pub SLICE_FULL_RANGE,
    complexity,
    "useless full ranged slice creation"
}

declare_lint_pass!(SliceFullRange => [SLICE_FULL_RANGE]);

impl<'tcx> LateLintPass<'tcx> for SliceFullRange {
    fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
        if_chain! {
            if let ExprKind::Index(var, range) = expr.kind;
            if is_slice_or_str(cx, var);
            if is_full_range(cx, range);
            then {
                span_lint_and_sugg(
                    cx,
                    SLICE_FULL_RANGE,
                    expr.span,
                    "getting a full range should be not necessary",
                    "try",
                    snippet(cx, var.span, ".."),
                    Applicability::MachineApplicable,
                )
            }
        }
    }
}

fn is_full_range(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
    let ty = cx.typeck_results().expr_ty(expr);
    let ty = ty.peel_refs();
    is_type_lang_item(cx, ty, LangItem::RangeFull)
}

fn is_slice_or_str(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
    let ty = cx.typeck_results().expr_ty(expr);
    let ty = ty.peel_refs();
    
    is_type_diagnostic_item(cx, ty, sym::slice)
    || is_type_diagnostic_item(cx, ty, sym::str)
    || is_type_diagnostic_item(cx, ty, sym::string_type)
    || is_type_diagnostic_item(cx, ty, sym::vec_type)
}
```

The code above contains an error which is correctly reported by the compiler, but it suggests the same fix twice:

```
error[E0308]: mismatched types
  --> clippy_lints\src\slice_full_range.rs:43:21
   |
43 |                     snippet(cx, var.span, ".."),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `std::string::String`, found enum `Cow`
   |
   = note: expected struct `std::string::String`
                found enum `Cow<'_, str>`
help: try using a conversion method
   |
43 |                     snippet(cx, var.span, "..").to_string(),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 |                     snippet(cx, var.span, "..").to_string(),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.54.0-nightly (bacf770f2 2021-05-05)
binary: rustc
commit-hash: bacf770f2983a52f31e3537db5f0fe1ef2eaa874
commit-date: 2021-05-05
host: x86_64-pc-windows-msvc
release: 1.54.0-nightly
LLVM version: 12.0.0
```

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"hi-rustin"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->