Skip to content

Import regression with use_extern_macros #50725

Closed
@petrochenkov

Description

@petrochenkov

Found by running our test suite with use_extern_macros enabled.

With use_extern_macros disabled:

use std::panic::{self, AssertUnwindSafe}; // OK

fn main() {
    panic!();
}

With use_extern_macros enabled:

#![feature(use_extern_macros)]

use std::panic::{self, AssertUnwindSafe}; // ERROR `self` no longer imports values

fn main() {
    panic!(); // Curiously, the error disappears if this panic is removed
}

I haven't investigated what happens yet.
use a::b::{self}; should filter away all namespaces except for type, and it should report an error only if nothing is left.
In the example with use std::panic::{self}; above only the panic module should be imported (without an error).

Metadata

Metadata

Assignees

Labels

A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions