Skip to content

Commit

Permalink
Auto merge of #102450 - JohnTitor:rollup-ahleg93, r=JohnTitor
Browse files Browse the repository at this point in the history
Rollup of 8 pull requests

Successful merges:

 - #98368 (Make `std::os::fd` public.)
 - #102085 (Code refactoring smart_resolve_report_errors)
 - #102351 (Improve E0585 help)
 - #102368 (Add a niche to `Duration`, unix `SystemTime`, and non-apple `Instant`)
 - #102393 (Add regression test for issue 94923)
 - #102399 (Account for use of index-based lifetime names in print of binder)
 - #102416 (remove FIXME, improve documentation)
 - #102433 (env::temp_dir: fix a typo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Sep 29, 2022
2 parents bf40408 + 5c731cd commit 1536a53
Show file tree
Hide file tree
Showing 39 changed files with 591 additions and 389 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_error_messages/locales/en-US/parser.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ parser_assignment_else_not_allowed = <assignment> ... else {"{"} ... {"}"} is no
parser_expected_statement_after_outer_attr = expected statement after outer attribute
parser_doc_comment_does_not_document_anything = found a documentation comment that doesn't document anything
.help = doc comments must come before what they document, maybe a comment was intended with `//`?
.help = doc comments must come before what they document, if a comment was intended use `//`
.suggestion = missing comma here
parser_const_let_mutually_exclusive = `const` and `let` are mutually exclusive
Expand Down
14 changes: 10 additions & 4 deletions compiler/rustc_middle/src/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2173,10 +2173,16 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {

let mut region_index = self.region_index;
let mut next_name = |this: &Self| {
let name = name_by_region_index(region_index, &mut available_names, num_available);
debug!(?name);
region_index += 1;
assert!(!this.used_region_names.contains(&name));
let mut name;

loop {
name = name_by_region_index(region_index, &mut available_names, num_available);
region_index += 1;

if !this.used_region_names.contains(&name) {
break;
}
}

name
};
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_parse/src/parser/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ impl<'a> Parser<'a> {
)
.span_label(self.token.span, "this doc comment doesn't document anything")
.help(
"doc comments must come before what they document, maybe a \
comment was intended with `//`?",
"doc comments must come before what they document, if a comment was \
intended use `//`",
)
.emit();
self.bump();
Expand Down
Loading

0 comments on commit 1536a53

Please sign in to comment.