aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/check-blobs.sh
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-11-04 01:08:52 +0100
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-11-04 01:08:52 +0100
commitb6facc16d893c2e886401cb0743bb29700388293 (patch)
tree177290bf54b326717157b43568006a42b16387d7 /cortex-m-rt/check-blobs.sh
parent2f890d87b1945f1f901355b94375d2531fa71f7c (diff)
downloadcortex-m-b6facc16d893c2e886401cb0743bb29700388293.tar.gz
cortex-m-b6facc16d893c2e886401cb0743bb29700388293.tar.zst
cortex-m-b6facc16d893c2e886401cb0743bb29700388293.zip
reject duplicate `static mut` variables
after #140 landed the entry, exception and interrupt attributes started accepting code like this: ``` rust #[entry] fn main() -> ! { static mut FOO: u32 = 0; static mut FOO: i32 = 0; } ``` because that code expands into: ``` rust fn main() -> ! { let FOO: &'static mut u32 = unsafe { static mut FOO: u32 = 0; &mut FOO }; // shadows previous variable let FOO: &'static mut u32 = unsafe { static mut FOO: i32 = 0; &mut FOO }; } ``` this commit adds a check that rejects `static mut`s with duplicated names to these three attributes.
Diffstat (limited to 'cortex-m-rt/check-blobs.sh')
0 files changed, 0 insertions, 0 deletions