]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/block-with-trait-parent.rs
Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into sync_cg_clif-2021-07-07
[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() {}