rustc_parse: Tweak the function parameter name check
The function doesn't need a full token, only its edition.
Noticed while implementing https://github.com/rust-lang/rust/pull/69384.
I'm still not sure whether normalized or unnormalized token is a better fit for the edition check here, so https://github.com/rust-lang/rust/pull/69384 and this PR just keep the status quo behavior.
r? @Centril
Correct comment to match behavior
Corrects the header comment on `saturating_duration_since` to match the behavior of returning 0 if the other timestamp is _later_ than the invocant, not earlier,
This is purely a documentation change, so hopefully it doesn't require an issue; if it does, I'll open one and resubmit.
fix aliasing violation in align_to_mut
Fixes https://github.com/rust-lang/rust/issues/68549
I decided to add the testcase here to make it all one PR, but if you prefer I can also add that test case in the Miri repo instead.
perf: Buffer stderr when writing json errors/warnings
Since `stderr` is unbuffered, writing out json messages actually take up
about ~10%/0.1s of the runtime of the `inflate` benchmark as it generates a fair number of warnings.
cc #64413
Fix no_std detection for target triples
The current check for wether a target is no_std or not is matching for the string `-none-` in a target triple. This doesn't work for triples that end in `-none`, like `aarch64-unknown-none`.
Fix this by matching for `-none` instead.
I checked for all the current target triples containing `none`, and this should not generate any false positives.
This fixes an issue encountered in https://github.com/rust-lang/rust/pull/68334
Use assert_ne in hash tests
The hash tests were written before the assert_ne macro was added to the standard library. The assert_ne macro provides better output in case of a failure.
The current check for wether a target is no_std or not is matching for the
string "-none-" in a target triple. This doesn't work for triples that end in
"-none", like "aarch64-unknown-none".
Fix this by matching for "-none" instead.
I checked for all the current target triples containing "none", and this should
not generate any false positives.
This fixes an issue encountered in https://github.com/rust-lang/rust/pull/68334
When the obligation that couldn't be fulfilled is specific to a nested
obligation, maintain both the nested and parent obligations around for
more accurate and detailed error reporting.
Surface associated type projection bounds that could not be fulfilled in
E0599 errors. Always present the list of unfulfilled trait bounds,
regardless of whether we're pointing at the ADT or trait that didn't
satisfy it.