summaryrefslogtreecommitdiffstats
path: root/src/test/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed')
-rw-r--r--src/test/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed b/src/test/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
new file mode 100644
index 000000000..39e90d7a3
--- /dev/null
+++ b/src/test/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
@@ -0,0 +1,16 @@
+// run-rustfix
+#![allow(non_snake_case)]
+mod A {
+ pub trait Trait {}
+ impl Trait for i32 {}
+}
+
+mod B {
+ use A::Trait;
+
+pub struct A<H: Trait>(pub H); //~ ERROR cannot find trait
+}
+
+fn main() {
+ let _ = B::A(42);
+}