mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Revert "Rollup merge of #149147 - chenyukang:yukang-fix-unused_assignments-macro-gen-147648, r=JonathanBrouwer"
This reverts commit82a17b30d8, reversing changes made to5019bdaefe. (cherry picked from commit74387157c7)
This commit is contained in:
committed by
Josh Stone
parent
72b6488ba4
commit
9f8bfd6b4a
@@ -75,11 +75,6 @@ pub(crate) fn check_liveness<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> Den
|
||||
return DenseBitSet::new_empty(0);
|
||||
}
|
||||
|
||||
// Don't run unused pass for items generated by foreign macros
|
||||
if tcx.def_span(parent).in_external_macro(tcx.sess.source_map()) {
|
||||
return DenseBitSet::new_empty(0);
|
||||
}
|
||||
|
||||
let mut body = &*tcx.mir_promoted(def_id).0.borrow();
|
||||
let mut body_mem;
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#[macro_export]
|
||||
macro_rules! unused_assign {
|
||||
($x:ident) => {
|
||||
let mut $x = 1;
|
||||
$x = 2;
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
//@ check-pass
|
||||
//@ aux-build:aux_issue_147648.rs
|
||||
|
||||
#![deny(unused_assignments)]
|
||||
|
||||
extern crate aux_issue_147648;
|
||||
|
||||
fn main() {
|
||||
aux_issue_147648::unused_assign!(y);
|
||||
}
|
||||
Reference in New Issue
Block a user