Skip to content

Commit

Permalink
Rollup merge of #105960 - oli-obk:effect_cleanup, r=fee1-dead
Browse files Browse the repository at this point in the history
Various cleanups

This PR pulls changes out of rust-lang/rust#101900 that can land on master immediately

r? ``@fee1-dead``
  • Loading branch information
matthiaskrgr authored Dec 22, 2022
2 parents 2b23e1b + edab123 commit 3b85756
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/src/const_closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ macro_rules! impl_fn_mut_tuple {
impl<'a, $($var,)* ClosureArguments, Function, ClosureReturnValue> const
FnOnce<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
where
Function: ~const Fn(($(&mut $var),*), ClosureArguments) -> ClosureReturnValue+ ~const Destruct,
Function: ~const Fn(($(&mut $var),*), ClosureArguments) -> ClosureReturnValue + ~const Destruct,
{
type Output = ClosureReturnValue;

Expand All @@ -64,7 +64,7 @@ macro_rules! impl_fn_mut_tuple {
impl<'a, $($var,)* ClosureArguments, Function, ClosureReturnValue> const
FnMut<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
where
Function: ~const Fn(($(&mut $var),*), ClosureArguments)-> ClosureReturnValue,
Function: ~const Fn(($(&mut $var),*), ClosureArguments)-> ClosureReturnValue + ~const Destruct,
{
extern "rust-call" fn call_mut(&mut self, args: ClosureArguments) -> Self::Output {
#[allow(non_snake_case)]
Expand Down
4 changes: 2 additions & 2 deletions core/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ pub trait Hash {
/// println!("Hash is {:x}!", hasher.finish());
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
fn hash<H: Hasher>(&self, state: &mut H);
fn hash<H: ~const Hasher>(&self, state: &mut H);

/// Feeds a slice of this type into the given [`Hasher`].
///
Expand Down Expand Up @@ -980,7 +980,7 @@ mod impls {
#[rustc_const_unstable(feature = "const_hash", issue = "104061")]
impl<T: ?Sized + ~const Hash> const Hash for &mut T {
#[inline]
fn hash<H: Hasher>(&self, state: &mut H) {
fn hash<H: ~const Hasher>(&self, state: &mut H) {
(**self).hash(state);
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/ops/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#ind
#[doc(alias = "]")]
#[doc(alias = "[]")]
#[const_trait]
pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
pub trait IndexMut<Idx: ?Sized>: ~const Index<Idx> {
/// Performs the mutable indexing (`container[index]`) operation.
///
/// # Panics
Expand Down

0 comments on commit 3b85756

Please sign in to comment.