Skip to content

Commit de72917

Browse files
authored
Rollup merge of #131617 - RalfJung:const_cow_is_borrowed, r=tgross35
remove const_cow_is_borrowed feature gate The two functions guarded by this are still unstable, and there's no reason to require a separate feature gate for their const-ness -- we can just have `cow_is_borrowed` cover both kinds of stability. Cc #65143
2 parents e1df397 + a0661ec commit de72917

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

library/alloc/src/borrow.rs

-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ impl<B: ?Sized + ToOwned> Cow<'_, B> {
225225
/// assert!(!bull.is_borrowed());
226226
/// ```
227227
#[unstable(feature = "cow_is_borrowed", issue = "65143")]
228-
#[rustc_const_unstable(feature = "const_cow_is_borrowed", issue = "65143")]
229228
pub const fn is_borrowed(&self) -> bool {
230229
match *self {
231230
Borrowed(_) => true,
@@ -248,7 +247,6 @@ impl<B: ?Sized + ToOwned> Cow<'_, B> {
248247
/// assert!(!bull.is_owned());
249248
/// ```
250249
#[unstable(feature = "cow_is_borrowed", issue = "65143")]
251-
#[rustc_const_unstable(feature = "const_cow_is_borrowed", issue = "65143")]
252250
pub const fn is_owned(&self) -> bool {
253251
!self.is_borrowed()
254252
}

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108
#![feature(coerce_unsized)]
109109
#![feature(const_align_of_val)]
110110
#![feature(const_box)]
111-
#![feature(const_cow_is_borrowed)]
112111
#![feature(const_eval_select)]
113112
#![feature(const_heap)]
114113
#![feature(const_maybe_uninit_write)]

library/alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(assert_matches)]
55
#![feature(btree_extract_if)]
66
#![feature(cow_is_borrowed)]
7-
#![feature(const_cow_is_borrowed)]
87
#![feature(const_heap)]
98
#![cfg_attr(bootstrap, feature(const_mut_refs))]
109
#![feature(const_try)]

0 commit comments

Comments
 (0)