Skip to content

Commit 1183d60

Browse files
committed
Remove def_id!.
1 parent 8f707c3 commit 1183d60

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/librustc/ty/query/plumbing.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,17 +1191,6 @@ pub fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
11911191
return false
11921192
}
11931193

1194-
macro_rules! def_id {
1195-
() => {
1196-
if let Some(def_id) = dep_node.extract_def_id(tcx) {
1197-
def_id
1198-
} else {
1199-
// Return from the whole function.
1200-
return false
1201-
}
1202-
}
1203-
};
1204-
12051194
macro_rules! force_ex {
12061195
($tcx:expr, $query:ident, $key:expr) => {
12071196
{
@@ -1232,7 +1221,15 @@ pub fn force_from_dep_node(tcx: TyCtxt<'_>, dep_node: &DepNode) -> bool {
12321221
bug!("force_from_dep_node: encountered {:?}", dep_node)
12331222
}
12341223

1235-
DepKind::Analysis => { force_ex!(tcx, analysis, def_id!().krate); }
1224+
DepKind::Analysis => {
1225+
let def_id = if let Some(def_id) = dep_node.extract_def_id(tcx) {
1226+
def_id
1227+
} else {
1228+
// Return from the whole function.
1229+
return false
1230+
};
1231+
force_ex!(tcx, analysis, def_id.krate);
1232+
}
12361233
);
12371234

12381235
true

0 commit comments

Comments
 (0)