I add the asan(address sanitizer) to help me debug my unsafe codes, I tell rustc to use asan by writing this in the Cargo.toml:
[profile.dev]
rustflags = ["-Zsanitizer=address"]
but it seems that cargo cached this and even if I deleted these two line, the code still compile with asan, and if I change my rust from nightly to stable (asan can only be used in nightly for now), rustc throw an error (I'm already deleted any use of asan in my Cargo.toml):
error: the option
Z is only accepted on the nightly compiler
It seems that cargo somehow cached the rustflags for me, is this by design or some bug?