I tried this code:
|
#[unstable(feature = "raw_ref_macros", issue = "73394")] |
|
#[rustc_macro_transparency = "semitransparent"] |
|
#[allow_internal_unstable(raw_ref_op)] |
|
pub macro raw_const($e:expr) { |
|
&raw const $e |
|
} |
I expected to see this happen: tcx.hir().parent_module(raw_const_hir_id) and tcx.parent(raw_const_def_id).unwrap() are both the module core::ptr.
Instead, this happened: tcx.hir().parent_module(raw_const_hir_id) is core and tcx.parent(raw_const_def_id).unwrap() is core::ptr. I think core::ptr is correct.
Meta
rustc --version: HEAD (8cc82ee)
I tried this code:
rust/library/core/src/ptr/mod.rs
Lines 1487 to 1492 in 8cc82ee
I expected to see this happen:
tcx.hir().parent_module(raw_const_hir_id)andtcx.parent(raw_const_def_id).unwrap()are both the modulecore::ptr.Instead, this happened:
tcx.hir().parent_module(raw_const_hir_id)iscoreandtcx.parent(raw_const_def_id).unwrap()iscore::ptr. I thinkcore::ptris correct.Meta
rustc --version: HEAD (8cc82ee)