Skip to content

Commit fc8a3ad

Browse files
committed
Update for moved function from rust-lang#74932
1 parent 7636de3 commit fc8a3ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_lint/src/builtin.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,14 @@ impl EarlyLintPass for UnsafeCode {
290290
}
291291

292292
ast::ItemKind::Fn(..) => {
293-
if let Some(attr) = attr::find_by_name(&it.attrs, sym::no_mangle) {
293+
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::no_mangle) {
294294
self.report_overriden_symbol_name(
295295
cx,
296296
attr.span,
297297
"declaration of a `no_mangle` function",
298298
);
299299
}
300-
if let Some(attr) = attr::find_by_name(&it.attrs, sym::export_name) {
300+
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::export_name) {
301301
self.report_overriden_symbol_name(
302302
cx,
303303
attr.span,
@@ -307,14 +307,14 @@ impl EarlyLintPass for UnsafeCode {
307307
}
308308

309309
ast::ItemKind::Static(..) => {
310-
if let Some(attr) = attr::find_by_name(&it.attrs, sym::no_mangle) {
310+
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::no_mangle) {
311311
self.report_overriden_symbol_name(
312312
cx,
313313
attr.span,
314314
"declaration of a `no_mangle` static",
315315
);
316316
}
317-
if let Some(attr) = attr::find_by_name(&it.attrs, sym::export_name) {
317+
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::export_name) {
318318
self.report_overriden_symbol_name(
319319
cx,
320320
attr.span,

0 commit comments

Comments
 (0)