diff options
| author | Nathaniel McCallum <nathaniel@mccallum.life> | 2025-08-31 22:26:10 -0400 | 
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2025-09-06 04:35:52 +0200 | 
| commit | 00fcb14e4e6e4fb28fde6a286fd9ac30a2d457c7 (patch) | |
| tree | 00d1276f71461788745df2b5cc15af546d3d3e76 /library/core/src/ops/function.rs | |
| parent | 6c699a37235700ab749e3f14147fe41d49c056e8 (diff) | |
| download | rust-00fcb14e4e6e4fb28fde6a286fd9ac30a2d457c7.tar.gz rust-00fcb14e4e6e4fb28fde6a286fd9ac30a2d457c7.zip | |
clean up some old const trait impl syntax
Diffstat (limited to 'library/core/src/ops/function.rs')
| -rw-r--r-- | library/core/src/ops/function.rs | 9 | 
1 files changed, 3 insertions, 6 deletions
| diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs index ad46e52a475..479368ba8f8 100644 --- a/library/core/src/ops/function.rs +++ b/library/core/src/ops/function.rs @@ -72,9 +72,8 @@ 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 = "143874")] -pub trait Fn<Args: Tuple>: FnMut<Args> { +pub const trait Fn<Args: Tuple>: FnMut<Args> { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] extern "rust-call" fn call(&self, args: Args) -> Self::Output; @@ -160,9 +159,8 @@ 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 = "143874")] -pub trait FnMut<Args: Tuple>: FnOnce<Args> { +pub const trait FnMut<Args: Tuple>: FnOnce<Args> { /// Performs the call operation. #[unstable(feature = "fn_traits", issue = "29625")] extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; @@ -240,9 +238,8 @@ 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 = "143874")] -pub trait FnOnce<Args: Tuple> { +pub const trait FnOnce<Args: Tuple> { /// The returned type after the call operator is used. #[lang = "fn_once_output"] #[stable(feature = "fn_once_output", since = "1.12.0")] | 
