Skip to content

Commit 5c87bc8

Browse files
author
Alexander Regueiro
committed
Minor cosmetic changes.
1 parent 497a772 commit 5c87bc8

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/librustc_resolve/error_reporting.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<'a> Resolver<'a> {
417417
}
418418

419419
impl<'a, 'b:'a> ImportResolver<'a, 'b> {
420-
/// Add suggestions for a path that cannot be resolved.
420+
/// Adds suggestions for a path that cannot be resolved.
421421
pub(crate) fn make_path_suggestion(
422422
&mut self,
423423
span: Span,
@@ -431,7 +431,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
431431
// On 2015 `{{root}}` is usually added implicitly.
432432
(Some(fst), Some(snd)) if fst.ident.name == keywords::PathRoot.name() &&
433433
!snd.ident.is_path_segment_keyword() => {}
434-
// `ident::...` on 2018
434+
// `ident::...` on 2018.
435435
(Some(fst), _) if fst.ident.span.rust_2018() &&
436436
!fst.ident.is_path_segment_keyword() => {
437437
// Insert a placeholder that's later replaced by `self`/`super`/etc.
@@ -470,7 +470,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
470470
}
471471
}
472472

473-
/// Suggest a missing `crate::` if that resolves to an correct module.
473+
/// Suggests a missing `crate::` if that resolves to an correct module.
474474
///
475475
/// ```
476476
/// |
@@ -501,7 +501,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
501501
}
502502
}
503503

504-
/// Suggest a missing `super::` if that resolves to an correct module.
504+
/// Suggests a missing `super::` if that resolves to an correct module.
505505
///
506506
/// ```
507507
/// |
@@ -525,7 +525,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
525525
}
526526
}
527527

528-
/// Suggest a missing external crate name if that resolves to an correct module.
528+
/// Suggests a missing external crate name if that resolves to an correct module.
529529
///
530530
/// ```
531531
/// |
@@ -546,7 +546,7 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
546546
}
547547

548548
// Sort extern crate names in reverse order to get
549-
// 1) some consistent ordering for emitted dignostics and
549+
// 1) some consistent ordering for emitted dignostics, and
550550
// 2) `std` suggestions before `core` suggestions.
551551
let mut extern_crate_names =
552552
self.resolver.extern_prelude.iter().map(|(ident, _)| ident.name).collect::<Vec<_>>();

src/librustc_resolve/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,7 @@ impl<'a> Resolver<'a> {
17371737
}
17381738
}
17391739

1740-
/// resolve_hir_path, but takes a callback in case there was an error
1740+
/// Like `resolve_hir_path`, but takes a callback in case there was an error.
17411741
fn resolve_hir_path_cb<F>(
17421742
&mut self,
17431743
path: &ast::Path,
@@ -1750,7 +1750,7 @@ impl<'a> Resolver<'a> {
17501750
let span = path.span;
17511751
let segments = &path.segments;
17521752
let path = Segment::from_path(&path);
1753-
// FIXME (Manishearth): Intra doc links won't get warned of epoch changes
1753+
// FIXME(Manishearth): intra-doc links won't get warned of epoch changes.
17541754
let def = match self.resolve_path_without_parent_scope(&path, Some(namespace), true,
17551755
span, CrateLint::No) {
17561756
PathResult::Module(ModuleOrUniformRoot::Module(module)) =>
@@ -5066,7 +5066,6 @@ fn import_candidate_to_enum_paths(suggestion: &ImportSuggestion) -> (String, Str
50665066
(variant_path_string, enum_path_string)
50675067
}
50685068

5069-
50705069
/// When an entity with a given name is not available in scope, we search for
50715070
/// entities with that name in all crates. This method allows outputting the
50725071
/// results of this search in a programmer-friendly way

0 commit comments

Comments
 (0)