rust/tests/ui/trait-bounds/shadowed-path-in-trait-bound-suggestion.fixed
2025-06-05 09:20:19 +02:00

18 lines
245 B
Rust

//@ edition: 2015
//@ 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);
}