Skip to content

Commit

Permalink
Stop using the unstable optin_builtin_traits feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Jun 28, 2017
1 parent a40e535 commit f511a77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
13 changes: 6 additions & 7 deletions components/script/dom/bindings/str.rs
Expand Up @@ -11,6 +11,7 @@ use std::ascii::AsciiExt;
use std::borrow::{Borrow, Cow, ToOwned};
use std::fmt;
use std::hash::{Hash, Hasher};
use std::marker::PhantomData;
use std::ops;
use std::ops::{Deref, DerefMut};
use std::str;
Expand Down Expand Up @@ -152,19 +153,17 @@ pub fn is_token(s: &[u8]) -> bool {
/// This type is currently `!Send`, in order to help with an independent
/// experiment to store `JSString`s rather than Rust `String`s.
#[derive(Clone, Debug, Eq, Hash, HeapSizeOf, Ord, PartialEq, PartialOrd)]
pub struct DOMString(String);

impl !Send for DOMString {}
pub struct DOMString(String, PhantomData<*const ()>);

impl DOMString {
/// Creates a new `DOMString`.
pub fn new() -> DOMString {
DOMString(String::new())
DOMString(String::new(), PhantomData)
}

/// Creates a new `DOMString` from a `String`.
pub fn from_string(s: String) -> DOMString {
DOMString(s)
DOMString(s, PhantomData)
}

/// Appends a given string slice onto the end of this String.
Expand Down Expand Up @@ -197,7 +196,7 @@ impl Borrow<str> for DOMString {

impl Default for DOMString {
fn default() -> Self {
DOMString(String::new())
DOMString(String::new(), PhantomData)
}
}

Expand Down Expand Up @@ -244,7 +243,7 @@ impl<'a> PartialEq<&'a str> for DOMString {

impl From<String> for DOMString {
fn from(contents: String) -> DOMString {
DOMString(contents)
DOMString(contents, PhantomData)
}
}

Expand Down
1 change: 0 additions & 1 deletion components/script/lib.rs
Expand Up @@ -9,7 +9,6 @@
#![feature(mpsc_select)]
#![feature(nonzero)]
#![feature(on_unimplemented)]
#![feature(optin_builtin_traits)]
#![feature(option_entry)]
#![feature(plugin)]
#![feature(proc_macro)]
Expand Down

0 comments on commit f511a77

Please sign in to comment.