]> git.lizzy.rs Git - rust.git/commitdiff
reduce list to functions callable in const ctx.
authorMazdak Farrokhzad <twingoow@gmail.com>
Tue, 23 Oct 2018 16:06:11 +0000 (18:06 +0200)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sat, 10 Nov 2018 00:10:07 +0000 (01:10 +0100)
26 files changed:
src/liballoc/collections/btree/map.rs
src/liballoc/collections/btree/set.rs
src/liballoc/collections/vec_deque.rs
src/liballoc/string.rs
src/liballoc/vec.rs
src/libcore/alloc.rs
src/libcore/char/decode.rs
src/libcore/fmt/mod.rs
src/libcore/panic.rs
src/libcore/pin.rs
src/libcore/slice/mod.rs
src/libcore/str/lossy.rs
src/libcore/str/mod.rs
src/libcore/task/wake.rs
src/libstd/collections/hash/map.rs
src/libstd/ffi/c_str.rs
src/libstd/io/buffered.rs
src/libstd/io/mod.rs
src/libstd/net/addr.rs
src/libstd/net/ip.rs
src/libstd/path.rs
src/libstd/sync/condvar.rs
src/libstd/sync/mpsc/mod.rs
src/libstd/sync/once.rs
src/libstd/thread/mod.rs
src/libstd/time.rs

