Skip to content

Commit c973e30

Browse files
committed
Really ignore lang items
1 parent 9d0364c commit c973e30

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/librustc/ty/instance.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,8 @@ impl<'a, 'b, 'tcx> Instance<'tcx> {
259259
}
260260
match self.ty(tcx).sty {
261261
ty::TyFnDef(def_id, _) => {
262-
let attrs = tcx.item_attrs(def_id);
263-
if attrs.iter().find(|attr| {
264-
attr.name().map(|n|n.as_str() == "lang").unwrap_or(false)
265-
}).is_some() {
262+
//let attrs = tcx.item_attrs(def_id);
263+
if tcx.lang_items().items().iter().find(|l|**l == Some(def_id)).is_some() {
266264
return self; // Lang items dont work otherwise
267265
}
268266
}

0 commit comments

Comments
 (0)