From 59d5c74c1572f176fe6b794e1ae106e66db9d33f Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 4 Mar 2022 17:14:34 -0500 Subject: [PATCH] Update use_suggestion_placement.rs test, removing the FIXME that this PR fixes. (There is another issue, in that the fixed output is not ideally indented, but that is a pre-existing issue and should not block this PR.) --- src/test/ui/resolve/use_suggestion_placement.fixed | 6 +----- src/test/ui/resolve/use_suggestion_placement.rs | 6 +----- src/test/ui/resolve/use_suggestion_placement.stderr | 6 +++--- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/test/ui/resolve/use_suggestion_placement.fixed b/src/test/ui/resolve/use_suggestion_placement.fixed index 63676327aa0..d1686f7fd2b 100644 --- a/src/test/ui/resolve/use_suggestion_placement.fixed +++ b/src/test/ui/resolve/use_suggestion_placement.fixed @@ -14,13 +14,9 @@ mod m { } mod foo { - // FIXME: UsePlacementFinder is broken because active attributes are - // removed, and thus the `derive` attribute here is not in the AST. - // An inert attribute should work, though. - // #[derive(Debug)] use std::path::Path; -#[allow(warnings)] +#[derive(Debug)] pub struct Foo; // test whether the use suggestion isn't diff --git a/src/test/ui/resolve/use_suggestion_placement.rs b/src/test/ui/resolve/use_suggestion_placement.rs index ecc74d78167..5be91f27092 100644 --- a/src/test/ui/resolve/use_suggestion_placement.rs +++ b/src/test/ui/resolve/use_suggestion_placement.rs @@ -10,11 +10,7 @@ mod m { } mod foo { - // FIXME: UsePlacementFinder is broken because active attributes are - // removed, and thus the `derive` attribute here is not in the AST. - // An inert attribute should work, though. - // #[derive(Debug)] - #[allow(warnings)] + #[derive(Debug)] pub struct Foo; // test whether the use suggestion isn't diff --git a/src/test/ui/resolve/use_suggestion_placement.stderr b/src/test/ui/resolve/use_suggestion_placement.stderr index 217c08a560b..0aadd82f6c2 100644 --- a/src/test/ui/resolve/use_suggestion_placement.stderr +++ b/src/test/ui/resolve/use_suggestion_placement.stderr @@ -1,5 +1,5 @@ error[E0412]: cannot find type `Path` in this scope - --> $DIR/use_suggestion_placement.rs:22:16 + --> $DIR/use_suggestion_placement.rs:18:16 | LL | type Bar = Path; | ^^^^ not found in this scope @@ -10,7 +10,7 @@ LL | use std::path::Path; | error[E0425]: cannot find value `A` in this scope - --> $DIR/use_suggestion_placement.rs:27:13 + --> $DIR/use_suggestion_placement.rs:23:13 | LL | let _ = A; | ^ not found in this scope @@ -21,7 +21,7 @@ LL | use m::A; | error[E0412]: cannot find type `HashMap` in this scope - --> $DIR/use_suggestion_placement.rs:32:23 + --> $DIR/use_suggestion_placement.rs:28:23 | LL | type Dict = HashMap; | ^^^^^^^ not found in this scope