]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/block-with-trait-parent.rs
Rollup merge of #87180 - notriddle:notriddle/sidebar-keyboard-mobile, r=GuillaumeGomez
[rust.git] / src / test / 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() {}