mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-03 11:29:34 +00:00
This removes the #[no_sanitize] attribute, which was behind an unstable feature named no_sanitize. Instead, we introduce the sanitize attribute which is more powerful and allows to be extended in the future (instead of just focusing on turning sanitizers off). This also makes sanitize(kernel_address = ..) attribute work with -Zsanitize=address To do it the same as how clang disables address sanitizer, we now disable ASAN on sanitize(kernel_address = "off") and KASAN on sanitize(address = "off"). The same was added to clang in https://reviews.llvm.org/D44981.
24 lines
951 B
Plaintext
24 lines
951 B
Plaintext
error[E0557]: feature has been removed
|
|
--> $DIR/feature-gate-sanitize.rs:2:12
|
|
|
|
|
LL | #![feature(no_sanitize)]
|
|
| ^^^^^^^^^^^ feature has been removed
|
|
|
|
|
= note: removed in CURRENT_RUSTC_VERSION; see <https://github.com/rust-lang/rust/pull/142681> for more information
|
|
= note: renamed to sanitize(xyz = "on|off")
|
|
|
|
error[E0658]: the `#[sanitize]` attribute is an experimental feature
|
|
--> $DIR/feature-gate-sanitize.rs:4:1
|
|
|
|
|
LL | #[sanitize(address = "on")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #39699 <https://github.com/rust-lang/rust/issues/39699> for more information
|
|
= help: add `#![feature(sanitize)]` to the crate attributes to enable
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0557, E0658.
|
|
For more information about an error, try `rustc --explain E0557`.
|