Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e7ce0b

Browse files
committed
Removefeature(effects) from the standard library
1 parenta8ab1ce commit5e7ce0b

File tree

10 files changed

+10
-19
lines changed

10 files changed

+10
-19
lines changed

‎alloc/src/lib.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@
175175
#![feature(const_mut_refs)]
176176
#![feature(const_precise_live_drops)]
177177
#![feature(const_ptr_write)]
178-
#![feature(const_trait_impl)]
179178
#![feature(const_try)]
180179
#![feature(decl_macro)]
181180
#![feature(dropck_eyepatch)]

‎core/src/cmp.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ use self::Ordering::*;
245245
append_const_msg
246246
)]
247247
#[rustc_diagnostic_item ="PartialEq"]
248-
#[const_trait]
249248
pubtraitPartialEq<Rhs: ?Sized =Self>{
250249
/// This method tests for `self` and `other` values to be equal, and is used
251250
/// by `==`.
@@ -1475,8 +1474,7 @@ mod impls {
14751474
macro_rules! partial_eq_impl{
14761475
($($t:ty)*) =>($(
14771476
#[stable(feature ="rust1", since ="1.0.0")]
1478-
#[rustc_const_unstable(feature ="const_cmp", issue ="92391")]
1479-
implconstPartialEqfor $t{
1477+
implPartialEqfor $t{
14801478
#[inline]
14811479
fn eq(&self, other:&$t) ->bool{(*self) ==(*other)}
14821480
#[inline]

‎core/src/escape.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const fn escape_ascii<const N: usize>(byte: u8) -> ([ascii::Char; N], Range<u8>)
6060
constfnescape_unicode<constN:usize>(c:char) ->([ascii::Char;N],Range<u8>){
6161
const{assert!(N >=10 &&N <u8::MAXasusize)};
6262

63-
let c =u32::from(c);
63+
let c =casu32;
6464

6565
// OR-ing `1` ensures that for `c == 0` the code computes that
6666
// one digit should be printed.

‎core/src/ffi/c_str.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,9 @@ impl CStr {
515515
#[inline]
516516
#[must_use]
517517
constfnas_non_null_ptr(&self) ->NonNull<c_char>{
518-
NonNull::from(&self.inner).as_non_null_ptr()
518+
// FIXME(effects) replace with `NonNull::from`
519+
// SAFETY: a reference is never null
520+
unsafe{NonNull::new_unchecked(&self.inneras*const[c_char]as*mut[c_char])}.as_non_null_ptr()
519521
}
520522

521523
/// Returns the length of `self`. Like C's `strlen`, this does not include the nul terminator.

‎core/src/lib.rs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,11 @@
214214
#![feature(const_mut_refs)]
215215
#![feature(const_precise_live_drops)]
216216
#![feature(const_refs_to_cell)]
217-
#![feature(const_trait_impl)]
218217
#![feature(decl_macro)]
219218
#![feature(deprecated_suggestion)]
220219
#![feature(doc_cfg)]
221220
#![feature(doc_cfg_hide)]
222221
#![feature(doc_notable_trait)]
223-
#![feature(effects)]
224222
#![feature(extern_types)]
225223
#![feature(f128)]
226224
#![feature(f16)]

‎core/src/marker.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,6 @@ marker_impls! {
944944
#[lang ="destruct"]
945945
#[rustc_on_unimplemented(message ="can't drop `{Self}`", append_const_msg)]
946946
#[rustc_deny_explicit_impl(implement_via_object =false)]
947-
#[const_trait]
948947
pubtraitDestruct{}
949948

950949
/// A marker for tuple types.

‎core/src/num/nonzero.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use super::{IntErrorKind, ParseIntError};
3333
reason ="implementation detail which may disappear or be replaced at any time",
3434
issue ="none"
3535
)]
36-
#[const_trait]
3736
pubunsafetraitZeroablePrimitive:Sized +Copy + private::Sealed{
3837
#[doc(hidden)]
3938
typeNonZeroInner:Sized +Copy;
@@ -47,7 +46,6 @@ macro_rules! impl_zeroable_primitive {
4746
reason ="implementation detail which may disappear or be replaced at any time",
4847
issue ="none"
4948
)]
50-
#[const_trait]
5149
pubtraitSealed{}
5250

5351
$(
@@ -70,14 +68,14 @@ macro_rules! impl_zeroable_primitive {
7068
reason ="implementation detail which may disappear or be replaced at any time",
7169
issue ="none"
7270
)]
73-
implconstprivate::Sealedfor $primitive{}
71+
impl private::Sealedfor $primitive{}
7472

7573
#[unstable(
7674
feature ="nonzero_internals",
7775
reason ="implementation detail which may disappear or be replaced at any time",
7876
issue ="none"
7977
)]
80-
unsafeimplconstZeroablePrimitivefor $primitive{
78+
unsafeimplZeroablePrimitivefor $primitive{
8179
typeNonZeroInner = private::$NonZeroInner;
8280
}
8381
)+

‎core/src/ops/arith.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373
append_const_msg
7474
)]
7575
#[doc(alias ="+")]
76-
#[const_trait]
7776
pubtraitAdd<Rhs =Self>{
7877
/// The resulting type after applying the `+` operator.
7978
#[stable(feature ="rust1", since ="1.0.0")]
@@ -95,8 +94,7 @@ pub trait Add<Rhs = Self> {
9594
macro_rules! add_impl{
9695
($($t:ty)*) =>($(
9796
#[stable(feature ="rust1", since ="1.0.0")]
98-
#[rustc_const_unstable(feature ="const_ops", issue ="90080")]
99-
implconstAddfor $t{
97+
implAddfor $t{
10098
typeOutput = $t;
10199

102100
#[inline]

‎core/src/task/wake.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl<'a> Context<'a> {
282282
pubconstfnext(&mutself) ->&mutdynAny{
283283
// FIXME: this field makes Context extra-weird about unwind safety
284284
// can we justify AssertUnwindSafe if we stabilize this? do we care?
285-
match&mut*self.ext{
285+
match&mutself.ext.0{
286286
ExtData::Some(data) =>*data,
287287
ExtData::None(unit) => unit,
288288
}
@@ -356,7 +356,7 @@ impl<'a> ContextBuilder<'a> {
356356
#[rustc_const_unstable(feature ="const_waker", issue ="102012")]
357357
#[unstable(feature ="context_ext", issue ="123392")]
358358
pubconstfnfrom(cx:&'amutContext<'_>) ->Self{
359-
let ext =match&mut*cx.ext{
359+
let ext =match&mut cx.ext.0{
360360
ExtData::Some(ext) =>ExtData::Some(*ext),
361361
ExtData::None(()) =>ExtData::None(()),
362362
};

‎std/src/lib.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@
284284
#![feature(cfi_encoding)]
285285
#![feature(concat_idents)]
286286
#![feature(const_mut_refs)]
287-
#![feature(const_trait_impl)]
288287
#![feature(decl_macro)]
289288
#![feature(deprecated_suggestion)]
290289
#![feature(doc_cfg)]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp