]> git.lizzy.rs Git - rust.git/blob - tests/ui/resolve/block-with-trait-parent.rs
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / resolve / block-with-trait-parent.rs
1 // check-pass
2
3 trait Trait {
4     fn method(&self) {
5         // Items inside a block turn it into a module internally.
6         struct S;
7         impl Trait for S {}
8
9         // OK, `Trait` is in scope here from method resolution point of view.
10         S.method();
11     }
12 }
13
14 fn main() {}