Skip to content

Commit 277802e

Browse files
authored
Rollup merge of #94947 - Dylan-DPC:fix/typos, r=oli-obk
fix typos Rework of #94603 which got closed as I was trying to unmerge and repush. This is a subset of changes from the original pr as I sed'd whatever typos I remembered from the original PR thanks to `@cuishuang` for the original PR
2 parents e755f2c + 13e8899 commit 277802e

File tree

16 files changed

+24
-24
lines changed

16 files changed

+24
-24
lines changed

Diff for: compiler/rustc_lint/src/builtin.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl UnsafeCode {
328328
cx.struct_span_lint(UNSAFE_CODE, span, decorate);
329329
}
330330

331-
fn report_overriden_symbol_name(&self, cx: &EarlyContext<'_>, span: Span, msg: &str) {
331+
fn report_overridden_symbol_name(&self, cx: &EarlyContext<'_>, span: Span, msg: &str) {
332332
self.report_unsafe(cx, span, |lint| {
333333
lint.build(msg)
334334
.note(
@@ -380,14 +380,14 @@ impl EarlyLintPass for UnsafeCode {
380380

381381
ast::ItemKind::Fn(..) => {
382382
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::no_mangle) {
383-
self.report_overriden_symbol_name(
383+
self.report_overridden_symbol_name(
384384
cx,
385385
attr.span,
386386
"declaration of a `no_mangle` function",
387387
);
388388
}
389389
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::export_name) {
390-
self.report_overriden_symbol_name(
390+
self.report_overridden_symbol_name(
391391
cx,
392392
attr.span,
393393
"declaration of a function with `export_name`",
@@ -397,14 +397,14 @@ impl EarlyLintPass for UnsafeCode {
397397

398398
ast::ItemKind::Static(..) => {
399399
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::no_mangle) {
400-
self.report_overriden_symbol_name(
400+
self.report_overridden_symbol_name(
401401
cx,
402402
attr.span,
403403
"declaration of a `no_mangle` static",
404404
);
405405
}
406406
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::export_name) {
407-
self.report_overriden_symbol_name(
407+
self.report_overridden_symbol_name(
408408
cx,
409409
attr.span,
410410
"declaration of a static with `export_name`",
@@ -419,14 +419,14 @@ impl EarlyLintPass for UnsafeCode {
419419
fn check_impl_item(&mut self, cx: &EarlyContext<'_>, it: &ast::AssocItem) {
420420
if let ast::AssocItemKind::Fn(..) = it.kind {
421421
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::no_mangle) {
422-
self.report_overriden_symbol_name(
422+
self.report_overridden_symbol_name(
423423
cx,
424424
attr.span,
425425
"declaration of a `no_mangle` method",
426426
);
427427
}
428428
if let Some(attr) = cx.sess().find_by_name(&it.attrs, sym::export_name) {
429-
self.report_overriden_symbol_name(
429+
self.report_overridden_symbol_name(
430430
cx,
431431
attr.span,
432432
"declaration of a method with `export_name`",

Diff for: compiler/rustc_lint/src/levels.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<'s> LintLevelsBuilder<'s> {
116116
continue
117117
};
118118
for id in ids {
119-
// ForceWarn and Forbid cannot be overriden
119+
// ForceWarn and Forbid cannot be overridden
120120
if let Some((Level::ForceWarn | Level::Forbid, _)) = self.current_specs().get(&id) {
121121
continue;
122122
}
@@ -137,7 +137,7 @@ impl<'s> LintLevelsBuilder<'s> {
137137
self.sets.get_lint_level(id.lint, self.cur, Some(self.current_specs()), &self.sess);
138138
// Setting to a non-forbid level is an error if the lint previously had
139139
// a forbid level. Note that this is not necessarily true even with a
140-
// `#[forbid(..)]` attribute present, as that is overriden by `--cap-lints`.
140+
// `#[forbid(..)]` attribute present, as that is overridden by `--cap-lints`.
141141
//
142142
// This means that this only errors if we're truly lowering the lint
143143
// level from forbid.

Diff for: compiler/rustc_middle/src/mir/generic_graph.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn bb_to_graph_node(block: BasicBlock, body: &Body<'_>, dark_mode: bool) -> Node
5050
let style = NodeStyle { title_bg: Some(bgcolor.to_owned()), ..Default::default() };
5151
let mut stmts: Vec<String> = data.statements.iter().map(|x| format!("{:?}", x)).collect();
5252

53-
// add the terminator to the stmts, gsgdt can print it out seperately
53+
// add the terminator to the stmts, gsgdt can print it out separately
5454
let mut terminator_head = String::new();
5555
data.terminator().kind.fmt_head(&mut terminator_head).unwrap();
5656
stmts.push(terminator_head);

Diff for: compiler/rustc_middle/src/mir/query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ pub struct BorrowCheckResult<'tcx> {
250250

251251
/// The result of the `mir_const_qualif` query.
252252
///
253-
/// Each field (except `error_occured`) corresponds to an implementer of the `Qualif` trait in
253+
/// Each field (except `error_occurred`) corresponds to an implementer of the `Qualif` trait in
254254
/// `rustc_const_eval/src/transform/check_consts/qualifs.rs`. See that file for more information on each
255255
/// `Qualif`.
256256
#[derive(Clone, Copy, Debug, Default, TyEncodable, TyDecodable, HashStable)]

Diff for: compiler/rustc_mir_build/src/check_unsafety.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ pub fn check_unsafety<'tcx>(tcx: TyCtxt<'tcx>, def: ty::WithOptConstParam<LocalD
608608

609609
let (thir, expr) = tcx.thir_body(def);
610610
let thir = &thir.borrow();
611-
// If `thir` is empty, a type error occured, skip this body.
611+
// If `thir` is empty, a type error occurred, skip this body.
612612
if thir.exprs.is_empty() {
613613
return;
614614
}

Diff for: compiler/rustc_session/src/options.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ mod desc {
394394
pub const parse_linker_plugin_lto: &str =
395395
"either a boolean (`yes`, `no`, `on`, `off`, etc), or the path to the linker plugin";
396396
pub const parse_location_detail: &str =
397-
"comma seperated list of location details to track: `file`, `line`, or `column`";
397+
"comma separated list of location details to track: `file`, `line`, or `column`";
398398
pub const parse_switch_with_opt_path: &str =
399399
"an optional path to the profiling data output directory";
400400
pub const parse_merge_functions: &str = "one of: `disabled`, `trampolines`, or `aliases`";
@@ -1283,7 +1283,7 @@ options! {
12831283
llvm_time_trace: bool = (false, parse_bool, [UNTRACKED],
12841284
"generate JSON tracing data file from LLVM data (default: no)"),
12851285
location_detail: LocationDetail = (LocationDetail::all(), parse_location_detail, [TRACKED],
1286-
"comma seperated list of location details to be tracked when using caller_location \
1286+
"comma separated list of location details to be tracked when using caller_location \
12871287
valid options are `file`, `line`, and `column` (default: all)"),
12881288
ls: bool = (false, parse_bool, [UNTRACKED],
12891289
"list the symbols defined by a library crate (default: no)"),

Diff for: compiler/rustc_session/src/parse.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub struct SymbolGallery {
6969

7070
impl SymbolGallery {
7171
/// Insert a symbol and its span into symbol gallery.
72-
/// If the symbol has occurred before, ignore the new occurance.
72+
/// If the symbol has occurred before, ignore the new occurrance.
7373
pub fn insert(&self, symbol: Symbol, span: Span) {
7474
self.symbols.lock().entry(symbol).or_insert(span);
7575
}

Diff for: compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
369369
(true, Some(None)) => {
370370
Some(format!("{cannot_do_this} in const contexts"))
371371
}
372-
// overriden post message
372+
// overridden post message
373373
(true, Some(Some(post_message))) => {
374374
Some(format!("{cannot_do_this}{post_message}"))
375375
}

Diff for: library/alloc/src/collections/btree/set/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ fn assert_send() {
609609

610610
#[allow(dead_code)]
611611
// Check that the member-like functions conditionally provided by #[derive()]
612-
// are not overriden by genuine member functions with a different signature.
612+
// are not overridden by genuine member functions with a different signature.
613613
fn assert_derives() {
614614
fn hash<T: Hash, H: Hasher>(v: BTreeSet<T>, state: &mut H) {
615615
v.hash(state);

Diff for: src/bootstrap/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ impl Rustflags {
17951795
}
17961796

17971797
/// By default, cargo will pick up on various variables in the environment. However, bootstrap
1798-
/// reuses those variables to pass additional flags to rustdoc, so by default they get overriden.
1798+
/// reuses those variables to pass additional flags to rustdoc, so by default they get overridden.
17991799
/// Explicitly add back any previous value in the environment.
18001800
///
18011801
/// `prefix` is usually `RUSTFLAGS` or `RUSTDOCFLAGS`.

Diff for: src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ fn resolve_associated_trait_item<'a>(
948948
///
949949
/// This function returns `None` if no associated item was found in the impl.
950950
/// This can occur when the trait associated item has a default value that is
951-
/// not overriden in the impl.
951+
/// not overridden in the impl.
952952
///
953953
/// This is just a wrapper around [`TyCtxt::impl_item_implementor_ids()`] and
954954
/// [`TyCtxt::associated_item()`] (with some helpful logging added).

Diff for: src/librustdoc/visit_ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
326326
om.items.push((item, renamed))
327327
}
328328
hir::ItemKind::Macro(ref macro_def, _) => {
329-
// `#[macro_export] macro_rules!` items are handled seperately in `visit()`,
329+
// `#[macro_export] macro_rules!` items are handled separately in `visit()`,
330330
// above, since they need to be documented at the module top level. Accordingly,
331331
// we only want to handle macros if one of three conditions holds:
332332
//

Diff for: src/test/rustdoc-ui/display-output.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Test that `--show-output` has an effect and `allow(unused)` can be overriden.
1+
// Test that `--show-output` has an effect and `allow(unused)` can be overridden.
22

33
// check-pass
44
// edition:2018

Diff for: src/test/ui/lint/cli-lint-override.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Tests that subsequent lints specified via the command line override
2-
// each other, except for ForceWarn and Forbid, which cannot be overriden.
2+
// each other, except for ForceWarn and Forbid, which cannot be overridden.
33
//
44
// revisions: warn_deny forbid_warn force_warn_deny
55
//

Diff for: src/tools/clippy/.github/ISSUE_TEMPLATE/ice.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ body:
1010
attributes:
1111
label: Summary
1212
description: |
13-
If possible, try to provide a minimal verifiable example. You can read ["Rust Bug Minimization Patterns"][mve] for how to create smaller examples. Otherwise, provide the crate where the ICE occured.
13+
If possible, try to provide a minimal verifiable example. You can read ["Rust Bug Minimization Patterns"][mve] for how to create smaller examples. Otherwise, provide the crate where the ICE occurred.
1414
1515
[mve]: http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
1616
validations:

Diff for: src/tools/clippy/clippy_lints/src/upper_case_acronyms.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl LateLintPass<'_> for UpperCaseAcronyms {
114114
check_ident(cx, &it.ident, self.upper_case_acronyms_aggressive);
115115
},
116116
ItemKind::Enum(ref enumdef, _) => {
117-
// check enum variants seperately because again we only want to lint on private enums and
117+
// check enum variants separately because again we only want to lint on private enums and
118118
// the fn check_variant does not know about the vis of the enum of its variants
119119
enumdef
120120
.variants

0 commit comments

Comments
 (0)