Skip to content

Commit

Permalink
Hack: Do not diagnose no_sanitize(address) on globals
Browse files Browse the repository at this point in the history
  • Loading branch information
BertalanD committed Sep 17, 2024
1 parent 7cc0aba commit 9447dc7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
[sym::coverage, ..] => self.check_coverage(attr, span, target),
[sym::optimize, ..] => self.check_optimize(hir_id, attr, target),
[sym::no_sanitize, ..] => {
self.check_applied_to_fn_or_method(hir_id, attr, span, target)
// FIXME: We need to accept `no_sanitize(address)`/`no_sanitize(hwaddress)` on
// static/const variables.

// self.check_applied_to_fn_or_method(hir_id, attr, span, target)
}
[sym::non_exhaustive, ..] => self.check_non_exhaustive(hir_id, attr, span, target),
[sym::marker, ..] => self.check_marker(hir_id, attr, span, target),
Expand Down

0 comments on commit 9447dc7

Please sign in to comment.