Skip to content

Commit 00fffdd

Browse files
committed
all: fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
1 parent 2f8d1a8 commit 00fffdd

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ Version 1.52.1 (2021-05-10)
10601060
This release disables incremental compilation, unless the user has explicitly
10611061
opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
10621062

1063-
This is due to the widespread, and frequently occuring, breakage encountered by
1063+
This is due to the widespread, and frequently occurring, breakage encountered by
10641064
Rust users due to newly enabled incremental verification in 1.52.0. Notably,
10651065
Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
10661066
newly added incremental verification are still present in past stable versions,

compiler/rustc_codegen_gcc/src/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10641064
let val_type = value.get_type();
10651065
match (type_is_pointer(val_type), type_is_pointer(dest_ty)) {
10661066
(false, true) => {
1067-
// NOTE: Projecting a field of a pointer type will attemp a cast from a signed char to
1067+
// NOTE: Projecting a field of a pointer type will attempt a cast from a signed char to
10681068
// a pointer, which is not supported by gccjit.
10691069
return self.cx.context.new_cast(None, self.inttoptr(value, val_type.make_pointer()), dest_ty);
10701070
},

compiler/rustc_codegen_llvm/src/llvm_util.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,12 @@ pub fn target_cpu(sess: &Session) -> &str {
369369
/// The list of LLVM features computed from CLI flags (`-Ctarget-cpu`, `-Ctarget-feature`,
370370
/// `--target` and similar).
371371
pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<String> {
372-
// Features that come earlier are overriden by conflicting features later in the string.
372+
// Features that come earlier are overridden by conflicting features later in the string.
373373
// Typically we'll want more explicit settings to override the implicit ones, so:
374374
//
375-
// * Features from -Ctarget-cpu=*; are overriden by [^1]
376-
// * Features implied by --target; are overriden by
377-
// * Features from -Ctarget-feature; are overriden by
375+
// * Features from -Ctarget-cpu=*; are overridden by [^1]
376+
// * Features implied by --target; are overridden by
377+
// * Features from -Ctarget-feature; are overridden by
378378
// * function specific features.
379379
//
380380
// [^1]: target-cpu=native is handled here, other target-cpu values are handled implicitly
@@ -383,7 +383,7 @@ pub(crate) fn global_llvm_features(sess: &Session, diagnostics: bool) -> Vec<Str
383383
// FIXME(nagisa): it isn't clear what's the best interaction between features implied by
384384
// `-Ctarget-cpu` and `--target` are. On one hand, you'd expect CLI arguments to always
385385
// override anything that's implicit, so e.g. when there's no `--target` flag, features implied
386-
// the host target are overriden by `-Ctarget-cpu=*`. On the other hand, what about when both
386+
// the host target are overridden by `-Ctarget-cpu=*`. On the other hand, what about when both
387387
// `--target` and `-Ctarget-cpu=*` are specified? Both then imply some target features and both
388388
// flags are specified by the user on the CLI. It isn't as clear-cut which order of precedence
389389
// should be taken in cases like these.

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Type Names for Debug Info.
22

3-
// Notes on targetting MSVC:
3+
// Notes on targeting MSVC:
44
// In general, MSVC's debugger attempts to parse all arguments as C++ expressions,
55
// even if the argument is explicitly a symbol name.
66
// As such, there are many things that cause parsing issues:

compiler/rustc_const_eval/src/interpret/operand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
535535
let val =
536536
self.subst_from_current_frame_and_normalize_erasing_regions(constant.literal)?;
537537
// This can still fail:
538-
// * During ConstProp, with `TooGeneric` or since the `requried_consts` were not all
538+
// * During ConstProp, with `TooGeneric` or since the `required_consts` were not all
539539
// checked yet.
540540
// * During CTFE, since promoteds in `const`/`static` initializer bodies can fail.
541541

compiler/rustc_driver/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
12281228
///
12291229
/// A custom rustc driver can skip calling this to set up a custom ICE hook.
12301230
pub fn install_ice_hook() {
1231-
// If the user has not explicitly overriden "RUST_BACKTRACE", then produce
1231+
// If the user has not explicitly overridden "RUST_BACKTRACE", then produce
12321232
// full backtraces. When a compiler ICE happens, we want to gather
12331233
// as much information as possible to present in the issue opened
12341234
// by the user. Compiler developers and other rustc users can

compiler/rustc_error_codes/src/error_codes/E0772.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ trait object's internal data to be accessed safely from any trait methods. This
4545
rule also goes for any lifetime any struct made into a trait object may have.
4646

4747
In the implementation for `dyn Person`, the `'2` lifetime representing the
48-
internal data was ommitted, meaning that the compiler inferred the lifetime
48+
internal data was omitted, meaning that the compiler inferred the lifetime
4949
`'static`. As a result, the implementation's `is_cool` is inferred by the
5050
compiler to look like this:
5151

compiler/rustc_expand/src/mbe/transcribe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ pub(super) fn transcribe<'a>(
233233
} else {
234234
// Other variables are emitted into the output stream as groups with
235235
// `Delimiter::None` to maintain parsing priorities.
236-
// `Interpolated` is currenty used for such groups in rustc parser.
236+
// `Interpolated` is currently used for such groups in rustc parser.
237237
marker.visit_span(&mut sp);
238238
TokenTree::token(token::Interpolated(nt.clone()), sp)
239239
};

compiler/rustc_expand/src/proc_macro_server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ impl server::Span for Rustc<'_, '_> {
847847
/// the `quote` proc-macro. This will save the span of
848848
/// "hello" into the metadata of `my_proc_macro`. As a result,
849849
/// the body of `my_proc_macro` (after expansion) will end
850-
/// up containg a call that looks like this:
850+
/// up containing a call that looks like this:
851851
/// `proc_macro::Ident::new("hello", proc_macro::Span::recover_proc_macro_span(0))`
852852
///
853853
/// where `0` is the id returned by this function.

compiler/rustc_incremental/src/persist/load.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub enum LoadResult<T> {
2727
},
2828
/// The file either didn't exist or was produced by an incompatible compiler version.
2929
DataOutOfDate,
30-
/// An error occured.
30+
/// An error occurred.
3131
Error {
3232
#[allow(missing_docs)]
3333
message: String,

compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
935935
/// performing that replacement, we'll turn all remaining infer type params to use their name from
936936
/// their definition, and replace all the `[type error]`s back to being infer so they display in
937937
/// the output as `_`. If we didn't go through `[type error]`, we would either show all type params
938-
/// by their name *or* `_`, neither of which is desireable: we want to show all types that we could
938+
/// by their name *or* `_`, neither of which is desirable: we want to show all types that we could
939939
/// infer as `_` to reduce verbosity and avoid telling the user about unnecessary type annotations.
940940
struct ResolvedTypeParamEraser<'tcx> {
941941
tcx: TyCtxt<'tcx>,

compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
5858
bug!("Node not an impl.");
5959
};
6060

61-
// Next, let's figure out the set of trait objects with implict static bounds
61+
// Next, let's figure out the set of trait objects with implicit static bounds
6262
let ty = self.tcx().type_of(*impl_def_id);
6363
let mut v = super::static_impl_trait::TraitObjectVisitor(FxHashSet::default());
6464
v.visit_ty(ty);

0 commit comments

Comments
 (0)