summaryrefslogtreecommitdiffstats
path: root/tests/ui/resolve/unused-qualifications-suggestion.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/resolve/unused-qualifications-suggestion.fixed')
-rw-r--r--tests/ui/resolve/unused-qualifications-suggestion.fixed23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/resolve/unused-qualifications-suggestion.fixed b/tests/ui/resolve/unused-qualifications-suggestion.fixed
new file mode 100644
index 000000000..0d4b9007c
--- /dev/null
+++ b/tests/ui/resolve/unused-qualifications-suggestion.fixed
@@ -0,0 +1,23 @@
+// run-rustfix
+
+#![deny(unused_qualifications)]
+
+mod foo {
+ pub fn bar() {}
+}
+
+mod baz {
+ pub mod qux {
+ pub fn quux() {}
+ }
+}
+
+fn main() {
+ use foo::bar;
+ bar();
+ //~^ ERROR unnecessary qualification
+
+ use baz::qux::quux;
+ quux();
+ //~^ ERROR unnecessary qualification
+}