about summary refs log tree commit diff
path: root/tests/ui/pattern
diff options
context:
space:
mode:
authorsurechen <chenshuo17@huawei.com>2024-06-25 10:00:30 +0800
committersurechen <chenshuo17@huawei.com>2024-06-25 10:00:30 +0800
commit2a6a42329f79d3c2a42f23ca9fb68aba511a2bc1 (patch)
treebbb5056488b24270c4f12f2b8653c4eb39b16edf /tests/ui/pattern
parent4e63822fc4e2ca675dd28bb3f332f7fd4f3f8126 (diff)
downloadrust-2a6a42329f79d3c2a42f23ca9fb68aba511a2bc1.tar.gz
rust-2a6a42329f79d3c2a42f23ca9fb68aba511a2bc1.zip
Change E0369 diagnostic give note information for foreign items.
Make it easy for developers to understand why the binop cannot be applied.

fixes #125631
Diffstat (limited to 'tests/ui/pattern')
-rw-r--r--tests/ui/pattern/pattern-tyvar-2.stderr5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/pattern/pattern-tyvar-2.stderr b/tests/ui/pattern/pattern-tyvar-2.stderr
index c6540e79558..be52fa8b239 100644
--- a/tests/ui/pattern/pattern-tyvar-2.stderr
+++ b/tests/ui/pattern/pattern-tyvar-2.stderr
@@ -5,6 +5,11 @@ LL | fn foo(t: Bar) -> isize { match t { Bar::T1(_, Some(x)) => { return x * 3;
    |                                                                     - ^ - {integer}
    |                                                                     |
    |                                                                     Vec<isize>
+   |
+note: the foreign item type `Vec<isize>` doesn't implement `Mul<{integer}>`
+  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+   |
+   = note: not implement `Mul<{integer}>`
 
 error: aborting due to 1 previous error