You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #134025 - workingjubilee:rollup-xb4212q, r=<try>
[TEST] Rollup of 5 pull requests
Successful merges:
- #133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match)
- #133861 (Add allocate_bytes and refactor allocate_str in InterpCx for raw byte…)
- #133967 ([AIX] Pass -bnoipath when adding rust upstream dynamic crates)
- #133976 (Removed Unnecessary Spaces From RELEASES.md)
- #133980 ([AIX] Remove option "-n" from AIX "ln" command)
r? `@ghost`
`@rustbot` modify labels: rollup
try-job: i686-mingw
Copy file name to clipboardExpand all lines: RELEASES.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -503,7 +503,7 @@ Compatibility Notes
503
503
* We have renamed `std::panic::PanicInfo` to `std::panic::PanicHookInfo`. The old name will continue to work as an alias, but will result in a deprecation warning starting in Rust 1.82.0.
504
504
505
505
`core::panic::PanicInfo` will remain unchanged, however, as this is now a *different type*.
506
-
506
+
507
507
The reason is that these types have different roles: `std::panic::PanicHookInfo` is the argument to the [panic hook](https://doc.rust-lang.org/stable/std/panic/fn.set_hook.html) in std context (where panics can have an arbitrary payload), while `core::panic::PanicInfo` is the argument to the [`#[panic_handler]`](https://doc.rust-lang.org/nomicon/panic-handler.html) in no_std context (where panics always carry a formatted *message*). Separating these types allows us to add more useful methods to these types, such as `std::panic::PanicHookInfo::payload_as_str()` and `core::panic::PanicInfo::message()`.
508
508
509
509
* The new sort implementations may panic if a type's implementation of [`Ord`](https://doc.rust-lang.org/std/cmp/trait.Ord.html) (or the given comparison function) does not implement a [total order](https://en.wikipedia.org/wiki/Total_order) as the trait requires. `Ord`'s supertraits (`PartialOrd`, `Eq`, and `PartialEq`) must also be consistent. The previous implementations would not "notice" any problem, but the new implementations have a good chance of detecting inconsistencies, throwing a panic rather than returning knowingly unsorted data.
@@ -584,7 +584,7 @@ Stabilized APIs
584
584
- [`impl Default for Arc<CStr>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3CCStr%3E)
585
585
- [`impl Default for Arc<[T]>`](https://doc.rust-lang.org/beta/alloc/sync/struct.Arc.html#impl-Default-for-Arc%3C%5BT%5D%3E)
586
586
- [`impl IntoIterator for Box<[T]>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-IntoIterator-for-Box%3C%5BI%5D,+A%3E)
587
-
- [`impl FromIterator<String> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3CString%3E-for-Box%3Cstr%3E)
587
+
- [`impl FromIterator<String> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3CString%3E-for-Box%3Cstr%3E)
588
588
- [`impl FromIterator<char> for Box<str>`](https://doc.rust-lang.org/beta/alloc/boxed/struct.Box.html#impl-FromIterator%3Cchar%3E-for-Box%3Cstr%3E)
"failed to call custom diff command `{diff_command}`: {err}"
2660
+
));
2661
+
}
2662
+
Ok(output) => {
2663
+
let output = String::from_utf8_lossy(&output.stdout);
2664
+
eprint!("{output}");
2665
+
}
2666
+
}
2667
+
}else{
2668
+
eprint!("{}", write_diff(expected, actual,3));
2669
+
}
2670
+
2671
+
// NOTE: argument order is important, we need `actual` to be on the left so the line number match up when we compare it to `actual_unnormalized` below.
// NOTE: `Expected` is actually correct here, the argument order is reversed so our line numbers match up
2679
+
ifletDiffLine::Expected(normalized) = line {
2680
+
mismatches_normalized += &normalized;
2681
+
mismatches_normalized += "\n";
2682
+
mismatch_line_nos.push(line_no);
2683
+
line_no += 1;
2684
+
}
2685
+
}
2686
+
}
2687
+
letmut mismatches_unnormalized = String::new();
2688
+
let diff_normalized = make_diff(actual, actual_unnormalized,0);
2689
+
for hunk in diff_normalized {
2690
+
if mismatch_line_nos.contains(&hunk.line_number){
2691
+
for line in hunk.lines{
2692
+
ifletDiffLine::Resulting(unnormalized) = line {
2693
+
mismatches_unnormalized += &unnormalized;
2694
+
mismatches_unnormalized += "\n";
2695
+
}
2696
+
}
2697
+
}
2698
+
}
2699
+
2700
+
let normalized_diff = make_diff(&mismatches_normalized,&mismatches_unnormalized,0);
2701
+
// HACK: instead of checking if each hunk is empty, this only checks if the whole input is empty. we should be smarter about this so we don't treat added or removed output as normalized.
2702
+
if !normalized_diff.is_empty()
2703
+
&& !mismatches_unnormalized.is_empty()
2704
+
&& !mismatches_normalized.is_empty()
2705
+
{
2706
+
eprintln!("Note: some mismatched output was normalized before being compared");
0 commit comments