Skip to content

Commit 6bb1fef

Browse files
authored
Merge pull request #4722 from rust-lang/rustup-2025-11-25
Automatic Rustup
2 parents 1d8575f + 83b11c5 commit 6bb1fef

File tree

291 files changed

+13659
-7299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+13659
-7299
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2486,7 +2486,6 @@ dependencies = [
24862486
"serde_json",
24872487
"smallvec",
24882488
"tempfile",
2489-
"tikv-jemalloc-sys",
24902489
"ui_test",
24912490
]
24922491

compiler/rustc_hir_analysis/src/check/region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn resolve_block<'tcx>(
9999
for (i, statement) in blk.stmts.iter().enumerate() {
100100
match statement.kind {
101101
hir::StmtKind::Let(LetStmt { els: Some(els), .. }) => {
102-
// Let-else has a special lexical structure for variables.
102+
// let-else has a special lexical structure for variables.
103103
// First we take a checkpoint of the current scope context here.
104104
let mut prev_cx = visitor.cx;
105105

compiler/rustc_mir_build/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ mir_build_suggest_if_let = you might want to use `if let` to ignore the {$count
334334
*[other] variants that aren't
335335
} matched
336336
337-
mir_build_suggest_let_else = you might want to use `let else` to handle the {$count ->
337+
mir_build_suggest_let_else = you might want to use `let...else` to handle the {$count ->
338338
[one] variant that isn't
339339
*[other] variants that aren't
340340
} matched

compiler/rustc_parse/messages.ftl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,6 @@ parse_or_in_let_chain = `||` operators are not supported in let chain conditions
732732
733733
parse_or_pattern_not_allowed_in_fn_parameters = function parameters require top-level or-patterns in parentheses
734734
parse_or_pattern_not_allowed_in_let_binding = `let` bindings require top-level or-patterns in parentheses
735-
parse_out_of_range_hex_escape = out of range hex escape
736-
.label = must be a character in the range [\x00-\x7f]
737735
738736
parse_outer_attr_explanation = outer attributes, like `#[test]`, annotate the item following them
739737

compiler/rustc_parse/src/errors.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,12 +2455,6 @@ pub(crate) enum UnescapeError {
24552455
is_hex: bool,
24562456
ch: String,
24572457
},
2458-
#[diag(parse_out_of_range_hex_escape)]
2459-
OutOfRangeHexEscape(
2460-
#[primary_span]
2461-
#[label]
2462-
Span,
2463-
),
24642458
#[diag(parse_leading_underscore_unicode_escape)]
24652459
LeadingUnderscoreUnicodeEscape {
24662460
#[primary_span]

compiler/rustc_parse/src/lexer/unescape_error_reporting.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,24 @@ pub(crate) fn emit_unescape_error(
226226
err.emit()
227227
}
228228
EscapeError::OutOfRangeHexEscape => {
229-
dcx.emit_err(UnescapeError::OutOfRangeHexEscape(err_span))
229+
let mut err = dcx.struct_span_err(err_span, "out of range hex escape");
230+
err.span_label(err_span, "must be a character in the range [\\x00-\\x7f]");
231+
232+
let escape_str = &lit[range];
233+
if lit.len() <= 4
234+
&& escape_str.len() == 4
235+
&& escape_str.starts_with("\\x")
236+
&& let Ok(value) = u8::from_str_radix(&escape_str[2..4], 16)
237+
&& matches!(mode, Mode::Char | Mode::Str)
238+
{
239+
err.help(format!("if you want to write a byte literal, use `b'{}'`", escape_str));
240+
err.help(format!(
241+
"if you want to write a Unicode character, use `'\\u{{{:X}}}'`",
242+
value
243+
));
244+
}
245+
246+
err.emit()
230247
}
231248
EscapeError::LeadingUnderscoreUnicodeEscape => {
232249
let (c, span) = last_char();

compiler/rustc_parse/src/parser/stmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ impl<'a> Parser<'a> {
867867
if let_else || !if_let {
868868
err.span_suggestion_verbose(
869869
block_span.shrink_to_lo(),
870-
format!("{alternatively}you might have meant to use `let else`"),
870+
format!("{alternatively}you might have meant to use `let...else`"),
871871
"else ".to_string(),
872872
if let_else {
873873
Applicability::MachineApplicable

library/core/src/num/int_macros.rs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ macro_rules! int_impl {
372372
///
373373
/// On big endian this is a no-op. On little endian the bytes are swapped.
374374
///
375+
/// See also [from_be_bytes()](Self::from_be_bytes).
376+
///
375377
/// # Examples
376378
///
377379
/// ```
@@ -402,6 +404,8 @@ macro_rules! int_impl {
402404
///
403405
/// On little endian this is a no-op. On big endian the bytes are swapped.
404406
///
407+
/// See also [from_le_bytes()](Self::from_le_bytes).
408+
///
405409
/// # Examples
406410
///
407411
/// ```
@@ -428,9 +432,15 @@ macro_rules! int_impl {
428432
}
429433
}
430434

431-
/// Converts `self` to big endian from the target's endianness.
435+
/// Swaps bytes of `self` on little endian targets.
432436
///
433-
/// On big endian this is a no-op. On little endian the bytes are swapped.
437+
/// On big endian this is a no-op.
438+
///
439+
/// The returned value has the same type as `self`, and will be interpreted
440+
/// as (a potentially different) value of a native-endian
441+
#[doc = concat!("`", stringify!($SelfT), "`.")]
442+
///
443+
/// See [`to_be_bytes()`](Self::to_be_bytes) for a type-safe alternative.
434444
///
435445
/// # Examples
436446
///
@@ -459,9 +469,15 @@ macro_rules! int_impl {
459469
}
460470
}
461471

462-
/// Converts `self` to little endian from the target's endianness.
472+
/// Swaps bytes of `self` on big endian targets.
463473
///
464-
/// On little endian this is a no-op. On big endian the bytes are swapped.
474+
/// On little endian this is a no-op.
475+
///
476+
/// The returned value has the same type as `self`, and will be interpreted
477+
/// as (a potentially different) value of a native-endian
478+
#[doc = concat!("`", stringify!($SelfT), "`.")]
479+
///
480+
/// See [`to_le_bytes()`](Self::to_le_bytes) for a type-safe alternative.
465481
///
466482
/// # Examples
467483
///

library/std/src/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ pub mod consts {
10971097
/// * `"nto"`
10981098
/// * `"redox"`
10991099
/// * `"solaris"`
1100-
/// * `"solid_asp3`
1100+
/// * `"solid_asp3"`
11011101
/// * `"vexos"`
11021102
/// * `"vita"`
11031103
/// * `"vxworks"`

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,11 @@ tool_rustc_extended!(Miri {
15671567
tool_name: "miri",
15681568
stable: false,
15691569
add_bins_to_sysroot: ["miri"],
1570+
add_features: |builder, target, features| {
1571+
if builder.config.jemalloc(target) {
1572+
features.push("jemalloc".to_string());
1573+
}
1574+
},
15701575
// Always compile also tests when building miri. Otherwise feature unification can cause rebuilds between building and testing miri.
15711576
cargo_args: &["--all-targets"],
15721577
});

0 commit comments

Comments
 (0)