Skip to content

Commit 270a41c

Browse files
authored
Rollup merge of #94960 - codehorseman:master, r=oli-obk
Fix many spelling mistakes Signed-off-by: codehorseman <[email protected]>
2 parents 5eb3433 + 01dbfb3 commit 270a41c

File tree

59 files changed

+86
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+86
-86
lines changed

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub(super) struct ItemLowerer<'a, 'lowering, 'hir> {
2626
}
2727

2828
/// When we have a ty alias we *may* have two where clauses. To give the best diagnostics, we set the span
29-
/// to the where clause that is prefered, if it exists. Otherwise, it sets the span to the other where
29+
/// to the where clause that is preferred, if it exists. Otherwise, it sets the span to the other where
3030
/// clause if it exists.
3131
fn add_ty_alias_where_clause(
3232
generics: &mut ast::Generics,

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3695,7 +3695,7 @@ declare_lint! {
36953695
/// ### Explanation
36963696
///
36973697
/// A duplicated attribute may erroneously originate from a copy-paste and the effect of it
3698-
/// being duplicated may not be obvious or desireable.
3698+
/// being duplicated may not be obvious or desirable.
36993699
///
37003700
/// For instance, doubling the `#[test]` attributes registers the test to be run twice with no
37013701
/// change to its environment.

compiler/rustc_middle/src/mir/interpret/pointer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<T: HasDataLayout> PointerArithmetic for T {}
9999
/// mostly opaque; the `Machine` trait extends it with some more operations that also have access to
100100
/// some global state.
101101
/// We don't actually care about this `Debug` bound (we use `Provenance::fmt` to format the entire
102-
/// pointer), but `derive` adds some unecessary bounds.
102+
/// pointer), but `derive` adds some unnecessary bounds.
103103
pub trait Provenance: Copy + fmt::Debug {
104104
/// Says whether the `offset` field of `Pointer`s with this provenance is the actual physical address.
105105
/// If `true, ptr-to-int casts work by simply discarding the provenance.

compiler/rustc_middle/src/ty/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ rustc_query_append! { [define_callbacks!][<'tcx>] }
337337
mod sealed {
338338
use super::{DefId, LocalDefId};
339339

340-
/// An analogue of the `Into` trait that's intended only for query paramaters.
340+
/// An analogue of the `Into` trait that's intended only for query parameters.
341341
///
342342
/// This exists to allow queries to accept either `DefId` or `LocalDefId` while requiring that the
343343
/// user call `to_def_id` to convert between them everywhere else.

compiler/rustc_middle/src/ty/subst.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn ty_slice_as_generic_args<'a, 'tcx>(ts: &'a [Ty<'tcx>]) -> &'a [GenericArg
6161
}
6262

6363
impl<'tcx> List<Ty<'tcx>> {
64-
/// Allows to freely switch betwen `List<Ty<'tcx>>` and `List<GenericArg<'tcx>>`.
64+
/// Allows to freely switch between `List<Ty<'tcx>>` and `List<GenericArg<'tcx>>`.
6565
///
6666
/// As lists are interned, `List<Ty<'tcx>>` and `List<GenericArg<'tcx>>` have
6767
/// be interned together, see `intern_type_list` for more details.

compiler/rustc_middle/src/ty/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl<'tcx> TyCtxt<'tcx> {
486486
}
487487

488488
/// Given the `DefId`, returns the `DefId` of the innermost item that
489-
/// has its own type-checking context or "inference enviornment".
489+
/// has its own type-checking context or "inference environment".
490490
///
491491
/// For example, a closure has its own `DefId`, but it is type-checked
492492
/// with the containing item. Similarly, an inline const block has its

compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ impl<'a, 'tcx> ConstToPat<'a, 'tcx> {
527527
ty::RawPtr(pointee) if pointee.ty.is_sized(tcx.at(span), param_env) => {
528528
PatKind::Constant { value: cv }
529529
}
530-
// FIXME: these can have very suprising behaviour where optimization levels or other
530+
// FIXME: these can have very surprising behaviour where optimization levels or other
531531
// compilation choices change the runtime behaviour of the match.
532532
// See https://github.com/rust-lang/rust/issues/70861 for examples.
533533
ty::FnPtr(..) | ty::RawPtr(..) => {

compiler/rustc_mir_transform/src/check_unsafety.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<'tcx> Visitor<'tcx> for UnsafetyChecker<'_, 'tcx> {
156156
// temporary holding the static pointer to avoid duplicate errors
157157
// <https://github.com/rust-lang/rust/pull/78068#issuecomment-731753506>.
158158
if decl.internal && place.projection.first() == Some(&ProjectionElem::Deref) {
159-
// If the projection root is an artifical local that we introduced when
159+
// If the projection root is an artificial local that we introduced when
160160
// desugaring `static`, give a more specific error message
161161
// (avoid the general "raw pointer" clause below, that would only be confusing).
162162
if let Some(box LocalInfo::StaticRef { def_id, .. }) = decl.local_info {

compiler/rustc_mir_transform/src/const_debuginfo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn find_optimization_oportunities<'tcx>(body: &Body<'tcx>) -> Vec<(Local, Consta
6060
}
6161
}
6262

63-
let mut eligable_locals = Vec::new();
63+
let mut eligible_locals = Vec::new();
6464
for (local, mutating_uses) in visitor.local_mutating_uses.drain_enumerated(..) {
6565
if mutating_uses != 1 || !locals_to_debuginfo.contains(local) {
6666
continue;
@@ -78,13 +78,13 @@ fn find_optimization_oportunities<'tcx>(body: &Body<'tcx>) -> Vec<(Local, Consta
7878
&bb.statements[location.statement_index].kind
7979
{
8080
if let Some(local) = p.as_local() {
81-
eligable_locals.push((local, *c));
81+
eligible_locals.push((local, *c));
8282
}
8383
}
8484
}
8585
}
8686

87-
eligable_locals
87+
eligible_locals
8888
}
8989

9090
impl Visitor<'_> for LocalUseVisitor {

compiler/rustc_mir_transform/src/early_otherwise_branch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ fn verify_candidate_branch<'tcx>(
359359
if branch.statements.len() != 1 {
360360
return false;
361361
}
362-
// ...assign the descriminant of `place` in that statement
362+
// ...assign the discriminant of `place` in that statement
363363
let StatementKind::Assign(boxed) = &branch.statements[0].kind else {
364364
return false
365365
};

0 commit comments

Comments
 (0)