From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/resolve/use_suggestion_placement.fixed | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/ui/resolve/use_suggestion_placement.fixed (limited to 'tests/ui/resolve/use_suggestion_placement.fixed') diff --git a/tests/ui/resolve/use_suggestion_placement.fixed b/tests/ui/resolve/use_suggestion_placement.fixed new file mode 100644 index 000000000..d1686f7fd --- /dev/null +++ b/tests/ui/resolve/use_suggestion_placement.fixed @@ -0,0 +1,35 @@ +// run-rustfix +#![allow(dead_code)] + +use m::A; + +use std::collections::HashMap; + +macro_rules! y { + () => {} +} + +mod m { + pub const A: i32 = 0; +} + +mod foo { + use std::path::Path; + +#[derive(Debug)] + pub struct Foo; + + // test whether the use suggestion isn't + // placed into the expansion of `#[derive(Debug)] + type Bar = Path; //~ ERROR cannot find +} + +fn main() { + y!(); + let _ = A; //~ ERROR cannot find + foo(); +} + +fn foo() { + type Dict = HashMap; //~ ERROR cannot find +} -- cgit v1.2.3