Skip to content

Commit 5919f62

Browse files
committed
Auto merge of #107840 - matthiaskrgr:rollup-e6v7x0a, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #107446 (Migrate some of `rustc_parse` to derive diagnostics) - #107752 (Specify dlltool prefix when generating import libs) - #107808 (bootstrap.py: fix build-failure message) - #107834 (create symlink for legacy rustfmt path) - #107835 (use idiomatic formatting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents c40919b + f2a2e29 commit 5919f62

File tree

15 files changed

+696
-405
lines changed

15 files changed

+696
-405
lines changed

compiler/rustc_codegen_llvm/src/back/archive.rs

+8
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
183183
// able to control the *exact* spelling of each of the symbols that are being imported:
184184
// hence we don't want `dlltool` adding leading underscores automatically.
185185
let dlltool = find_binutils_dlltool(sess);
186+
let temp_prefix = {
187+
let mut path = PathBuf::from(&output_path);
188+
path.pop();
189+
path.push(lib_name);
190+
path
191+
};
186192
let result = std::process::Command::new(dlltool)
187193
.args([
188194
"-d",
@@ -192,6 +198,8 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
192198
"-l",
193199
output_path.to_str().unwrap(),
194200
"--no-leading-underscore",
201+
"--temp-prefix",
202+
temp_prefix.to_str().unwrap(),
195203
])
196204
.output();
197205

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

