Skip to content

Commit b8f307e

Browse files
committed
fix typos caught by codespell
1 parent 6cd7486 commit b8f307e

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/librustc/diagnostics.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ it around as usual.
313313

314314
E0162: r##"
315315
An if-let pattern attempts to match the pattern, and enters the body if the
316-
match was succesful. If the match is irrefutable (when it cannot fail to match),
316+
match was successful. If the match is irrefutable (when it cannot fail to match),
317317
use a regular `let`-binding instead. For instance:
318318
319319
```
@@ -334,7 +334,7 @@ foo(x);
334334

335335
E0165: r##"
336336
A while-let pattern attempts to match the pattern, and enters the body if the
337-
match was succesful. If the match is irrefutable (when it cannot fail to match),
337+
match was successful. If the match is irrefutable (when it cannot fail to match),
338338
use a regular `let`-binding inside a `loop` instead. For instance:
339339
340340
```

src/librustc/middle/resolve_lifetime.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ fn extract_labels<'v, 'a>(ctxt: &mut LifetimeContext<'a>, b: &'v ast::Block) {
374374
fn visit_expr(&mut self, ex: &'v ast::Expr) {
375375
if let Some(label) = expression_label(ex) {
376376
for &(prior, prior_span) in &self.labels_in_fn[..] {
377-
// FIXME (#24278): non-hygienic comparision
377+
// FIXME (#24278): non-hygienic comparison
378378
if label.name == prior.name {
379379
signal_shadowing_problem(self.sess,
380380
label.name,
@@ -420,7 +420,7 @@ fn extract_labels<'v, 'a>(ctxt: &mut LifetimeContext<'a>, b: &'v ast::Block) {
420420
EarlyScope(_, lifetimes, s) |
421421
LateScope(lifetimes, s) => {
422422
for lifetime_def in lifetimes {
423-
// FIXME (#24278): non-hygienic comparision
423+
// FIXME (#24278): non-hygienic comparison
424424
if label.name == lifetime_def.lifetime.name {
425425
signal_shadowing_problem(
426426
sess,
@@ -677,7 +677,7 @@ impl<'a> LifetimeContext<'a> {
677677
lifetime: &ast::Lifetime)
678678
{
679679
for &(label, label_span) in &self.labels_in_fn {
680-
// FIXME (#24278): non-hygienic comparision
680+
// FIXME (#24278): non-hygienic comparison
681681
if lifetime.name == label.name {
682682
signal_shadowing_problem(self.sess,
683683
lifetime.name,

src/librustc_typeck/astconv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ pub fn ast_ty_arg_to_ty<'tcx>(this: &AstConv<'tcx>,
13441344
}
13451345

13461346
// Check the base def in a PathResolution and convert it to a Ty. If there are
1347-
// associated types in the PathResolution, these will need to be seperately
1347+
// associated types in the PathResolution, these will need to be separately
13481348
// resolved.
13491349
fn base_def_to_ty<'tcx>(this: &AstConv<'tcx>,
13501350
rscope: &RegionScope,

src/librustdoc/clean/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics<'tcx>,
944944
// a Sized bound, removing the bounds as we find them.
945945
//
946946
// Note that associated types also have a sized bound by default, but we
947-
// don't actually konw the set of associated types right here so that's
947+
// don't actually know the set of associated types right here so that's
948948
// handled in cleaning associated types
949949
let mut sized_params = HashSet::new();
950950
where_predicates.retain(|pred| {

src/libstd/sys/unix/process2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl Process {
328328
}) {
329329
Ok(0) => None,
330330
Ok(n) if n == self.pid => Some(translate_status(status)),
331-
Ok(n) => panic!("unkown pid: {}", n),
331+
Ok(n) => panic!("unknown pid: {}", n),
332332
Err(e) => panic!("unknown waitpid error: {}", e),
333333
}
334334
}

src/rt/valgrind/valgrind.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -5122,7 +5122,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
51225122

51235123

51245124
/* These requests allow control to move from the simulated CPU to the
5125-
real CPU, calling an arbitary function.
5125+
real CPU, calling an arbitrary function.
51265126
51275127
Note that the current ThreadId is inserted as the first argument.
51285128
So this call:

src/test/run-pass/issue-20616.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type TypeF<T> = Box<T>;
3232
// type argument with trailing comma
3333
type TypeG<T> = Box<T,>;
3434

35-
// trailing comma on liftime defs
35+
// trailing comma on lifetime defs
3636
type TypeH<'a,> = &'a ();
3737

3838
// trailing comma on type argument

0 commit comments

Comments
 (0)