diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-10-25 19:37:52 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2018-11-10 01:11:06 +0100 |
| commit | 38a90406d3b0a8aec72cb62f794ceddb026c86b6 (patch) | |
| tree | d9158f7b32e4ac2b4543601c19e82a6960dd9bcc /src/libstd | |
| parent | e15c62d61fa02fac93992db9297aa4a8a56cef93 (diff) | |
| download | rust-38a90406d3b0a8aec72cb62f794ceddb026c86b6.tar.gz rust-38a90406d3b0a8aec72cb62f794ceddb026c86b6.zip | |
revert some more constification.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/cursor.rs | 6 | ||||
| -rw-r--r-- | src/libstd/io/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/io/util.rs | 4 | ||||
| -rw-r--r-- | src/libstd/process.rs | 6 | ||||
| -rw-r--r-- | src/libstd/thread/mod.rs | 2 |
5 files changed, 11 insertions, 11 deletions
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, |
