diff options
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.rs | 14 |
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 00000000000..ee6ed0cae67 --- /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); +} |
