Closed
Description
Code
#![feature(no_sanitize)]
#![feature(optimize_attribute)]
#[no_sanitize(address)]
#[inline(always)]
#[optimize(speed)]
pub fn hello() {
}
Current output
Compiling playground v0.0.1 (/playground)
warning: `no_sanitize` will have no effect after inlining
--> src/lib.rs:4:1
|
4 | #[no_sanitize(address)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
note: inlining requested here
--> src/lib.rs:6:1
|
6 | #[optimize(speed)]
| ^^^^^^^^^^^^^^^^^^
= note: `#[warn(inline_no_sanitize)]` on by default
warning: `playground` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.38s
Desired output
Compiling playground v0.0.1 (/playground)
warning: `no_sanitize` will have no effect after inlining
--> src/lib.rs:4:1
|
4 | #[no_sanitize(address)]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
note: inlining requested here
--> src/lib.rs:6:1
|
5 | #[inline(always)]
| ^^^^^^^^^^^^^^^^^^
= note: `#[warn(inline_no_sanitize)]` on by default
warning: `playground` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.38s
Rationale and extra context
This is simply a bug. I wasn't even sure if I wanted to report it since I'm working on the code anyway and will simply remove it at some point with a test. No need to do anything, but I wanted something to point to when I fix it.
@rustbot claim
@rustbot label +A-attributes -needs-triage
Other cases
Rust Version
nightly (dw, I'll fix it myself)
Anything else?
No response