mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
resolve: Disable an assert that no longer holds
This commit is contained in:
@@ -371,6 +371,8 @@ fn select_glob_decl(
|
||||
// - A glob decl is overwritten by its clone after setting ambiguity in it.
|
||||
// FIXME: avoid this by removing `warn_ambiguity`, or by triggering glob re-fetch
|
||||
// with the same decl in some way.
|
||||
// - A glob decl is overwritten by a glob decl with larger visibility.
|
||||
// FIXME: avoid this by updating this visibility in place.
|
||||
// - A glob decl is overwritten by a glob decl re-fetching an
|
||||
// overwritten decl from other module (the recursive case).
|
||||
// Here we are detecting all such re-fetches and overwrite old decls
|
||||
@@ -384,7 +386,8 @@ fn select_glob_decl(
|
||||
// FIXME: reenable the asserts when `warn_ambiguity` is removed (#149195).
|
||||
// assert_ne!(old_deep_decl, deep_decl);
|
||||
// assert!(old_deep_decl.is_glob_import());
|
||||
assert!(!deep_decl.is_glob_import());
|
||||
// FIXME: reenable the assert when visibility is updated in place.
|
||||
// assert!(!deep_decl.is_glob_import());
|
||||
if old_glob_decl.ambiguity.get().is_some() && glob_decl.ambiguity.get().is_none() {
|
||||
// Do not lose glob ambiguities when re-fetching the glob.
|
||||
glob_decl.ambiguity.set_unchecked(old_glob_decl.ambiguity.get());
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Regression test for issue #152606.
|
||||
|
||||
//@ check-pass
|
||||
|
||||
mod outer {
|
||||
mod inner {
|
||||
use super::*; // should go before the ambiguous glob imports
|
||||
}
|
||||
|
||||
use crate::*;
|
||||
pub use crate::*;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Reference in New Issue
Block a user