Use const fn to abstract away the contents of UnsafeCell & friends.
This commit is contained in:
parent
6e8e4f847c
commit
377b0900ae
76 changed files with 417 additions and 525 deletions
|
|
@ -32,7 +32,7 @@ use std::env;
|
|||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use syntax::ast;
|
||||
|
||||
fn print_help_message() {
|
||||
|
|
@ -76,7 +76,7 @@ pub fn maybe_print_constraints_for<'a, 'tcx>(region_vars: &RegionVarBindings<'a,
|
|||
let output_path = {
|
||||
let output_template = match requested_output {
|
||||
Ok(ref s) if &**s == "help" => {
|
||||
static PRINTED_YET: AtomicBool = ATOMIC_BOOL_INIT;
|
||||
static PRINTED_YET: AtomicBool = AtomicBool::new(false);
|
||||
if !PRINTED_YET.load(Ordering::SeqCst) {
|
||||
print_help_message();
|
||||
PRINTED_YET.store(true, Ordering::SeqCst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue