From 4680aa2fd07876a4d2f7059defef2595e3184038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Mon, 10 Apr 2023 16:46:12 +0000 Subject: [PATCH] Special-case item attributes in the suggestion output --- tests/ui/crashes/ice-6252.stderr | 3 --- tests/ui/new_without_default.stderr | 6 ------ 2 files changed, 9 deletions(-) diff --git a/tests/ui/crashes/ice-6252.stderr b/tests/ui/crashes/ice-6252.stderr index 3c7e08ebe..4787282f5 100644 --- a/tests/ui/crashes/ice-6252.stderr +++ b/tests/ui/crashes/ice-6252.stderr @@ -7,13 +7,10 @@ LL | _n: PhantomData, help: consider importing one of these items | LL + use core::marker::PhantomData; -LL | trait TypeVal { | LL + use serde::__private::PhantomData; -LL | trait TypeVal { | LL + use std::marker::PhantomData; -LL | trait TypeVal { | error[E0412]: cannot find type `VAL` in this scope diff --git a/tests/ui/new_without_default.stderr b/tests/ui/new_without_default.stderr index 9b0a2f6ca..583dd327d 100644 --- a/tests/ui/new_without_default.stderr +++ b/tests/ui/new_without_default.stderr @@ -14,7 +14,6 @@ LL + fn default() -> Self { LL + Self::new() LL + } LL + } -LL | impl Foo { | error: you should consider adding a `Default` implementation for `Bar` @@ -32,7 +31,6 @@ LL + fn default() -> Self { LL + Self::new() LL + } LL + } -LL | impl Bar { | error: you should consider adding a `Default` implementation for `LtKo<'c>` @@ -50,7 +48,6 @@ LL + fn default() -> Self { LL + Self::new() LL + } LL + } -LL | impl<'c> LtKo<'c> { | error: you should consider adding a `Default` implementation for `NewNotEqualToDerive` @@ -68,7 +65,6 @@ LL + fn default() -> Self { LL + Self::new() LL + } LL + } -LL | impl NewNotEqualToDerive { | error: you should consider adding a `Default` implementation for `FooGenerics` @@ -86,7 +82,6 @@ LL + fn default() -> Self { LL + Self::new() LL + } LL + } -LL | impl FooGenerics { | error: you should consider adding a `Default` implementation for `BarGenerics` @@ -104,7 +99,6 @@ LL + fn default() -> Self { LL + Self::new() LL + } LL + } -LL | impl BarGenerics { | error: you should consider adding a `Default` implementation for `Foo`