about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec
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/array-slice-vec
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/array-slice-vec')
-rw-r--r--tests/ui/array-slice-vec/vec-res-add.stderr5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/array-slice-vec/vec-res-add.stderr b/tests/ui/array-slice-vec/vec-res-add.stderr
index cf5796f7e4a..34fd69426a8 100644
--- a/tests/ui/array-slice-vec/vec-res-add.stderr
+++ b/tests/ui/array-slice-vec/vec-res-add.stderr
@@ -5,6 +5,11 @@ LL |     let k = i + j;
    |             - ^ - Vec<R>
    |             |
    |             Vec<R>
+   |
+note: the foreign item type `Vec<R>` doesn't implement `Add`
+  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
+   |
+   = note: not implement `Add`
 
 error: aborting due to 1 previous error