summaryrefslogtreecommitdiffstats
path: root/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);
+}