Skip to content

Commit

Permalink
Auto merge of rust-lang#107840 - matthiaskrgr:rollup-e6v7x0a, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#107446 (Migrate some of `rustc_parse` to derive diagnostics)
 - rust-lang#107752 (Specify dlltool prefix when generating import libs)
 - rust-lang#107808 (bootstrap.py: fix build-failure message)
 - rust-lang#107834 (create symlink for legacy rustfmt path)
 - rust-lang#107835 (use idiomatic formatting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Feb 9, 2023
2 parents c40919b + f2a2e29 commit 5919f62
Show file tree
Hide file tree
Showing 15 changed files with 696 additions and 405 deletions.
8 changes: 8 additions & 0 deletions compiler/rustc_codegen_llvm/src/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
// able to control the *exact* spelling of each of the symbols that are being imported:
// hence we don't want `dlltool` adding leading underscores automatically.
let dlltool = find_binutils_dlltool(sess);
let temp_prefix = {
let mut path = PathBuf::from(&output_path);
path.pop();
path.push(lib_name);
path
};
let result = std::process::Command::new(dlltool)
.args([
"-d",
Expand All @@ -192,6 +198,8 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
"-l",
output_path.to_str().unwrap(),
"--no-leading-underscore",
"--temp-prefix",
temp_prefix.to_str().unwrap(),
])
.output();

Expand Down
115 changes: 115 additions & 0 deletions compiler/rustc_error_messages/locales/en-US/parse.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -585,3 +585,118 @@ parse_negative_bounds_not_supported = negative bounds are not supported
parse_help_set_edition_cargo = set `edition = "{$edition}"` in `Cargo.toml`
parse_help_set_edition_standalone = pass `--edition {$edition}` to `rustc`
parse_note_edition_guide = for more on editions, read https://doc.rust-lang.org/edition-guide
parse_unexpected_token_after_dot = unexpected token: `{$actual}`
parse_cannot_be_raw_ident = `{$ident}` cannot be a raw identifier
parse_cr_doc_comment = bare CR not allowed in {$block ->
[true] block doc-comment
*[false] doc-comment
}
parse_no_digits_literal = no valid digits found for number
parse_invalid_digit_literal = invalid digit for a base {$base} literal
parse_empty_exponent_float = expected at least one digit in exponent
parse_float_literal_unsupported_base = {$base} float literal is not supported
parse_more_than_one_char = character literal may only contain one codepoint
.followed_by = this `{$chr}` is followed by the combining {$len ->
[one] mark
*[other] marks
} `{$escaped_marks}`
.non_printing = there are non-printing characters, the full sequence is `{$escaped}`
.consider_normalized = consider using the normalized form `{$ch}` of this character
.remove_non = consider removing the non-printing characters
.use_double_quotes = if you meant to write a {$is_byte ->
[true] byte string
*[false] `str`
} literal, use double quotes
parse_no_brace_unicode_escape = incorrect unicode escape sequence
.label = {parse_no_brace_unicode_escape}
.use_braces = format of unicode escape sequences uses braces
.format_of_unicode = format of unicode escape sequences is `\u{"{...}"}`
parse_invalid_unicode_escape = invalid unicode character escape
.label = invalid escape
.help = unicode escape must {$surrogate ->
[true] not be a surrogate
*[false] be at most 10FFFF
}
parse_escape_only_char = {$byte ->
[true] byte
*[false] character
} constant must be escaped: `{$escaped_msg}`
.escape = escape the character
parse_bare_cr = {$double_quotes ->
[true] bare CR not allowed in string, use `\r` instead
*[false] character constant must be escaped: `\r`
}
.escape = escape the character
parse_bare_cr_in_raw_string = bare CR not allowed in raw string
parse_too_short_hex_escape = numeric character escape is too short
parse_invalid_char_in_escape = {parse_invalid_char_in_escape_msg}: `{$ch}`
.label = {parse_invalid_char_in_escape_msg}
parse_invalid_char_in_escape_msg = invalid character in {$is_hex ->
[true] numeric character
*[false] unicode
} escape
parse_out_of_range_hex_escape = out of range hex escape
.label = must be a character in the range [\x00-\x7f]
parse_leading_underscore_unicode_escape = {parse_leading_underscore_unicode_escape_label}: `_`
parse_leading_underscore_unicode_escape_label = invalid start of unicode escape
parse_overlong_unicode_escape = overlong unicode escape
.label = must have at most 6 hex digits
parse_unclosed_unicode_escape = unterminated unicode escape
.label = missing a closing `{"}"}`
.terminate = terminate the unicode escape
parse_unicode_escape_in_byte = unicode escape in byte string
.label = {parse_unicode_escape_in_byte}
.help = unicode escape sequences cannot be used as a byte or in a byte string
parse_empty_unicode_escape = empty unicode escape
.label = this escape must have at least 1 hex digit
parse_zero_chars = empty character literal
.label = {parse_zero_chars}
parse_lone_slash = invalid trailing slash in literal
.label = {parse_lone_slash}
parse_unskipped_whitespace = non-ASCII whitespace symbol '{$ch}' is not skipped
.label = {parse_unskipped_whitespace}
parse_multiple_skipped_lines = multiple lines skipped by escaped newline
.label = skipping everything up to and including this point
parse_unknown_prefix = prefix `{$prefix}` is unknown
.label = unknown prefix
.note = prefixed identifiers and literals are reserved since Rust 2021
.suggestion_br = use `br` for a raw byte string
.suggestion_whitespace = consider inserting whitespace here
parse_too_many_hashes = too many `#` symbols: raw strings may be delimited by up to 255 `#` symbols, but found {$num}
parse_unknown_start_of_token = unknown start of token: {$escaped}
.sugg_quotes = Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '{$ascii_str}' ({$ascii_name}), but are not
.sugg_other = Unicode character '{$ch}' ({$u_name}) looks like '{$ascii_str}' ({$ascii_name}), but it is not
.help_null = source files must contain UTF-8 encoded text, unexpected null bytes might occur when a different encoding is used
.note_repeats = character appears {$repeats ->
[one] once more
*[other] {$repeats} more times
}
25 changes: 13 additions & 12 deletions compiler/rustc_hir_typeck/src/fn_ctxt/adjust_fulfillment_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,18 +802,19 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
let mut walk = ty.walk();
while let Some(arg) = walk.next() {
if arg == param_to_point_at {
return true;
} else if let ty::GenericArgKind::Type(ty) = arg.unpack()
&& let ty::Alias(ty::Projection, ..) = ty.kind()
{
// This logic may seem a bit strange, but typically when
// we have a projection type in a function signature, the
// argument that's being passed into that signature is
// not actually constraining that projection's substs in
// a meaningful way. So we skip it, and see improvements
// in some UI tests.
walk.skip_current_subtree();
}
return true;
}
if let ty::GenericArgKind::Type(ty) = arg.unpack()
&& let ty::Alias(ty::Projection, ..) = ty.kind()
{
// This logic may seem a bit strange, but typically when
// we have a projection type in a function signature, the
// argument that's being passed into that signature is
// not actually constraining that projection's substs in
// a meaningful way. So we skip it, and see improvements
// in some UI tests.
walk.skip_current_subtree();
}
}
false
}
Expand Down
Loading

0 comments on commit 5919f62

Please sign in to comment.