We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e8a792d + 3ffca9e commit 6fcc151Copy full SHA for 6fcc151
compiler/rustc_codegen_ssa/src/codegen_attrs.rs
@@ -630,6 +630,11 @@ fn parse_sanitize_attr(
630
}
631
632
fn disabled_sanitizers_for(tcx: TyCtxt<'_>, did: LocalDefId) -> SanitizerSet {
633
+ // No need to evaluate the sanitizer attribute if no sanitizer is enabled.
634
+ if tcx.sess.opts.unstable_opts.sanitizer.is_empty() {
635
+ return SanitizerSet::empty();
636
+ }
637
+
638
// Backtrack to the crate root.
639
let disabled = match tcx.opt_local_parent(did) {
640
// Check the parent (recursively).
0 commit comments