diff --git a/completion/tests/suggest.rs b/completion/tests/suggest.rs index 8ce6a3637c..3662c4b111 100644 --- a/completion/tests/suggest.rs +++ b/completion/tests/suggest.rs @@ -394,7 +394,6 @@ let { ab } = { x = 1, abc = "", abcd = 2 } fn find_gluon_root() -> PathBuf { use std::env; - use std::fs; let mut dir = env::current_dir().unwrap(); while fs::metadata(dir.join("std")).is_err() { dir = dir.parent().unwrap().into(); diff --git a/vm/src/gc.rs b/vm/src/gc.rs index 1045adeef6..45322d1a77 100644 --- a/vm/src/gc.rs +++ b/vm/src/gc.rs @@ -942,12 +942,12 @@ mod tests { impl PartialEq for Data_ { fn eq(&self, other: &Data_) -> bool { - self.fields.ptr == other.fields.ptr + self.fields.0 == other.fields.0 } } impl fmt::Debug for Data_ { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.fields.ptr.fmt(f) + self.fields.0.fmt(f) } } diff --git a/vm/src/value.rs b/vm/src/value.rs index 4a28f05c47..9c845a6b23 100644 --- a/vm/src/value.rs +++ b/vm/src/value.rs @@ -350,6 +350,11 @@ mod gc_str { #[derive(Copy, Clone, PartialEq)] pub struct GcStr(GcPtr); + // Needed due to https://github.com/rust-lang/rust/pull/60444, unsure if that is due to a bug + // or not + unsafe impl Send for GcStr {} + unsafe impl Sync for GcStr {} + impl fmt::Debug for GcStr { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_tuple("GcStr").field(&&**self).finish()