Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
revert some more constification.
  • Loading branch information
Centril committed Nov 10, 2018
1 parent e15c62d commit 38a9040
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/liballoc/collections/linked_list.rs
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/mem.rs
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions src/libstd/io/cursor.rs
Expand Up @@ -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 }
}

Expand Down Expand Up @@ -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.
///
Expand Down Expand Up @@ -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.
///
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/io/mod.rs
Expand Up @@ -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)
}

Expand All @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/libstd/io/util.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/process.rs
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/thread/mod.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 38a9040

Please sign in to comment.