You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fails to compile because there is no path on the bar, however I think it should work because there is a path on the foo. That is, the following is valid and will look for foo/bar.rs:
…r=nikomatsakis
Allow more non-inline modules in blocks
Currently, non-inline modules without a `#[path]` attribute are not allowed in blocks.
This PR allows non-inline modules that have an ancestor module with a `#[path]` attribute, provided there is not a nearer ancestor block.
For example,
```rust
fn main() {
#[path = "..."] mod foo {
mod bar; //< allowed by this PR
fn f() {
mod bar; //< still an error
}
}
}
```
Fixesrust-lang#36772.
r? @nikomatsakis
This code
Fails to compile because there is no path on the
bar
, however I think it should work because there is a path on thefoo
. That is, the following is valid and will look forfoo/bar.rs
:cc @jseyfried d21e908
The text was updated successfully, but these errors were encountered: