Skip to content

Commit 38a9040

Browse files
committed
revert some more constification.
1 parent e15c62d commit 38a9040

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

src/liballoc/collections/linked_list.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl<T> LinkedList<T> {
264264
/// ```
265265
#[inline]
266266
#[stable(feature = "rust1", since = "1.0.0")]
267-
pub const fn new() -> Self {
267+
pub fn new() -> Self {
268268
LinkedList {
269269
head: None,
270270
tail: None,
@@ -341,7 +341,7 @@ impl<T> LinkedList<T> {
341341
/// ```
342342
#[inline]
343343
#[stable(feature = "rust1", since = "1.0.0")]
344-
pub const fn iter(&self) -> Iter<T> {
344+
pub fn iter(&self) -> Iter<T> {
345345
Iter {
346346
head: self.head,
347347
tail: self.tail,
@@ -401,7 +401,7 @@ impl<T> LinkedList<T> {
401401
/// ```
402402
#[inline]
403403
#[stable(feature = "rust1", since = "1.0.0")]
404-
pub const fn is_empty(&self) -> bool {
404+
pub fn is_empty(&self) -> bool {
405405
self.len() == 0
406406
}
407407

@@ -427,7 +427,7 @@ impl<T> LinkedList<T> {
427427
/// ```
428428
#[inline]
429429
#[stable(feature = "rust1", since = "1.0.0")]
430-
pub const fn len(&self) -> usize {
430+
pub fn len(&self) -> usize {
431431
self.len
432432
}
433433

src/libcore/mem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub use intrinsics::transmute;
139139
/// [ub]: ../../reference/behavior-considered-undefined.html
140140
#[inline]
141141
#[stable(feature = "rust1", since = "1.0.0")]
142-
pub const fn forget<T>(t: T) {
142+
pub fn forget<T>(t: T) {
143143
ManuallyDrop::new(t);
144144
}
145145

src/libstd/io/cursor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl<T> Cursor<T> {
104104
/// # force_inference(&buff);
105105
/// ```
106106
#[stable(feature = "rust1", since = "1.0.0")]
107-
pub const fn new(inner: T) -> Cursor<T> {
107+
pub fn new(inner: T) -> Cursor<T> {
108108
Cursor { pos: 0, inner: inner }
109109
}
110110

@@ -138,7 +138,7 @@ impl<T> Cursor<T> {
138138
/// let reference = buff.get_ref();
139139
/// ```
140140
#[stable(feature = "rust1", since = "1.0.0")]
141-
pub const fn get_ref(&self) -> &T { &self.inner }
141+
pub fn get_ref(&self) -> &T { &self.inner }
142142

143143
/// Gets a mutable reference to the underlying value in this cursor.
144144
///
@@ -179,7 +179,7 @@ impl<T> Cursor<T> {
179179
/// assert_eq!(buff.position(), 1);
180180
/// ```
181181
#[stable(feature = "rust1", since = "1.0.0")]
182-
pub const fn position(&self) -> u64 { self.pos }
182+
pub fn position(&self) -> u64 { self.pos }
183183

184184
/// Sets the position of this cursor.
185185
///

src/libstd/io/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ impl Initializer {
885885
/// Returns a new `Initializer` which will zero out buffers.
886886
#[unstable(feature = "read_initializer", issue = "42788")]
887887
#[inline]
888-
pub const fn zeroing() -> Initializer {
888+
pub fn zeroing() -> Initializer {
889889
Initializer(true)
890890
}
891891

@@ -906,7 +906,7 @@ impl Initializer {
906906
/// Indicates if a buffer should be initialized.
907907
#[unstable(feature = "read_initializer", issue = "42788")]
908908
#[inline]
909-
pub const fn should_initialize(&self) -> bool {
909+
pub fn should_initialize(&self) -> bool {
910910
self.0
911911
}
912912

src/libstd/io/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub struct Empty { _priv: () }
9999
/// assert!(buffer.is_empty());
100100
/// ```
101101
#[stable(feature = "rust1", since = "1.0.0")]
102-
pub const fn empty() -> Empty { Empty { _priv: () } }
102+
pub fn empty() -> Empty { Empty { _priv: () } }
103103

104104
#[stable(feature = "rust1", since = "1.0.0")]
105105
impl Read for Empty {
@@ -199,7 +199,7 @@ pub struct Sink { _priv: () }
199199
/// assert_eq!(num_bytes, 5);
200200
/// ```
201201
#[stable(feature = "rust1", since = "1.0.0")]
202-
pub const fn sink() -> Sink { Sink { _priv: () } }
202+
pub fn sink() -> Sink { Sink { _priv: () } }
203203

204204
#[stable(feature = "rust1", since = "1.0.0")]
205205
impl Write for Sink {

src/libstd/process.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ impl Stdio {
926926
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH\n");
927927
/// ```
928928
#[stable(feature = "process", since = "1.0.0")]
929-
pub const fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
929+
pub fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
930930

931931
/// The child inherits from the corresponding parent descriptor.
932932
///
@@ -961,7 +961,7 @@ impl Stdio {
961961
/// println!("You piped in the reverse of: {}", String::from_utf8_lossy(&output.stdout));
962962
/// ```
963963
#[stable(feature = "process", since = "1.0.0")]
964-
pub const fn inherit() -> Stdio { Stdio(imp::Stdio::Inherit) }
964+
pub fn inherit() -> Stdio { Stdio(imp::Stdio::Inherit) }
965965

966966
/// This stream will be ignored. This is the equivalent of attaching the
967967
/// stream to `/dev/null`
@@ -998,7 +998,7 @@ impl Stdio {
998998
/// // Ignores any piped-in input
999999
/// ```
10001000
#[stable(feature = "process", since = "1.0.0")]
1001-
pub const fn null() -> Stdio { Stdio(imp::Stdio::Null) }
1001+
pub fn null() -> Stdio { Stdio(imp::Stdio::Null) }
10021002
}
10031003

10041004
impl FromInner<imp::Stdio> for Stdio {

src/libstd/thread/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ impl Builder {
286286
/// handler.join().unwrap();
287287
/// ```
288288
#[stable(feature = "rust1", since = "1.0.0")]
289-
pub const fn new() -> Builder {
289+
pub fn new() -> Builder {
290290
Builder {
291291
name: None,
292292
stack_size: None,

0 commit comments

Comments
 (0)