aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/tests/compile-fail/exception-args.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-10-26 20:39:39 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-10-26 20:39:39 +0200
commit58cdad2fba9763ac590bb0460ecd7193014a1e12 (patch)
tree7fbb869c1dc8898c8d985b1e00fb0506e9b99f1a /cortex-m-rt/tests/compile-fail/exception-args.rs
parentac9c05361cfbe46ace2162a3985e4660610747aa (diff)
downloadcortex-m-58cdad2fba9763ac590bb0460ecd7193014a1e12.tar.gz
cortex-m-58cdad2fba9763ac590bb0460ecd7193014a1e12.tar.zst
cortex-m-58cdad2fba9763ac590bb0460ecd7193014a1e12.zip
entry/exception/interrupt: reduce namespace pollution when using static mut
this changes code generation of code like this: ``` rust #[entry] fn main() -> ! { static mut FOO: u32 = 0; // .. } ``` from this: ``` rust fn main() -> ! { static mut FOO_: u32 = 0; let FOO: &'static mut u32 = unsafe { &mut FOO_ }; // .. } ``` to this: ``` rust fn main() -> ! { let FOO: &'static mut u32 = unsafe { static mut FOO: u32 = 0; &mut FOO; }; // .. } ``` this completely hides the `static mut` variable. Before it was possible to (unsafely) access it via `${ident}_` (e.g. `FOO_`).
Diffstat (limited to 'cortex-m-rt/tests/compile-fail/exception-args.rs')
0 files changed, 0 insertions, 0 deletions