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
Found by running our test suite with use_extern_macros enabled.
With use_extern_macros disabled:
use std::panic::{self,AssertUnwindSafe};// OKfnmain(){panic!();}
With use_extern_macros enabled:
#![feature(use_extern_macros)]use std::panic::{self,AssertUnwindSafe};// ERROR `self` no longer imports valuesfnmain(){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).
The text was updated successfully, but these errors were encountered:
Turn deprecation lint `legacy_imports` into a hard error
Closes#38260
The lint was introduced in Dec 2016, then made deny-by-default in Jun 2017 when crater run found 0 regressions caused by it.
This lint requires some not entirely trivial amount of import resolution logic that (surprisingly or not) interacts with `feature(use_extern_macros)` (#35896), so it would be desirable to remove it before stabilizing `use_extern_macros`.
In particular, this PR fixes the failing example in #50725 (but not the whole issue, `use std::panic::{self}` still can cause other undesirable errors when `use_extern_macros` is enabled).
Found by running our test suite with
use_extern_macros
enabled.With
use_extern_macros
disabled:With
use_extern_macros
enabled: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 thepanic
module should be imported (without an error).The text was updated successfully, but these errors were encountered: