about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2018-10-25 19:37:52 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2018-11-10 01:11:06 +0100
commit38a90406d3b0a8aec72cb62f794ceddb026c86b6 (patch)
treed9158f7b32e4ac2b4543601c19e82a6960dd9bcc
parente15c62d61fa02fac93992db9297aa4a8a56cef93 (diff)
revert some more constification.
-rw-r--r--src/liballoc/collections/linked_list.rs8
-rw-r--r--src/libcore/mem.rs2
-rw-r--r--src/libstd/io/cursor.rs6
-rw-r--r--src/libstd/io/mod.rs4
-rw-r--r--src/libstd/io/util.rs4
-rw-r--r--src/libstd/process.rs6
-rw-r--r--src/libstd/thread/mod.rs2
7 files changed, 16 insertions, 16 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs
index 3d66b9f54da..4b1cbb0d908 100644
--- a/src/liballoc/collections/linked_list.rs
+++ b/src/liballoc/collections/linked_list.rs
@@ -264,7 +264,7 @@ impl<T> LinkedList<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn new() -> Self {
+    pub fn new() -> Self {
         LinkedList {
             head: None,
             tail: None,
@@ -341,7 +341,7 @@ impl<T> LinkedList<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn iter(&self) -> Iter<T> {
+    pub fn iter(&self) -> Iter<T> {
         Iter {
             head: self.head,
             tail: self.tail,
@@ -401,7 +401,7 @@ impl<T> LinkedList<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn is_empty(&self) -> bool {
+    pub fn is_empty(&self) -> bool {
         self.len() == 0
     }
 
@@ -427,7 +427,7 @@ impl<T> LinkedList<T> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn len(&self) -> usize {
+    pub fn len(&self) -> usize {
         self.len
     }
 
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index 0aa374c7a64..b89f37fa5ce 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -139,7 +139,7 @@ pub use intrinsics::transmute;
 /// [ub]: ../../reference/behavior-considered-undefined.html
 #[inline]
 #[stable(feature = "rust1", since = "1.0.0")]
-pub const fn forget<T>(t: T) {
+pub fn forget<T>(t: T) {
     ManuallyDrop::new(t);
 }
 
diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs
index 05bee19c93f..14f20151dca 100644
--- a/src/libstd/io/cursor.rs
+++ b/src/libstd/io/cursor.rs
@@ -104,7 +104,7 @@ impl<T> Cursor<T> {
     /// # force_inference(&buff);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn new(inner: T) -> Cursor<T> {
+    pub fn new(inner: T) -> Cursor<T> {
         Cursor { pos: 0, inner: inner }
     }
 
@@ -138,7 +138,7 @@ impl<T> Cursor<T> {
     /// let reference = buff.get_ref();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn get_ref(&self) -> &T { &self.inner }
+    pub fn get_ref(&self) -> &T { &self.inner }
 
     /// Gets a mutable reference to the underlying value in this cursor.
     ///
@@ -179,7 +179,7 @@ impl<T> Cursor<T> {
     /// assert_eq!(buff.position(), 1);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn position(&self) -> u64 { self.pos }
+    pub fn position(&self) -> u64 { self.pos }
 
     /// Sets the position of this cursor.
     ///
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index c07d4a2e755..e263db24fc2 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -885,7 +885,7 @@ impl Initializer {
     /// Returns a new `Initializer` which will zero out buffers.
     #[unstable(feature = "read_initializer", issue = "42788")]
     #[inline]
-    pub const fn zeroing() -> Initializer {
+    pub fn zeroing() -> Initializer {
         Initializer(true)
     }
 
@@ -906,7 +906,7 @@ impl Initializer {
     /// Indicates if a buffer should be initialized.
     #[unstable(feature = "read_initializer", issue = "42788")]
     #[inline]
-    pub const fn should_initialize(&self) -> bool {
+    pub fn should_initialize(&self) -> bool {
         self.0
     }
 
diff --git a/src/libstd/io/util.rs b/src/libstd/io/util.rs
index d0db4cfc704..12995d08683 100644
--- a/src/libstd/io/util.rs
+++ b/src/libstd/io/util.rs
@@ -99,7 +99,7 @@ pub struct Empty { _priv: () }
 /// assert!(buffer.is_empty());
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
-pub const fn empty() -> Empty { Empty { _priv: () } }
+pub fn empty() -> Empty { Empty { _priv: () } }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Read for Empty {
@@ -199,7 +199,7 @@ pub struct Sink { _priv: () }
 /// assert_eq!(num_bytes, 5);
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
-pub const fn sink() -> Sink { Sink { _priv: () } }
+pub fn sink() -> Sink { Sink { _priv: () } }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Write for Sink {
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index d5047ef6ad7..a9219f75362 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -926,7 +926,7 @@ impl Stdio {
     /// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH\n");
     /// ```
     #[stable(feature = "process", since = "1.0.0")]
-    pub const fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
+    pub fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
 
     /// The child inherits from the corresponding parent descriptor.
     ///
@@ -961,7 +961,7 @@ impl Stdio {
     /// println!("You piped in the reverse of: {}", String::from_utf8_lossy(&output.stdout));
     /// ```
     #[stable(feature = "process", since = "1.0.0")]
-    pub const fn inherit() -> Stdio { Stdio(imp::Stdio::Inherit) }
+    pub fn inherit() -> Stdio { Stdio(imp::Stdio::Inherit) }
 
     /// This stream will be ignored. This is the equivalent of attaching the
     /// stream to `/dev/null`
@@ -998,7 +998,7 @@ impl Stdio {
     /// // Ignores any piped-in input
     /// ```
     #[stable(feature = "process", since = "1.0.0")]
-    pub const fn null() -> Stdio { Stdio(imp::Stdio::Null) }
+    pub fn null() -> Stdio { Stdio(imp::Stdio::Null) }
 }
 
 impl FromInner<imp::Stdio> for Stdio {
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index e9a97f7c747..a57b8dc7237 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -286,7 +286,7 @@ impl Builder {
     /// handler.join().unwrap();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn new() -> Builder {
+    pub fn new() -> Builder {
         Builder {
             name: None,
             stack_size: None,