about summary refs log tree commit diff
path: root/library/core/src/array
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-04 07:25:50 +0000
committerbors <bors@rust-lang.org>2021-10-04 07:25:50 +0000
commit44593aeb1387b1be355aeaf0040d5927bd80f060 (patch)
treeb1bd69742d3986c25b61d05b43fbd1cde28d3a4e /library/core/src/array
parentd25de31a0eeb14ab0c8c4613496fe2d3d9a085dd (diff)
parent5c5dde8f0a1e7a3f735dce63d6b81680d24c56d9 (diff)
downloadrust-44593aeb1387b1be355aeaf0040d5927bd80f060.tar.gz
rust-44593aeb1387b1be355aeaf0040d5927bd80f060.zip
Auto merge of #89512 - Manishearth:rollup-meh9x7r, r=Manishearth
Rollup of 14 pull requests

Successful merges:

 - #86434 (Add `Ipv6Addr::is_benchmarking`)
 - #86828 (const fn for option copied, take & replace)
 - #87679 (BTree: refine some comments)
 - #87910 (Mark unsafe methods NonZero*::unchecked_(add|mul) as const.)
 - #88286 (Remove unnecessary unsafe block in `process_unix`)
 - #88305 (Manual Debug for Unix ExitCode ExitStatus ExitStatusError)
 - #88353 (Partially stabilize `array_methods`)
 - #88370 (Add missing `# Panics` section to `Vec` method)
 - #88481 (Remove some feature gates)
 - #89138 (Fix link in Ipv6Addr::to_ipv4 docs)
 - #89401 (Add truncate note to Vec::resize)
 - #89467 (Fix typos in rustdoc/lints)
 - #89472 (Only register `WSACleanup` if `WSAStartup` is actually ever called)
 - #89505 (Add regression test for spurious const error with NLL)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/array')
-rw-r--r--library/core/src/array/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 8c33a43ab33..09329247f94 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -368,14 +368,14 @@ impl<T, const N: usize> [T; N] {
     }
 
     /// Returns a slice containing the entire array. Equivalent to `&s[..]`.
-    #[unstable(feature = "array_methods", issue = "76118")]
-    pub fn as_slice(&self) -> &[T] {
+    #[stable(feature = "array_as_slice", since = "1.57.0")]
+    pub const fn as_slice(&self) -> &[T] {
         self
     }
 
     /// Returns a mutable slice containing the entire array. Equivalent to
     /// `&mut s[..]`.
-    #[unstable(feature = "array_methods", issue = "76118")]
+    #[stable(feature = "array_as_slice", since = "1.57.0")]
     pub fn as_mut_slice(&mut self) -> &mut [T] {
         self
     }