Skip to content

Commit 1536a53

Browse files
committed
Auto merge of #102450 - JohnTitor:rollup-ahleg93, r=JohnTitor
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
2 parents bf40408 + 5c731cd commit 1536a53

39 files changed

+591
-389
lines changed

compiler/rustc_error_messages/locales/en-US/parser.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ parser_assignment_else_not_allowed = <assignment> ... else {"{"} ... {"}"} is no
245245
parser_expected_statement_after_outer_attr = expected statement after outer attribute
246246
247247
parser_doc_comment_does_not_document_anything = found a documentation comment that doesn't document anything
248-
.help = doc comments must come before what they document, maybe a comment was intended with `//`?
248+
.help = doc comments must come before what they document, if a comment was intended use `//`
249249
.suggestion = missing comma here
250250
251251
parser_const_let_mutually_exclusive = `const` and `let` are mutually exclusive

compiler/rustc_middle/src/ty/print/pretty.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -2173,10 +2173,16 @@ impl<'tcx> FmtPrinter<'_, 'tcx> {
21732173

21742174
let mut region_index = self.region_index;
21752175
let mut next_name = |this: &Self| {
2176-
let name = name_by_region_index(region_index, &mut available_names, num_available);
2177-
debug!(?name);
2178-
region_index += 1;
2179-
assert!(!this.used_region_names.contains(&name));
2176+
let mut name;
2177+
2178+
loop {
2179+
name = name_by_region_index(region_index, &mut available_names, num_available);
2180+
region_index += 1;
2181+
2182+
if !this.used_region_names.contains(&name) {
2183+
break;
2184+
}
2185+
}
21802186

21812187
name
21822188
};

compiler/rustc_parse/src/parser/item.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ impl<'a> Parser<'a> {
760760
)
761761
.span_label(self.token.span, "this doc comment doesn't document anything")
762762
.help(
763-
"doc comments must come before what they document, maybe a \
764-
comment was intended with `//`?",
763+
"doc comments must come before what they document, if a comment was \
764+
intended use `//`",
765765
)
766766
.emit();
767767
self.bump();

0 commit comments

Comments
 (0)