Skip to content

Commit 0d780b1

Browse files
committed
fix typos in comments
1 parent a56bd2b commit 0d780b1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_const_eval/src/interpret/eval_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
10101010
// Just make this an efficient immediate.
10111011
// Note that not calling `layout_of` here does have one real consequence:
10121012
// if the type is too big, we'll only notice this when the local is actually initialized,
1013-
// which is a bit too late -- we should ideally notice this alreayd here, when the memory
1013+
// which is a bit too late -- we should ideally notice this already here, when the memory
10141014
// is conceptually allocated. But given how rare that error is and that this is a hot function,
10151015
// we accept this downside for now.
10161016
Operand::Immediate(Immediate::Uninit)

library/core/src/num/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ macro_rules! midpoint_impl {
114114
without modifying the original"]
115115
#[inline]
116116
pub const fn midpoint(self, rhs: $SelfT) -> $SelfT {
117-
// Use the well known branchless algorthim from Hacker's Delight to compute
117+
// Use the well known branchless algorithm from Hacker's Delight to compute
118118
// `(a + b) / 2` without overflowing: `((a ^ b) >> 1) + (a & b)`.
119119
((self ^ rhs) >> 1) + (self & rhs)
120120
}

src/doc/unstable-book/src/compiler-flags/check-cfg.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ rustc --check-cfg 'cfg(is_embedded, has_feathers, values(any()))' \
123123
fn do_embedded() {} // and because names exhaustiveness was not disabled
124124

125125
#[cfg(has_feathers)] // This is expected as "has_feathers" was provided in cfg()
126-
fn do_features() {} // and because names exhaustiveness was not disbaled
126+
fn do_features() {} // and because names exhaustiveness was not disabled
127127

128128
#[cfg(has_feathers = "zapping")] // This is expected as "has_feathers" was provided in cfg()
129129
// and because no value checking was enable for "has_feathers"

0 commit comments

Comments
 (0)