1
Fork 0

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:
Dylan DPC 2020-10-28 01:21:37 +01:00 committed by GitHub
commit 3349b6847f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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);