Sign in
rust
/
rust-lang
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
tests
/
ui
/
resolve
/
block-with-trait-parent.rs
blob: e161b33dc253189cdf288c966b6f500bbef3141a [
file
] [
log
] [
blame
]
//@ check-pass
trait
Trait
{
fn
method
(&
self
)
{
// Items inside a block turn it into a module internally.
struct
S
;
impl
Trait
for
S
{}
// OK, `Trait` is in scope here from method resolution point of view.
S
.
method
();
}
}
fn
main
()
{}