diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:18:36 +0300 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2015-05-27 11:19:03 +0300 |
| commit | 377b0900aede976b2d37a499bbd7b62c2e39b358 (patch) | |
| tree | b4a5a4431d36ed1a4e0a39c7d2ef2563ecac9bf4 /src/libstd/rt/args.rs | |
| parent | 6e8e4f847c2ea02fec021ea15dfb2de6beac797a (diff) | |
| download | rust-377b0900aede976b2d37a499bbd7b62c2e39b358.tar.gz rust-377b0900aede976b2d37a499bbd7b62c2e39b358.zip | |
Use `const fn` to abstract away the contents of UnsafeCell & friends.
Diffstat (limited to 'src/libstd/rt/args.rs')
| -rw-r--r-- | src/libstd/rt/args.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index 2329861f29b..d23a124a6ec 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -52,10 +52,10 @@ mod imp { use mem; use ffi::CStr; - use sync::{StaticMutex, MUTEX_INIT}; + use sync::StaticMutex; static mut GLOBAL_ARGS_PTR: usize = 0; - static LOCK: StaticMutex = MUTEX_INIT; + static LOCK: StaticMutex = StaticMutex::new(); pub unsafe fn init(argc: isize, argv: *const *const u8) { let args = load_argc_and_argv(argc, argv); |
