compiler: fix some typos

This commit is contained in:
cuishuang 2022-03-01 20:02:47 +08:00
parent 4a56cbec59
commit eb2b9441e7
7 changed files with 7 additions and 7 deletions

View File

@ -1366,7 +1366,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
generics: &Generics,
itctx: ImplTraitContext<'_, 'hir>,
) -> GenericsCtor<'hir> {
// Error if `?Trait` bounds in where clauses don't refer directly to type paramters.
// Error if `?Trait` bounds in where clauses don't refer directly to type parameters.
// Note: we used to clone these bounds directly onto the type parameter (and avoid lowering
// these into hir when we lower thee where clauses), but this makes it quite difficult to
// keep track of the Span info. Now, `add_implicitly_sized` in `AstConv` checks both param bounds and

View File

@ -1992,7 +1992,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
.find_map(|constraint| {
if let ConstraintCategory::Predicate(predicate_span) = constraint.category {
// We currentl'y doesn't store the `DefId` in the `ConstraintCategory`
// for perforamnce reasons. The error reporting code used by NLL only
// for performances reasons. The error reporting code used by NLL only
// uses the span, so this doesn't cause any problems at the moment.
Some(ObligationCauseCode::BindingObligation(
CRATE_DEF_ID.to_def_id(),

View File

@ -201,7 +201,7 @@ impl CfgEval<'_, '_> {
// Re-parse the tokens, setting the `capture_cfg` flag to save extra information
// to the captured `AttrAnnotatedTokenStream` (specifically, we capture
// `AttrAnnotatedTokenTree::AttributesData` for all occurences of `#[cfg]` and `#[cfg_attr]`)
// `AttrAnnotatedTokenTree::AttributesData` for all occurrences of `#[cfg]` and `#[cfg_attr]`)
let mut parser =
rustc_parse::stream_to_parser(&self.cfg.sess.parse_sess, orig_tokens, None);
parser.capture_cfg = true;

View File

@ -989,7 +989,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>(
// ... and otherwise we're processing a `*.dwp` packed dwarf file.
//
// We cannot rely on the .o paths in the exectuable because they may have been
// We cannot rely on the .o paths in the executable because they may have been
// remapped by --remap-path-prefix and therefore invalid, so we need to provide
// the .o/.dwo paths explicitly.
SplitDebuginfo::Packed => link_dwarf_object(sess, codegen_results, out_filename),

View File

@ -1338,7 +1338,7 @@ impl<'a> Linker for WasmLd<'a> {
}
// LLD will hide these otherwise-internal symbols since it only exports
// symbols explicity passed via the `--export` flags above and hides all
// symbols explicitly passed via the `--export` flags above and hides all
// others. Various bits and pieces of tooling use this, so be sure these
// symbols make their way out of the linker as well.
self.cmd.arg("--export=__heap_base");

View File

@ -7,7 +7,7 @@ use std::iter::Iterator;
/// one of two specific implementations.
///
/// Note: For most methods providing custom
/// implementation may margianlly
/// implementation may marginally
/// improve performance by avoiding
/// doing Left/Right match on every step
/// and doing it only once instead.

View File

@ -50,7 +50,7 @@ impl DefPathTable {
// Continuing with colliding DefPathHashes can lead to correctness
// issues. We must abort compilation.
//
// The likelyhood of such a collision is very small, so actually
// The likelihood of such a collision is very small, so actually
// running into one could be indicative of a poor hash function
// being used.
//