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/specialization/defaultimpl/specialization-wfcheck.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/ui/specialization/defaultimpl') diff --git a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr index b3a53c95cd5..4a51a7dfa47 100644 --- a/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr +++ b/tests/ui/specialization/defaultimpl/specialization-wfcheck.stderr @@ -19,7 +19,7 @@ note: required by a bound in `Foo` | LL | trait Foo<'a, T: Eq + 'a> { } | ^^ required by this bound in `Foo` -help: consider restricting type parameter `U` with trait `std::cmp::Eq` +help: consider restricting type parameter `U` with trait `Eq` | LL | default impl Foo<'static, U> for () {} | ++++++++++++++ -- cgit 1.4.1-3-g733a5