Skip to content

Commit e95a529

Browse files
committed
document
1 parent 07d1a4a commit e95a529

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

library/core/src/array/drain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<T: [const] Destruct, U, const N: usize, F: FnMut(T) -> U> const Drop
5050
}
5151
impl<'a, T, U, const N: usize, F: FnMut(T) -> U> Drain<'a, T, U, N, F> {
5252
/// SAFETY: must be called without indexing out of bounds.
53-
// FIXME: this is a hack for `let guard = Guard(array); |i| f(guard[i])`.
53+
// FIXME(const-hack): this is a hack for `let guard = Guard(array); |i| f(guard[i])`.
5454
pub(super) const unsafe fn new(array: [T; N], f: &'a mut F) -> Self {
5555
Self { array: ManuallyDrop::new(array), moved: 0, f }
5656
}

library/core/src/ops/try_trait.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ pub(crate) type ChangeOutputType<T: Try<Residual: Residual<V>>, V> =
381381
/// Not currently planned to be exposed publicly, so just `pub(crate)`.
382382
#[repr(transparent)]
383383
pub(crate) struct NeverShortCircuit<T>(pub T);
384+
// FIXME(const-hack): replace with `|a| NeverShortCircuit(f(a))` when const closures added.
384385
pub(crate) struct Wrapped<T, A, F: FnMut(A) -> T> {
385386
f: F,
386387
p: PhantomData<(T, A)>,

0 commit comments

Comments
 (0)