about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorxizheyin <xizheyin@smail.nju.edu.cn>2025-05-07 17:31:42 +0800
committerxizheyin <xizheyin@smail.nju.edu.cn>2025-05-07 23:23:25 +0800
commitbd88f3e3e3eefd781d5cc1f4fbc0630f50e70882 (patch)
tree58d2c0ddfc9cb0b39eb3cbe41d4f6ba867e49612 /tests
parentf46806fb14d9ef9ba76b836019f9e2705b213c97 (diff)
downloadrust-bd88f3e3e3eefd781d5cc1f4fbc0630f50e70882.tar.gz
rust-bd88f3e3e3eefd781d5cc1f4fbc0630f50e70882.zip
Check `&` before suggest remove deref when trait_selection
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/traits/suggest-remove-deref-issue-140166.stderr6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/ui/traits/suggest-remove-deref-issue-140166.stderr b/tests/ui/traits/suggest-remove-deref-issue-140166.stderr
index 8bdcf5981a5..90f24d86d53 100644
--- a/tests/ui/traits/suggest-remove-deref-issue-140166.stderr
+++ b/tests/ui/traits/suggest-remove-deref-issue-140166.stderr
@@ -6,6 +6,7 @@ LL |     format_args!("{:?}", FlatMap(&Chars));
    |                   |
    |                   required by a bound introduced by this call
    |
+   = help: the trait `Trait` is implemented for `Chars`
 note: required for `FlatMap<&Chars>` to implement `Debug`
   --> $DIR/suggest-remove-deref-issue-140166.rs:7:16
    |
@@ -15,11 +16,6 @@ LL | impl<T: Trait> std::fmt::Debug for FlatMap<T> {
    |         unsatisfied trait bound introduced here
 note: required by a bound in `core::fmt::rt::Argument::<'_>::new_debug`
   --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
-help: consider removing the leading `&`-reference
-   |
-LL -     format_args!("{:?}", FlatMap(&Chars));
-LL +     format_args!("{:?}", latMap(&Chars));
-   |
 
 error: aborting due to 1 previous error