Skip to content

Instantly share code, notes, and snippets.

@xobs
Created December 6, 2022 14:56
Show Gist options
  • Save xobs/ed0742364eaaa299ea6a2819322bb9f4 to your computer and use it in GitHub Desktop.
Save xobs/ed0742364eaaa299ea6a2819322bb9f4 to your computer and use it in GitHub Desktop.
Get things building for rust-1.65.0
diff --git a/library/std/src/sync/condvar.rs b/library/std/src/sync/condvar.rs
index eb1e7135a6e..ba270d2aee5 100644
--- a/library/std/src/sync/condvar.rs
+++ b/library/std/src/sync/condvar.rs
@@ -122,10 +122,10 @@ impl Condvar {
/// let condvar = Condvar::new();
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
- #[rustc_const_stable(feature = "const_locks", since = "1.63.0")]
+ // #[rustc_const_stable(feature = "const_locks", since = "1.63.0")]
#[must_use]
#[inline]
- pub const fn new() -> Condvar {
+ pub fn new() -> Condvar {
Condvar { inner: sys::Condvar::new() }
}
diff --git a/library/std/src/sync/mutex.rs b/library/std/src/sync/mutex.rs
index de851c8fbbe..3340127d2b0 100644
--- a/library/std/src/sync/mutex.rs
+++ b/library/std/src/sync/mutex.rs
@@ -214,9 +214,8 @@ impl<T> Mutex<T> {
/// let mutex = Mutex::new(0);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
- #[rustc_const_stable(feature = "const_locks", since = "1.63.0")]
#[inline]
- pub const fn new(t: T) -> Mutex<T> {
+ pub fn new(t: T) -> Mutex<T> {
Mutex {
inner: sys::MovableMutex::new(),
poison: poison::Flag::new(),
diff --git a/library/std/src/sync/rwlock.rs b/library/std/src/sync/rwlock.rs
index 9ab781561e9..a4e8961ed7e 100644
--- a/library/std/src/sync/rwlock.rs
+++ b/library/std/src/sync/rwlock.rs
@@ -154,9 +154,8 @@ impl<T> RwLock<T> {
/// let lock = RwLock::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
- #[rustc_const_stable(feature = "const_locks", since = "1.63.0")]
#[inline]
- pub const fn new(t: T) -> RwLock<T> {
+ pub fn new(t: T) -> RwLock<T> {
RwLock {
inner: sys::MovableRwLock::new(),
poison: poison::Flag::new(),
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs
index 3b7193adcc7..83d50843e34 100644
--- a/library/test/src/lib.rs
+++ b/library/test/src/lib.rs
@@ -15,6 +15,7 @@
#![unstable(feature = "test", issue = "50297")]
#![doc(test(attr(deny(warnings))))]
+#![cfg_attr(target_os = "plan9", feature(restricted_std))]
#![feature(bench_black_box)]
#![feature(internal_output_capture)]
#![feature(staged_api)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment