about summary refs log tree commit diff
path: root/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed')
-rw-r--r--tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed b/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
new file mode 100644
index 00000000000..39e90d7a3f7
--- /dev/null
+++ b/tests/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);
+}