File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
- #![ feature( is_sorted) ]
2
1
#![ feature( exact_size_is_empty) ]
3
2
#![ feature( iter_advance_by) ]
4
3
#![ feature( variant_count) ]
Original file line number Diff line number Diff line change @@ -718,16 +718,17 @@ impl Program {
718
718
pub const FUNCTION_ATTRIBUTE : & ' static str =
719
719
"#[custom_mir(dialect = \" runtime\" , phase = \" initial\" )]" ;
720
720
pub const HEADER : & ' static str = "#![recursion_limit = \" 1024\" ]
721
- #![feature(custom_mir, core_intrinsics, const_hash )]
721
+ #![feature(custom_mir, core_intrinsics, lazy_get )]
722
722
#![allow(unused_parens, unused_assignments, overflowing_literals)]
723
723
extern crate core;
724
724
use core::intrinsics::mir::*;\n " ;
725
725
726
726
pub const DUMPER : & ' static str = r#"
727
727
use std::collections::hash_map::DefaultHasher;
728
728
use std::hash::{Hash, Hasher};
729
+ use std::sync::LazyLock;
729
730
730
- static mut H: DefaultHasher = DefaultHasher::new();
731
+ static mut H: LazyLock< DefaultHasher> = LazyLock::new(|| DefaultHasher::new() );
731
732
732
733
#[inline(never)]
733
734
fn dump_var(
@@ -737,10 +738,10 @@ impl Program {
737
738
val3: impl Hash,
738
739
) {
739
740
unsafe {
740
- val0.hash(&mut H);
741
- val1.hash(&mut H);
742
- val2.hash(&mut H);
743
- val3.hash(&mut H);
741
+ val0.hash(LazyLock::force_mut( &mut H) );
742
+ val1.hash(LazyLock::force_mut( &mut H) );
743
+ val2.hash(LazyLock::force_mut( &mut H) );
744
+ val3.hash(LazyLock::force_mut( &mut H) );
744
745
}
745
746
}
746
747
"# ;
You can’t perform that action at this time.
0 commit comments