Skip to content

Commit f3f0469

Browse files
Rollup merge of rust-lang#153319 - DanielEScherzer:ie-dots, r=jhpratt
Comments and docs: add missing periods to "ie." "i.e." is short for the Latin "id est" and thus both letters should be followed by periods.
2 parents 0ce5963 + 158ac1a commit f3f0469

21 files changed

Lines changed: 33 additions & 33 deletions

File tree

compiler/rustc_hir/src/def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ impl DefKind {
371371
)
372372
}
373373

374-
/// Whether the corresponding item has generic parameters, ie. the `generics_of` query works.
374+
/// Whether the corresponding item has generic parameters, i.e. the `generics_of` query works.
375375
pub fn has_generics(self) -> bool {
376376
match self {
377377
DefKind::AnonConst

compiler/rustc_lint/src/ptr_nulls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ declare_lint! {
5959
declare_lint_pass!(PtrNullChecks => [USELESS_PTR_NULL_CHECKS, INVALID_NULL_ARGUMENTS]);
6060

6161
/// This function checks if the expression is from a series of consecutive casts,
62-
/// ie. `(my_fn as *const _ as *mut _).cast_mut()` and whether the original expression is either
62+
/// i.e. `(my_fn as *const _ as *mut _).cast_mut()` and whether the original expression is either
6363
/// a fn ptr, a reference, or a function call whose definition is
6464
/// annotated with `#![rustc_never_returns_null_ptr]`.
6565
/// If this situation is present, the function returns the appropriate diagnostic.

compiler/rustc_middle/src/traits/specialization_graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub struct LeafDef {
175175
/// The node in the specialization graph containing the definition of `item`.
176176
pub defining_node: Node,
177177

178-
/// The "top-most" (ie. least specialized) specialization graph node that finalized the
178+
/// The "top-most" (i.e. least specialized) specialization graph node that finalized the
179179
/// definition of `item`.
180180
///
181181
/// Example:
@@ -210,7 +210,7 @@ impl LeafDef {
210210
}
211211

212212
impl<'tcx> Ancestors<'tcx> {
213-
/// Finds the bottom-most (ie. most specialized) definition of an associated
213+
/// Finds the bottom-most (i.e. most specialized) definition of an associated
214214
/// item.
215215
pub fn leaf_def(mut self, tcx: TyCtxt<'tcx>, trait_item_def_id: DefId) -> Option<LeafDef> {
216216
let mut finalizing_node = None;

compiler/rustc_mir_transform/src/elaborate_drop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ where
160160
///
161161
/// The passed `elaborator` is used to determine what should happen at the drop terminator. It
162162
/// decides whether the drop can be statically determined or whether it needs a dynamic drop flag,
163-
/// and whether the drop is "open", ie. should be expanded to drop all subfields of the dropped
163+
/// and whether the drop is "open", i.e. should be expanded to drop all subfields of the dropped
164164
/// value.
165165
///
166166
/// When this returns, the MIR patch in the `elaborator` contains the necessary changes.

compiler/rustc_mir_transform/src/ref_prop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ fn compute_replacement<'tcx>(
245245
debug!(?rvalue);
246246
match rvalue {
247247
// This is a copy, just use the value we have in store for the previous one.
248-
// As we are visiting in `assignment_order`, ie. reverse postorder, `rhs` should
248+
// As we are visiting in `assignment_order`, i.e. reverse postorder, `rhs` should
249249
// have been visited before.
250250
Rvalue::Use(Operand::Copy(place) | Operand::Move(place)) => {
251251
if let Some(rhs) = place.as_local()

compiler/rustc_mir_transform/src/ssa.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(super) struct SsaLocals {
2525
assignment_order: Vec<Local>,
2626
/// Copy equivalence classes between locals. See `copy_classes` for documentation.
2727
copy_classes: IndexVec<Local, Local>,
28-
/// Number of "direct" uses of each local, ie. uses that are not dereferences.
28+
/// Number of "direct" uses of each local, i.e. uses that are not dereferences.
2929
/// We ignore non-uses (Storage statements, debuginfo).
3030
direct_uses: IndexVec<Local, u32>,
3131
/// Set of SSA locals that are immutably borrowed.
@@ -314,7 +314,7 @@ fn compute_copy_classes(ssa: &mut SsaLocals, body: &Body<'_>) {
314314
continue;
315315
}
316316

317-
// We visit in `assignment_order`, ie. reverse post-order, so `rhs` has been
317+
// We visit in `assignment_order`, i.e. reverse post-order, so `rhs` has been
318318
// visited before `local`, and we just have to copy the representing local.
319319
let head = copies[rhs];
320320

compiler/rustc_resolve/src/diagnostics.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2976,7 +2976,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
29762976
corrections.push((import.span, format!("{module_name}::{import_snippet}")));
29772977
} else {
29782978
// Find the binding span (and any trailing commas and spaces).
2979-
// ie. `use a::b::{c, d, e};`
2979+
// i.e. `use a::b::{c, d, e};`
29802980
// ^^^
29812981
let (found_closing_brace, binding_span) = find_span_of_binding_until_next_binding(
29822982
self.tcx.sess,
@@ -2988,11 +2988,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
29882988
let mut removal_span = binding_span;
29892989

29902990
// If the binding span ended with a closing brace, as in the below example:
2991-
// ie. `use a::b::{c, d};`
2991+
// i.e. `use a::b::{c, d};`
29922992
// ^
29932993
// Then expand the span of characters to remove to include the previous
29942994
// binding's trailing comma.
2995-
// ie. `use a::b::{c, d};`
2995+
// i.e. `use a::b::{c, d};`
29962996
// ^^^
29972997
if found_closing_brace
29982998
&& let Some(previous_span) =
@@ -3008,7 +3008,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
30083008

30093009
// Find the span after the crate name and if it has nested imports immediately
30103010
// after the crate name already.
3011-
// ie. `use a::b::{c, d};`
3011+
// i.e. `use a::b::{c, d};`
30123012
// ^^^^^^^^^
30133013
// or `use a::{b, c, d}};`
30143014
// ^^^^^^^^^^^
@@ -3172,16 +3172,16 @@ fn find_span_of_binding_until_next_binding(
31723172
let source_map = sess.source_map();
31733173

31743174
// Find the span of everything after the binding.
3175-
// ie. `a, e};` or `a};`
3175+
// i.e. `a, e};` or `a};`
31763176
let binding_until_end = binding_span.with_hi(use_span.hi());
31773177

31783178
// Find everything after the binding but not including the binding.
3179-
// ie. `, e};` or `};`
3179+
// i.e. `, e};` or `};`
31803180
let after_binding_until_end = binding_until_end.with_lo(binding_span.hi());
31813181

31823182
// Keep characters in the span until we encounter something that isn't a comma or
31833183
// whitespace.
3184-
// ie. `, ` or ``.
3184+
// i.e. `, ` or ``.
31853185
//
31863186
// Also note whether a closing brace character was encountered. If there
31873187
// was, then later go backwards to remove any trailing commas that are left.
@@ -3195,7 +3195,7 @@ fn find_span_of_binding_until_next_binding(
31953195
});
31963196

31973197
// Combine the two spans.
3198-
// ie. `a, ` or `a`.
3198+
// i.e. `a, ` or `a`.
31993199
//
32003200
// Removing these would leave `issue_52891::{d, e};` or `issue_52891::{d, e, };`
32013201
let span = binding_span.with_hi(after_binding_until_next_binding.hi());
@@ -3219,7 +3219,7 @@ fn extend_span_to_previous_binding(sess: &Session, binding_span: Span) -> Option
32193219
let source_map = sess.source_map();
32203220

32213221
// `prev_source` will contain all of the source that came before the span.
3222-
// Then split based on a command and take the first (ie. closest to our span)
3222+
// Then split based on a command and take the first (i.e. closest to our span)
32233223
// snippet. In the example, this is a space.
32243224
let prev_source = source_map.span_to_prev_source(binding_span).ok()?;
32253225

compiler/rustc_resolve/src/imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub(crate) enum ImportKind<'ra> {
7070
decls: PerNS<CmCell<PendingDecl<'ra>>>,
7171
/// `true` for `...::{self [as target]}` imports, `false` otherwise.
7272
type_ns_only: bool,
73-
/// Did this import result from a nested import? ie. `use foo::{bar, baz};`
73+
/// Did this import result from a nested import? i.e. `use foo::{bar, baz};`
7474
nested: bool,
7575
/// The ID of the `UseTree` that imported this `Import`.
7676
///

compiler/rustc_session/src/config/cfg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ impl CheckCfg {
328328
return;
329329
}
330330

331-
// for `#[cfg(foo)]` (ie. cfg value is none)
331+
// for `#[cfg(foo)]` (i.e. cfg value is none)
332332
let no_values = || {
333333
let mut values = FxHashSet::default();
334334
values.insert(None);

compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/find_anon_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ impl<'tcx> Visitor<'tcx> for FindNestedTypeVisitor<'tcx> {
160160
}
161161

162162
// The visitor captures the corresponding `hir::Ty` of the anonymous region
163-
// in the case of structs ie. `hir::TyKind::Path`.
163+
// in the case of structs i.e. `hir::TyKind::Path`.
164164
// This visitor would be invoked for each lifetime corresponding to a struct,
165165
// and would walk the types like Vec<Ref> in the above example and Ref looking for the HIR
166166
// where that lifetime appears. This allows us to highlight the

0 commit comments

Comments
 (0)