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