diff options
| author | bors <bors@rust-lang.org> | 2016-10-17 04:32:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-17 04:32:15 -0700 |
| commit | 07b86d0d4d41976f52aa318960e605534ee42d4f (patch) | |
| tree | 411b4c9dade7d519fa31f35aab7180a69725f8d5 /src/libstd/sync | |
| parent | da7f8c540b47c5bb063356bf5ad05a6a49ed0ff1 (diff) | |
| parent | 066d62d4b4d508f7a46d773c9100dc6516ac34f6 (diff) | |
| download | rust-07b86d0d4d41976f52aa318960e605534ee42d4f.tar.gz rust-07b86d0d4d41976f52aa318960e605534ee42d4f.zip | |
Auto merge of #37162 - matklad:static-mut-lint, r=jseyfried
Lint against lowercase static mut Closes #37145. Lint for non mut statics was added in https://github.com/rust-lang/rust/pull/7523, and it explicitly did not cover mut statics. I am not sure why.
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/once.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index ad9d0b37544..71e163321ae 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -387,7 +387,7 @@ mod tests { #[test] fn stampede_once() { static O: Once = Once::new(); - static mut run: bool = false; + static mut RUN: bool = false; let (tx, rx) = channel(); for _ in 0..10 { @@ -396,10 +396,10 @@ mod tests { for _ in 0..4 { thread::yield_now() } unsafe { O.call_once(|| { - assert!(!run); - run = true; + assert!(!RUN); + RUN = true; }); - assert!(run); + assert!(RUN); } tx.send(()).unwrap(); }); @@ -407,10 +407,10 @@ mod tests { unsafe { O.call_once(|| { - assert!(!run); - run = true; + assert!(!RUN); + RUN = true; }); - assert!(run); + assert!(RUN); } for _ in 0..10 { |