index 8a721a50b4689cf5ac9456f731b1e252290693a6..24c8fd3a969ca3e1bde035f6531cf3c6456d7bb2 100644 (file)
@@ -2074,7 +2074,7 @@ pub fn values_mut(&mut self) -> ValuesMut<K, V> {
     /// assert_eq!(a.len(), 1);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn len(&self) -> usize {
+    pub fn len(&self) -> usize {
         self.length
     }
 
@@ -2093,7 +2093,7 @@ pub const fn len(&self) -> usize {
     /// assert!(!a.is_empty());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn is_empty(&self) -> bool {
+    pub fn is_empty(&self) -> bool {
         self.len() == 0
     }
 }
index 6a0ecfd3f58154052facef4694020287cc9f2feb..af9a7074e4a4f96d9916ae126ac8f936879cf2e2 100644 (file)
@@ -730,7 +730,7 @@ pub fn iter(&self) -> Iter<T> {
     /// assert_eq!(v.len(), 1);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn len(&self) -> usize {
+    pub fn len(&self) -> usize {
         self.map.len()
     }
 
@@ -747,7 +747,7 @@ pub const fn len(&self) -> usize {
     /// assert!(!v.is_empty());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn is_empty(&self) -> bool {
+    pub fn is_empty(&self) -> bool {
         self.len() == 0
     }
 }
index b139b440fe16004c59ab4d74df9a4d224514bec3..e0ae7561d45530d019c15bf42e54497e8588117c 100644 (file)
@@ -933,7 +933,7 @@ pub fn len(&self) -> usize {
     /// assert!(!v.is_empty());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn is_empty(&self) -> bool {
+    pub fn is_empty(&self) -> bool {
         self.tail == self.head
     }
 
index 8f379c4cfb4593051adffd01ee2751412c6bb004..5c776292f53d7a86a49f0c1dcedf80d4dd261097 100644 (file)
@@ -1374,7 +1374,7 @@ pub unsafe fn as_mut_vec(&mut self) -> &mut Vec<u8> {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn len(&self) -> usize {
+    pub fn len(&self) -> usize {
         self.vec.len()
     }
 
@@ -1395,7 +1395,7 @@ pub const fn len(&self) -> usize {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn is_empty(&self) -> bool {
+    pub fn is_empty(&self) -> bool {
         self.len() == 0
     }
 
@@ -1662,7 +1662,7 @@ pub fn into_bytes(self) -> Vec<u8> {
     /// assert_eq!(1, error.valid_up_to());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn utf8_error(&self) -> Utf8Error {
+    pub fn utf8_error(&self) -> Utf8Error {
         self.error
     }
 }
index 78e9da2084dbec60a9af3af38c1ed1e0b24e23ce..f7a0bbdceafc93325359fbb83a51b413548db0da 100644 (file)
@@ -1165,7 +1165,7 @@ pub fn clear(&mut self) {
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn len(&self) -> usize {
+    pub fn len(&self) -> usize {
         self.len
     }
 
@@ -1181,7 +1181,7 @@ pub const fn len(&self) -> usize {
     /// assert!(!v.is_empty());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn is_empty(&self) -> bool {
+    pub fn is_empty(&self) -> bool {
         self.len() == 0
     }
 
index 8b9f7f2c816515af463ff67c70edfabfe1ef3848..045fabca2688efaa0c2cdeff43112618316f4568 100644 (file)
@@ -116,7 +116,7 @@ pub unsafe fn from_size_align_unchecked(size: usize, align: usize) -> Self {
     /// The minimum size in bytes for a memory block of this layout.
     #[stable(feature = "alloc_layout", since = "1.28.0")]
     #[inline]
-    pub const fn size(&self) -> usize { self.size_ }
+    pub fn size(&self) -> usize { self.size_ }
 
     /// The minimum byte alignment for a memory block of this layout.
     #[stable(feature = "alloc_layout", since = "1.28.0")]
index bcd1e92c6d86ef28d7a12a3de4ad3407b2dd7fb0..cc52f048b891b578f258dd47bf2f4b03de2d5f93 100644 (file)
@@ -130,7 +130,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 impl DecodeUtf16Error {
     /// Returns the unpaired surrogate which caused this error.
     #[stable(feature = "decode_utf16", since = "1.9.0")]
-    pub const fn unpaired_surrogate(&self) -> u16 {
+    pub fn unpaired_surrogate(&self) -> u16 {
         self.code
     }
 }
index 56576f8334b85c9aac007cd72ac86a6c0fab5737..4fde4e79ee20d56b37c9ede63495b4cbd17c154a 100644 (file)
@@ -341,7 +341,7 @@ impl<'a> Arguments<'a> {
     #[doc(hidden)] #[inline]
     #[unstable(feature = "fmt_internals", reason = "internal to format_args!",
                issue = "0")]
-    pub const fn new_v1(pieces: &'a [&'a str],
+    pub fn new_v1(pieces: &'a [&'a str],
                   args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
         Arguments {
             pieces,
@@ -359,7 +359,7 @@ pub const fn new_v1(pieces: &'a [&'a str],
     #[doc(hidden)] #[inline]
     #[unstable(feature = "fmt_internals", reason = "internal to format_args!",
                issue = "0")]
-    pub const fn new_v1_formatted(pieces: &'a [&'a str],
+    pub fn new_v1_formatted(pieces: &'a [&'a str],
                             args: &'a [ArgumentV1<'a>],
                             fmt: &'a [rt::v1::Argument]) -> Arguments<'a> {
         Arguments {
@@ -1492,7 +1492,7 @@ pub fn flags(&self) -> u32 { self.flags }
     /// assert_eq!(&format!("{:t>6}", Foo), "tttttt");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn fill(&self) -> char { self.fill }
+    pub fn fill(&self) -> char { self.fill }
 
     /// Flag indicating what form of alignment was requested.
     ///
@@ -1562,7 +1562,7 @@ pub fn align(&self) -> Option<Alignment> {
     /// assert_eq!(&format!("{}", Foo(23)), "Foo(23)");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn width(&self) -> Option<usize> { self.width }
+    pub fn width(&self) -> Option<usize> { self.width }
 
     /// Optionally specified precision for numeric types.
     ///
@@ -1589,7 +1589,7 @@ pub const fn width(&self) -> Option<usize> { self.width }
     /// assert_eq!(&format!("{}", Foo(23.2)), "Foo(23.20)");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn precision(&self) -> Option<usize> { self.precision }
+    pub fn precision(&self) -> Option<usize> { self.precision }
 
     /// Determines if the `+` flag was specified.
     ///
@@ -1617,7 +1617,7 @@ pub const fn precision(&self) -> Option<usize> { self.precision }
     /// assert_eq!(&format!("{}", Foo(23)), "Foo(23)");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn sign_plus(&self) -> bool {
+    pub fn sign_plus(&self) -> bool {
         self.flags & (1 << FlagV1::SignPlus as u32) != 0
     }
 
@@ -1645,7 +1645,7 @@ pub const fn sign_plus(&self) -> bool {
     /// assert_eq!(&format!("{}", Foo(23)), "Foo(23)");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn sign_minus(&self) -> bool {
+    pub fn sign_minus(&self) -> bool {
         self.flags & (1 << FlagV1::SignMinus as u32) != 0
     }
 
@@ -1672,7 +1672,7 @@ pub const fn sign_minus(&self) -> bool {
     /// assert_eq!(&format!("{}", Foo(23)), "23");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn alternate(&self) -> bool {
+    pub fn alternate(&self) -> bool {
         self.flags & (1 << FlagV1::Alternate as u32) != 0
     }
 
@@ -1697,7 +1697,7 @@ pub const fn alternate(&self) -> bool {
     /// assert_eq!(&format!("{:04}", Foo(23)), "23");
     /// ```
     #[stable(feature = "fmt_flags", since = "1.5.0")]
-    pub const fn sign_aware_zero_pad(&self) -> bool {
+    pub fn sign_aware_zero_pad(&self) -> bool {
         self.flags & (1 << FlagV1::SignAwareZeroPad as u32) != 0
     }
 
index af9d1596938e095c0b335e77a18151cdf86941d9..f0efeb59e8d6e12225366c7ac19b1e6a6e6f28ab 100644 (file)
@@ -55,7 +55,7 @@ impl<'a> PanicInfo<'a> {
                 issue = "0")]
     #[doc(hidden)]
     #[inline]
-    pub const fn internal_constructor(message: Option<&'a fmt::Arguments<'a>>,
+    pub fn internal_constructor(message: Option<&'a fmt::Arguments<'a>>,
                                 location: Location<'a>)
                                 -> Self {
         struct NoPayload;
@@ -96,7 +96,7 @@ pub fn payload(&self) -> &(dyn Any + Send) {
     ///
     /// [`fmt::write`]: ../fmt/fn.write.html
     #[unstable(feature = "panic_info_message", issue = "44489")]
-    pub const fn message(&self) -> Option<&fmt::Arguments> {
+    pub fn message(&self) -> Option<&fmt::Arguments> {
         self.message
     }
 
@@ -125,7 +125,7 @@ pub const fn message(&self) -> Option<&fmt::Arguments> {
     /// panic!("Normal panic");
     /// ```
     #[stable(feature = "panic_hooks", since = "1.10.0")]
-    pub const fn location(&self) -> Option<&Location> {
+    pub fn location(&self) -> Option<&Location> {
         // NOTE: If this is changed to sometimes return None,
         // deal with that case in std::panicking::default_hook and std::panicking::begin_panic_fmt.
         Some(&self.location)
@@ -186,7 +186,7 @@ impl<'a> Location<'a> {
                           and related macros",
                 issue = "0")]
     #[doc(hidden)]
-    pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
+    pub fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
         Location { file, line, col }
     }
 
@@ -208,7 +208,7 @@ pub const fn internal_constructor(file: &'a str, line: u32, col: u32) -> Self {
     /// panic!("Normal panic");
     /// ```
     #[stable(feature = "panic_hooks", since = "1.10.0")]
-    pub const fn file(&self) -> &str {
+    pub fn file(&self) -> &str {
         self.file
     }
 
@@ -230,7 +230,7 @@ pub const fn file(&self) -> &str {
     /// panic!("Normal panic");
     /// ```
     #[stable(feature = "panic_hooks", since = "1.10.0")]
-    pub const fn line(&self) -> u32 {
+    pub fn line(&self) -> u32 {
         self.line
     }
 
@@ -252,7 +252,7 @@ pub const fn line(&self) -> u32 {
     /// panic!("Normal panic");
     /// ```
     #[stable(feature = "panic_col", since = "1.25.0")]
-    pub const fn column(&self) -> u32 {
+    pub fn column(&self) -> u32 {
         self.col
     }
 }
index 63a433a8b230179e802ede5f8672c9ab537188e2..68de82d294529e5cefa0d3eae3159a00674849f3 100644 (file)
@@ -207,7 +207,7 @@ pub unsafe fn map_unchecked<U, F>(this: Pin<&'a T>, func: F) -> Pin<&'a U> where
     /// with the same lifetime as the original `Pin`.
     #[unstable(feature = "pin", issue = "49150")]
     #[inline(always)]
-    pub const fn get_ref(this: Pin<&'a T>) -> &'a T {
+    pub fn get_ref(this: Pin<&'a T>) -> &'a T {
         this.pointer
     }
 }
@@ -216,7 +216,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
     /// Convert this `Pin<&mut T>` into a `Pin<&T>` with the same lifetime.
     #[unstable(feature = "pin", issue = "49150")]
     #[inline(always)]
-    pub const fn into_ref(this: Pin<&'a mut T>) -> Pin<&'a T> {
+    pub fn into_ref(this: Pin<&'a mut T>) -> Pin<&'a T> {
         Pin { pointer: this.pointer }
     }
 
index f8dee5370621d55b601e6c5ded43085592a04ba4..dae425da78916232b15df1a7ac750b016d90afb4 100644 (file)
@@ -4021,7 +4021,7 @@ impl<'a, T> ChunksExact<'a, T> {
     /// returned by the iterator. The returned slice has at most `chunk_size-1`
     /// elements.
     #[stable(feature = "chunks_exact", since = "1.31.0")]
-    pub const fn remainder(&self) -> &'a [T] {
+    pub fn remainder(&self) -> &'a [T] {
         self.rem
     }
 }
@@ -4517,7 +4517,7 @@ impl<'a, T> RChunksExact<'a, T> {
     /// returned by the iterator. The returned slice has at most `chunk_size-1`
     /// elements.
     #[stable(feature = "rchunks", since = "1.31.0")]
-    pub const fn remainder(&self) -> &'a [T] {
+    pub fn remainder(&self) -> &'a [T] {
         self.rem
     }
 }
index 950552fc6b172accb3e07c79e2dbd01b3ac00eeb..186d6adbc91cf67ecb6c88df1acf286c943cebf4 100644 (file)
@@ -29,7 +29,7 @@ pub fn from_bytes(bytes: &[u8]) -> &Utf8Lossy {
         unsafe { mem::transmute(bytes) }
     }
 
-    pub const fn chunks(&self) -> Utf8LossyChunksIter {
+    pub fn chunks(&self) -> Utf8LossyChunksIter {
         Utf8LossyChunksIter { source: &self.bytes }
     }
 }
index d73e5db727c91ad9af1e32381aec51bb09629f5d..f5bfe804899596da754427753f331ba80b7a0f06 100644 (file)
@@ -231,7 +231,7 @@ impl Utf8Error {
     /// assert_eq!(1, error.valid_up_to());
     /// ```
     #[stable(feature = "utf8_error", since = "1.5.0")]
-    pub const fn valid_up_to(&self) -> usize { self.valid_up_to }
+    pub fn valid_up_to(&self) -> usize { self.valid_up_to }
 
     /// Provide more information about the failure:
     ///
index 1db3a290e046f2854805e8e96e07c6b756308f58..c9fb22e0080dd1c2efc2531e8fcdfaed53336e19 100644 (file)
@@ -141,7 +141,7 @@ pub unsafe fn new(inner: NonNull<dyn UnsafeWake>) -> Self {
     /// `Waker` is nearly identical to `LocalWaker`, but is threadsafe
     /// (implements `Send` and `Sync`).
     #[inline]
-    pub const fn as_waker(&self) -> &Waker {
+    pub fn as_waker(&self) -> &Waker {
         &self.0
     }
 
index b95449d11eac372900526e1d758506f47402e6aa..c18f200872d7478c8670652a6a783e2fb5d12f44 100644 (file)
@@ -3013,7 +3013,7 @@ impl<'a, K: 'a, V: 'a> VacantEntry<'a, K, V> {
     /// assert_eq!(map.entry("poneyland").key(), &"poneyland");
     /// ```
     #[stable(feature = "map_entry_keys", since = "1.10.0")]
-    pub const fn key(&self) -> &K {
+    pub fn key(&self) -> &K {
         &self.key
     }
 
index feff65bff3f2acbed7b75be49cbbb422425569aa..e2dc02e40bfcb0c2c366b9c060a9d7a10165ffe1 100644 (file)
@@ -833,7 +833,7 @@ impl NulError {
     /// assert_eq!(nul_error.nul_position(), 7);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn nul_position(&self) -> usize { self.0 }
+    pub fn nul_position(&self) -> usize { self.0 }
 
     /// Consumes this error, returning the underlying vector of bytes which
     /// generated the error in the first place.
@@ -909,7 +909,7 @@ pub fn into_cstring(self) -> CString {
 
     /// Access the underlying UTF-8 error that was the cause of this error.
     #[stable(feature = "cstring_into", since = "1.7.0")]
-    pub const fn utf8_error(&self) -> Utf8Error {
+    pub fn utf8_error(&self) -> Utf8Error {
         self.error
     }
 }
index bde9c57c57cc547e461b9c7921630bca69af76b6..e26e6d391f84d3f12bee12a774746e5506811d09 100644 (file)
@@ -633,7 +633,7 @@ impl<W> IntoInnerError<W> {
     /// };
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn error(&self) -> &Error { &self.1 }
+    pub fn error(&self) -> &Error { &self.1 }
 
     /// Returns the buffered writer instance which generated the error.
     ///
index 4c3117260feebe2456346cb827fa301cbb72164a..c07d4a2e7554e5c20dca3c10608d0a877a40af51 100644 (file)
@@ -1653,7 +1653,7 @@ pub fn into_inner(self) -> (T, U) {
     /// }
     /// ```
     #[stable(feature = "more_io_inner_methods", since = "1.20.0")]
-    pub const fn get_ref(&self) -> (&T, &U) {
+    pub fn get_ref(&self) -> (&T, &U) {
         (&self.first, &self.second)
     }
 
@@ -1780,7 +1780,7 @@ impl<T> Take<T> {
     /// }
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn limit(&self) -> u64 { self.limit }
+    pub fn limit(&self) -> u64 { self.limit }
 
     /// Sets the number of bytes that can be read before this instance will
     /// return EOF. This is the same as constructing a new `Take` instance, so
@@ -1856,7 +1856,7 @@ pub fn into_inner(self) -> T {
     /// }
     /// ```
     #[stable(feature = "more_io_inner_methods", since = "1.20.0")]
-    pub const fn get_ref(&self) -> &T {
+    pub fn get_ref(&self) -> &T {
         &self.inner
     }
 
index fc2e8104782638156e05b23a44f51a77873603b0..ff35325ab4fdaaacded38db1c1cb484410f67926 100644 (file)
@@ -475,7 +475,7 @@ pub fn set_port(&mut self, new_port: u16) {
     /// assert_eq!(socket.flowinfo(), 10);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn flowinfo(&self) -> u32 {
+    pub fn flowinfo(&self) -> u32 {
         self.inner.sin6_flowinfo
     }
 
@@ -515,7 +515,7 @@ pub fn set_flowinfo(&mut self, new_flowinfo: u32) {
     /// assert_eq!(socket.scope_id(), 78);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn scope_id(&self) -> u32 {
+    pub fn scope_id(&self) -> u32 {
         self.inner.sin6_scope_id
     }
 
index c5106c9abb9b4588c20884b6bbc02e435af44e20..2517c45696a2db4875c82fcf8d05b87b3800cf9e 100644 (file)
@@ -402,7 +402,7 @@ pub const fn new(a: u8, b: u8, c: u8, d: u8) -> Ipv4Addr {
     /// assert_eq!(addr.octets(), [127, 0, 0, 1]);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub  fn octets(&self) -> [u8; 4] {
+    pub fn octets(&self) -> [u8; 4] {
         let bits = u32::from_be(self.inner.s_addr);
         [(bits >> 24) as u8, (bits >> 16) as u8, (bits >> 8) as u8, bits as u8]
     }
index 71f39ff85e71ae39c28db1b17ae21f6cfce2cca0..a153456370c6f45cbf50c3632b34467d5b3edaf7 100644 (file)
@@ -439,7 +439,7 @@ impl<'a> PrefixComponent<'a> {
     ///
     /// [`Prefix`]: enum.Prefix.html
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn kind(&self) -> Prefix<'a> {
+    pub fn kind(&self) -> Prefix<'a> {
         self.parsed
     }
 
@@ -447,7 +447,7 @@ pub const fn kind(&self) -> Prefix<'a> {
     ///
     /// [`OsStr`]: ../../std/ffi/struct.OsStr.html
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn as_os_str(&self) -> &'a OsStr {
+    pub fn as_os_str(&self) -> &'a OsStr {
         self.raw
     }
 }
@@ -1918,7 +1918,7 @@ pub fn parent(&self) -> Option<&Path> {
     /// [`None`]: ../../std/option/enum.Option.html#variant.None
     /// [`parent`]: struct.Path.html#method.parent
     #[stable(feature = "path_ancestors", since = "1.28.0")]
-    pub const fn ancestors(&self) -> Ancestors {
+    pub fn ancestors(&self) -> Ancestors {
         Ancestors {
             next: Some(&self),
         }
@@ -2267,7 +2267,7 @@ pub fn iter(&self) -> Iter {
     /// println!("{}", path.display());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn display(&self) -> Display {
+    pub fn display(&self) -> Display {
         Display { path: self }
     }
 
index 1c6cc9cb361e5a866f6ccd4387b6d36842243a11..3014283da5b271edc067f78d4c0df488a36e617a 100644 (file)
@@ -72,7 +72,7 @@ impl WaitTimeoutResult {
     /// }
     /// ```
     #[stable(feature = "wait_timeout", since = "1.5.0")]
-    pub const fn timed_out(&self) -> bool {
+    pub fn timed_out(&self) -> bool {
         self.0
     }
 }
index 2a2e5c030b32fe80d7fc017418714a1f97825b9d..b726168c7c6167234619c65b3426bba66dc8fe26 100644 (file)
@@ -1469,7 +1469,7 @@ pub fn recv_deadline(&self, deadline: Instant) -> Result<T, RecvTimeoutError> {
     /// assert_eq!(iter.next(), None);
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn iter(&self) -> Iter<T> {
+    pub fn iter(&self) -> Iter<T> {
         Iter { rx: self }
     }
 
@@ -1512,7 +1512,7 @@ pub const fn iter(&self) -> Iter<T> {
     /// assert_eq!(iter.next(), None);
     /// ```
     #[stable(feature = "receiver_try_iter", since = "1.15.0")]
-    pub const fn try_iter(&self) -> TryIter<T> {
+    pub fn try_iter(&self) -> TryIter<T> {
         TryIter { rx: self }
     }
 
index 4dd37ec387884389f12a6f7da07712049e9327fb..cf9698cb2a9712b6a2439314503c0aef40e63ffd 100644 (file)
@@ -517,7 +517,7 @@ impl OnceState {
     ///     assert!(!state.poisoned());
     /// });
     #[unstable(feature = "once_poison", issue = "33577")]
-    pub const fn poisoned(&self) -> bool {
+    pub fn poisoned(&self) -> bool {
         self.poisoned
     }
 }
index 3a3d2450014c1686758e3788c5833d5691ef437a..e9a97f7c74746973818ab5ce102150a134b1d59f 100644 (file)
@@ -1391,7 +1391,7 @@ impl<T> JoinHandle<T> {
     /// println!("thread id: {:?}", thread.id());
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
-    pub const fn thread(&self) -> &Thread {
+    pub fn thread(&self) -> &Thread {
         &self.0.thread
     }
 
index a9344941f4218d34f466b27559a9582b9dffbfa0..90ab349159915cad86c8a10d386558cc3a729cce 100644 (file)
@@ -449,7 +449,7 @@ impl SystemTimeError {
     /// }
     /// ```
     #[stable(feature = "time2", since = "1.8.0")]
-    pub const fn duration(&self) -> Duration {
+    pub fn duration(&self) -> Duration {
         self.0
     }
 }