forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#112847 - bvanjoi:fix-112831, r=Nilstrieb
Revert rust-lang#112758 and add test case Fixes rust-lang#112831. Cannot unwrap `update_resolution` for `resolution.single_imports.remove(&Interned::new_unchecked(import));` because there is a relationship between the `Import` and `&NameBinding` in `NameResolution`. This issue caused by my unfamiliarity with the data structure and I apologize for it. This PR had been reverted, and test case have been added. r? `@Nilstrieb` cc `@petrochenkov`
- Loading branch information
Showing
3 changed files
with
86 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// force-host | ||
// no-prefer-dynamic | ||
|
||
#![crate_type = "proc-macro"] | ||
|
||
extern crate proc_macro; | ||
|
||
struct Zeroable; | ||
|
||
#[proc_macro_derive(Zeroable)] | ||
pub fn derive_zeroable(_: proc_macro::TokenStream) -> proc_macro::TokenStream { | ||
proc_macro::TokenStream::default() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// check-pass | ||
// aux-build:issue-112831-aux.rs | ||
|
||
mod zeroable { | ||
pub trait Zeroable {} | ||
} | ||
|
||
use zeroable::*; | ||
|
||
mod pod { | ||
use super::*; | ||
pub trait Pod: Zeroable {} | ||
} | ||
|
||
use pod::*; | ||
|
||
extern crate issue_112831_aux; | ||
use issue_112831_aux::Zeroable; | ||
|
||
fn main() {} |