Skip to content

update issue number for const_trait_impl #143875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ declare_features! (
/// Be more precise when looking for live drops in a const context.
(unstable, const_precise_live_drops, "1.46.0", Some(73255)),
/// Allows `impl const Trait for T` syntax.
(unstable, const_trait_impl, "1.42.0", Some(67792)),
(unstable, const_trait_impl, "1.42.0", Some(143874)),
/// Allows the `?` operator in const contexts.
(unstable, const_try, "1.56.0", Some(74935)),
/// Allows use of contracts attributes.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_passes/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ passes_trait_impl_const_stability_mismatch_trait_unstable = ...but the trait is
passes_trait_impl_const_stable =
trait implementations cannot be const stable yet
.note = see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
.note = see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
passes_transparent_incompatible =
transparent {$target} cannot have other repr hints
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,7 @@ impl_eq! { Cow<'a, str>, &'b str }
impl_eq! { Cow<'a, str>, String }

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl const Default for String {
/// Creates an empty `String`.
#[inline]
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3895,7 +3895,7 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for Vec<T, A> {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T> const Default for Vec<T> {
/// Creates an empty `Vec<T>`.
///
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl<T: Copy> Clone for Cell<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T: ~const Default> const Default for Cell<T> {
/// Creates a `Cell<T>`, with the `Default` value for T.
#[inline]
Expand Down Expand Up @@ -1324,7 +1324,7 @@ impl<T: Clone> Clone for RefCell<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T: ~const Default> const Default for RefCell<T> {
/// Creates a `RefCell<T>`, with the `Default` value for T.
#[inline]
Expand Down Expand Up @@ -2332,7 +2332,7 @@ impl<T: ?Sized> UnsafeCell<T> {
}

#[stable(feature = "unsafe_cell_default", since = "1.10.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T: ~const Default> const Default for UnsafeCell<T> {
/// Creates an `UnsafeCell`, with the `Default` value for T.
fn default() -> UnsafeCell<T> {
Expand Down Expand Up @@ -2437,7 +2437,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
}

#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T: ~const Default> const Default for SyncUnsafeCell<T> {
/// Creates an `SyncUnsafeCell`, with the `Default` value for T.
fn default() -> SyncUnsafeCell<T> {
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ use crate::ascii::Char as AsciiChar;
#[rustc_diagnostic_item = "Default"]
#[stable(feature = "rust1", since = "1.0.0")]
#[const_trait]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
pub trait Default: Sized {
/// Returns the "default value" for a type.
///
Expand Down Expand Up @@ -151,7 +151,7 @@ pub macro Default($item:item) {
macro_rules! default_impl {
($t:ty, $v:expr, $doc:tt) => {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl const Default for $t {
#[inline(always)]
#[doc = $doc]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/iter/sources/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<T> Clone for Empty<T> {
// not #[derive] because that adds a Default bound on T,
// which isn't necessary.
#[stable(feature = "iter_empty", since = "1.2.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T> const Default for Empty<T> {
fn default() -> Empty<T> {
Empty(marker::PhantomData)
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ impl<T: PointeeSized> Clone for PhantomData<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T: PointeeSized> const Default for PhantomData<T> {
fn default() -> Self {
Self
Expand Down
16 changes: 8 additions & 8 deletions library/core/src/ops/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ use crate::marker::Tuple;
#[fundamental] // so that regex can rely that `&str: !FnMut`
#[must_use = "closures are lazy and do nothing unless called"]
#[const_trait]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
pub trait Fn<Args: Tuple>: FnMut<Args> {
/// Performs the call operation.
#[unstable(feature = "fn_traits", issue = "29625")]
Expand Down Expand Up @@ -161,7 +161,7 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
#[fundamental] // so that regex can rely that `&str: !FnMut`
#[must_use = "closures are lazy and do nothing unless called"]
#[const_trait]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
pub trait FnMut<Args: Tuple>: FnOnce<Args> {
/// Performs the call operation.
#[unstable(feature = "fn_traits", issue = "29625")]
Expand Down Expand Up @@ -241,7 +241,7 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
#[fundamental] // so that regex can rely that `&str: !FnMut`
#[must_use = "closures are lazy and do nothing unless called"]
#[const_trait]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
pub trait FnOnce<Args: Tuple> {
/// The returned type after the call operator is used.
#[lang = "fn_once_output"]
Expand All @@ -257,7 +257,7 @@ mod impls {
use crate::marker::Tuple;

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
impl<A: Tuple, F: ?Sized> const Fn<A> for &F
where
F: ~const Fn<A>,
Expand All @@ -268,7 +268,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
impl<A: Tuple, F: ?Sized> const FnMut<A> for &F
where
F: ~const Fn<A>,
Expand All @@ -279,7 +279,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
impl<A: Tuple, F: ?Sized> const FnOnce<A> for &F
where
F: ~const Fn<A>,
Expand All @@ -292,7 +292,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
impl<A: Tuple, F: ?Sized> const FnMut<A> for &mut F
where
F: ~const FnMut<A>,
Expand All @@ -303,7 +303,7 @@ mod impls {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "67792")]
#[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")]
impl<A: Tuple, F: ?Sized> const FnOnce<A> for &mut F
where
F: ~const FnMut<A>,
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@ where
impl<T> crate::clone::UseCloned for Option<T> where T: crate::clone::UseCloned {}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T> const Default for Option<T> {
/// Returns [`None`][Option::None].
///
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ptr/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl hash::Hash for Alignment {

/// Returns [`Alignment::MIN`], which is valid for any type.
#[unstable(feature = "ptr_alignment_type", issue = "102070")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl const Default for Alignment {
fn default() -> Alignment {
Alignment::MIN
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5190,7 +5190,7 @@ where
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T> const Default for &[T] {
/// Creates an empty slice.
fn default() -> Self {
Expand All @@ -5199,7 +5199,7 @@ impl<T> const Default for &[T] {
}

#[stable(feature = "mut_slice_default", since = "1.5.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl<T> const Default for &mut [T] {
/// Creates a mutable empty slice.
fn default() -> Self {
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3072,7 +3072,7 @@ impl AsRef<[u8]> for str {
}

#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl const Default for &str {
/// Creates an empty str
#[inline]
Expand All @@ -3082,7 +3082,7 @@ impl const Default for &str {
}

#[stable(feature = "default_mut_str", since = "1.28.0")]
#[rustc_const_unstable(feature = "const_default", issue = "67792")]
#[rustc_const_unstable(feature = "const_default", issue = "143894")]
impl const Default for &mut str {
/// Creates an empty mutable str
#[inline]
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ fn assoc_method(
let name = meth.name.as_ref().unwrap();
let vis = visibility_print_with_space(meth, cx).to_string();
let defaultness = print_default_space(meth.is_default());
// FIXME: Once https://github.com/rust-lang/rust/issues/67792 is implemented, we can remove
// FIXME: Once https://github.com/rust-lang/rust/issues/143874 is implemented, we can remove
// this condition.
let constness = match render_mode {
RenderMode::Normal => print_constness_with_space(
Expand Down Expand Up @@ -2152,7 +2152,7 @@ fn render_rightside(
let tcx = cx.tcx();

fmt::from_fn(move |w| {
// FIXME: Once https://github.com/rust-lang/rust/issues/67792 is implemented, we can remove
// FIXME: Once https://github.com/rust-lang/rust/issues/143874 is implemented, we can remove
// this condition.
let const_stability = match render_mode {
RenderMode::Normal => item.const_stability(tcx),
Expand Down
4 changes: 2 additions & 2 deletions src/tools/rust-analyzer/crates/ide-db/src/generated/lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4711,9 +4711,9 @@ The tracking issue for this feature is: [#133668]
label: "const_trait_impl",
description: r##"# `const_trait_impl`

The tracking issue for this feature is: [#67792]
The tracking issue for this feature is: [#143874]

[#67792]: https://github.com/rust-lang/rust/issues/67792
[#143874]: https://github.com/rust-lang/rust/issues/143874

------------------------
"##,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error[E0658]: const trait impls are experimental
LL | trait Bar: ~const Foo {}
| ^^^^^^
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -26,7 +26,7 @@ error[E0658]: const trait impls are experimental
LL | const fn foo<T: ~const Bar>(x: &T) {
| ^^^^^^
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ error[E0658]: const trait impls are experimental
7 | trait Bar: ~const Foo {}
| ^^^^^^
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information

error[E0658]: const trait impls are experimental
--> const-super-trait.rs:9:17
|
9 | const fn foo<T: ~const Bar>(x: &T) {
| ^^^^^^
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information

error: `[const]` can only be applied to `#[const_trait]` traits
--> const-super-trait.rs:7:12
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/consts/issue-90870.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | a == b
| ^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
help: consider dereferencing here
Expand All @@ -31,7 +31,7 @@ LL | a == b
| ^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
help: consider dereferencing here
Expand All @@ -57,7 +57,7 @@ LL | if l == r {
| ^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
help: consider dereferencing here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ error[E0658]: const trait impls are experimental
LL | fn constness() -> impl Sized + const use<> {}
| ^^^^^
|
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/cross-crate.stock.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | Const.func();
| ^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/const-traits/cross-crate.stocknc.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LL | Const.func();
| ^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
= note: see issue #143874 <https://github.com/rust-lang/rust/issues/143874> for more information
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand Down
Loading
Loading