From 3f2a63a68bbf4e84f7e409659bb64bdd75db39e5 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Thu, 28 Nov 2024 20:22:46 +0000 Subject: Use trait name instead of full constraint in suggestion message ``` help: consider restricting type parameter `T` with traits `Copy` and `Trait` | LL | fn duplicate_custom(t: S) -> (S, S) { | ++++++++++++++ ``` ``` help: consider restricting type parameter `V` with trait `Copy` | LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap, k: K) -> &'a V { | +++++++++++++++++++ ``` --- tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/ui/errors') diff --git a/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr b/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr index 5148cc272fd..b221195a7bd 100644 --- a/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr +++ b/tests/ui/errors/trait-bound-error-spans/blame-trait-error.stderr @@ -73,7 +73,7 @@ note: required by a bound in `want` | LL | fn want(_x: V) {} | ^^ required by this bound in `want` -help: consider restricting type parameter `Q` with trait `std::iter::Iterator` +help: consider restricting type parameter `Q` with trait `Iterator` | LL | fn example(q: Q) { | +++++++++++++++++++++ @@ -100,7 +100,7 @@ note: required by a bound in `want` | LL | fn want(_x: V) {} | ^^ required by this bound in `want` -help: consider restricting type parameter `Q` with trait `std::iter::Iterator` +help: consider restricting type parameter `Q` with trait `Iterator` | LL | fn example(q: Q) { | +++++++++++++++++++++ -- cgit 1.4.1-3-g733a5