Rollup merge of #78447 - bugadani:typo, r=matthewjasper
Fix typo in comment I hope I got all the typos in that word. :)
This commit is contained in:
commit
3349b6847f
@ -533,7 +533,7 @@ pub unsafe fn alloc<T>(&self, object: T) -> &mut T {
|
||||
ptr::write(mem, object);
|
||||
let result = &mut *mem;
|
||||
// Record the destructor after doing the allocation as that may panic
|
||||
// and would cause `object`'s destuctor to run twice if it was recorded before
|
||||
// and would cause `object`'s destructor to run twice if it was recorded before
|
||||
self.destructors
|
||||
.borrow_mut()
|
||||
.push(DropType { drop_fn: drop_for_type::<T>, obj: result as *mut T as *mut u8 });
|
||||
@ -560,7 +560,7 @@ pub unsafe fn alloc_from_iter<T, I: IntoIterator<Item = T>>(&self, iter: I) -> &
|
||||
mem::forget(vec.drain(..));
|
||||
|
||||
// Record the destructors after doing the allocation as that may panic
|
||||
// and would cause `object`'s destuctor to run twice if it was recorded before
|
||||
// and would cause `object`'s destructor to run twice if it was recorded before
|
||||
for i in 0..len {
|
||||
destructors.push(DropType {
|
||||
drop_fn: drop_for_type::<T>,
|
||||
|
@ -29,7 +29,7 @@ pub fn new(num_nodes: usize, mut edge_pairs: Vec<(N, N)>) -> Self {
|
||||
|
||||
// Create the *edge starts* array. We are iterating over over
|
||||
// the (sorted) edge pairs. We maintain the invariant that the
|
||||
// length of the `node_starts` arary is enough to store the
|
||||
// length of the `node_starts` array is enough to store the
|
||||
// current source node -- so when we see that the source node
|
||||
// for an edge is greater than the current length, we grow the
|
||||
// edge-starts array by just enough.
|
||||
|
@ -738,14 +738,14 @@ impl<D: Decoder> Decodable<D> for Span {
|
||||
}
|
||||
|
||||
/// Calls the provided closure, using the provided `SourceMap` to format
|
||||
/// any spans that are debug-printed during the closure'e exectuino.
|
||||
/// any spans that are debug-printed during the closure's execution.
|
||||
///
|
||||
/// Normally, the global `TyCtxt` is used to retrieve the `SourceMap`
|
||||
/// (see `rustc_interface::callbacks::span_debug1). However, some parts
|
||||
/// of the compiler (e.g. `rustc_parse`) may debug-print `Span`s before
|
||||
/// a `TyCtxt` is available. In this case, we fall back to
|
||||
/// the `SourceMap` provided to this function. If that is not available,
|
||||
/// we fall back to printing the raw `Span` field values
|
||||
/// we fall back to printing the raw `Span` field values.
|
||||
pub fn with_source_map<T, F: FnOnce() -> T>(source_map: Lrc<SourceMap>, f: F) -> T {
|
||||
SESSION_GLOBALS.with(|session_globals| {
|
||||
*session_globals.source_map.borrow_mut() = Some(source_map);
|
||||
|
Loading…
Reference in New Issue
Block a user