+115
Original file line numberDiff line numberDiff line change
@@ -585,3 +585,118 @@ parse_negative_bounds_not_supported = negative bounds are not supported
585585
parse_help_set_edition_cargo = set `edition = "{$edition}"` in `Cargo.toml`
586586
parse_help_set_edition_standalone = pass `--edition {$edition}` to `rustc`
587587
parse_note_edition_guide = for more on editions, read https://doc.rust-lang.org/edition-guide
588+
589+
parse_unexpected_token_after_dot = unexpected token: `{$actual}`
590+
591+
parse_cannot_be_raw_ident = `{$ident}` cannot be a raw identifier
592+
593+
parse_cr_doc_comment = bare CR not allowed in {$block ->
594+
[true] block doc-comment
595+
*[false] doc-comment
596+
}
597+
598+
parse_no_digits_literal = no valid digits found for number
599+
600+
parse_invalid_digit_literal = invalid digit for a base {$base} literal
601+
602+
parse_empty_exponent_float = expected at least one digit in exponent
603+
604+
parse_float_literal_unsupported_base = {$base} float literal is not supported
605+
606+
parse_more_than_one_char = character literal may only contain one codepoint
607+
.followed_by = this `{$chr}` is followed by the combining {$len ->
608+
[one] mark
609+
*[other] marks
610+
} `{$escaped_marks}`
611+
.non_printing = there are non-printing characters, the full sequence is `{$escaped}`
612+
.consider_normalized = consider using the normalized form `{$ch}` of this character
613+
.remove_non = consider removing the non-printing characters
614+
.use_double_quotes = if you meant to write a {$is_byte ->
615+
[true] byte string
616+
*[false] `str`
617+
} literal, use double quotes
618+
619+
parse_no_brace_unicode_escape = incorrect unicode escape sequence
620+
.label = {parse_no_brace_unicode_escape}
621+
.use_braces = format of unicode escape sequences uses braces
622+
.format_of_unicode = format of unicode escape sequences is `\u{"{...}"}`
623+
624+
parse_invalid_unicode_escape = invalid unicode character escape
625+
.label = invalid escape
626+
.help = unicode escape must {$surrogate ->
627+
[true] not be a surrogate
628+
*[false] be at most 10FFFF
629+
}
630+
631+
parse_escape_only_char = {$byte ->
632+
[true] byte
633+
*[false] character
634+
} constant must be escaped: `{$escaped_msg}`
635+
.escape = escape the character
636+
637+
parse_bare_cr = {$double_quotes ->
638+
[true] bare CR not allowed in string, use `\r` instead
639+
*[false] character constant must be escaped: `\r`
640+
}
641+
.escape = escape the character
642+
643+
parse_bare_cr_in_raw_string = bare CR not allowed in raw string
644+
645+
parse_too_short_hex_escape = numeric character escape is too short
646+
647+
parse_invalid_char_in_escape = {parse_invalid_char_in_escape_msg}: `{$ch}`
648+
.label = {parse_invalid_char_in_escape_msg}
649+
650+
parse_invalid_char_in_escape_msg = invalid character in {$is_hex ->
651+
[true] numeric character
652+
*[false] unicode
653+
} escape
654+
655+
parse_out_of_range_hex_escape = out of range hex escape
656+
.label = must be a character in the range [\x00-\x7f]
657+
658+
parse_leading_underscore_unicode_escape = {parse_leading_underscore_unicode_escape_label}: `_`
659+
parse_leading_underscore_unicode_escape_label = invalid start of unicode escape
660+
661+
parse_overlong_unicode_escape = overlong unicode escape
662+
.label = must have at most 6 hex digits
663+
664+
parse_unclosed_unicode_escape = unterminated unicode escape
665+
.label = missing a closing `{"}"}`
666+
.terminate = terminate the unicode escape
667+
668+
parse_unicode_escape_in_byte = unicode escape in byte string
669+
.label = {parse_unicode_escape_in_byte}
670+
.help = unicode escape sequences cannot be used as a byte or in a byte string
671+
672+
parse_empty_unicode_escape = empty unicode escape
673+
.label = this escape must have at least 1 hex digit
674+
675+
parse_zero_chars = empty character literal
676+
.label = {parse_zero_chars}
677+
678+
parse_lone_slash = invalid trailing slash in literal
679+
.label = {parse_lone_slash}
680+
681+
parse_unskipped_whitespace = non-ASCII whitespace symbol '{$ch}' is not skipped
682+
.label = {parse_unskipped_whitespace}
683+
684+
parse_multiple_skipped_lines = multiple lines skipped by escaped newline
685+
.label = skipping everything up to and including this point
686+
687+
parse_unknown_prefix = prefix `{$prefix}` is unknown
688+
.label = unknown prefix
689+
.note = prefixed identifiers and literals are reserved since Rust 2021
690+
.suggestion_br = use `br` for a raw byte string
691+
.suggestion_whitespace = consider inserting whitespace here
692+
693+
parse_too_many_hashes = too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found {$num}
694+
695+
parse_unknown_start_of_token = unknown start of token: {$escaped}
696+
.sugg_quotes = Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '{$ascii_str}' ({$ascii_name}), but are not
697+
.sugg_other = Unicode character '{$ch}' ({$u_name}) looks like '{$ascii_str}' ({$ascii_name}), but it is not
698+
.help_null = source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
699+
.note_repeats = character appears {$repeats ->
700+
[one] once more
701+
*[other] {$repeats} more times
702+
}

compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs

+13-12
Original file line numberDiff line numberDiff line change
@@ -802,18 +802,19 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
802802
let mut walk = ty.walk();
803803
while let Some(arg) = walk.next() {
804804
if arg == param_to_point_at {
805-
return true;
806-
} else if let ty::GenericArgKind::Type(ty) = arg.unpack()
807-
&& let ty::Alias(ty::Projection, ..) = ty.kind()
808-
{
809-
// This logic may seem a bit strange, but typically when
810-
// we have a projection type in a function signature, the
811-
// argument that's being passed into that signature is
812-
// not actually constraining that projection's substs in
813-
// a meaningful way. So we skip it, and see improvements
814-
// in some UI tests.
815-
walk.skip_current_subtree();
816-
}
805+
return true;
806+
}
807+
if let ty::GenericArgKind::Type(ty) = arg.unpack()
808+
&& let ty::Alias(ty::Projection, ..) = ty.kind()
809+
{
810+
// This logic may seem a bit strange, but typically when
811+
// we have a projection type in a function signature, the
812+
// argument that's being passed into that signature is
813+
// not actually constraining that projection's substs in
814+
// a meaningful way. So we skip it, and see improvements
815+
// in some UI tests.
816+
walk.skip_current_subtree();
817+
}
817818
}
818819
false
819820
}

0 commit comments

Comments
 (0)