Skip to content

Commit 670c03e

Browse files
committed
Hack: Do not diagnose no_sanitize(address) on globals
1 parent 7cc0aba commit 670c03e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_passes/src/check_attr.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
126126
[sym::coverage, ..] => self.check_coverage(attr, span, target),
127127
[sym::optimize, ..] => self.check_optimize(hir_id, attr, target),
128128
[sym::no_sanitize, ..] => {
129-
self.check_applied_to_fn_or_method(hir_id, attr, span, target)
129+
// FIXME: We need to accept `no_sanitize(address)`/`no_sanitize(hw_address)` on
130+
// static/const variables.
131+
132+
// self.check_applied_to_fn_or_method(hir_id, attr, span, target)
130133
}
131134
[sym::non_exhaustive, ..] => self.check_non_exhaustive(hir_id, attr, span, target),
132135
[sym::marker, ..] => self.check_marker(hir_id, attr, span, target),

0 commit comments

Comments
 (0)