It is not required for LLVM to have SPARC target support, so it is
necessary to only run this test when LLVM does support SPARC. Sadly, it
isn’t possible to specify exactly this constraint. Instead, we specify
that this test should run on SPARC host only (it surely is sane
assumption to make that compiler running on a SPARC can generate
SPARC, right?)
Since you cannot specify multiple `only-*` to have it run on both 32-bit
and 64-bit SPARC we pick 64-bit SPARC, because it is exactly what is
being tested by this test.
Fixes#52881
Previously linker diagnostic were being hidden when two modules were linked
together but failed to link. This commit fixes the situation by ensuring that we
have a diagnostic handler installed and also adds support for handling linker
diagnostics.
Parsing the code block's LangString (```foo) previously checked itself
to see if we were on nightly; that isn't the right place to do so. Move
that check slightly outwards to better abstract LangString.
(This is also an optimization as we avoid the costly environment
variable load of RUSTC_BOOTSTRAP).
* Arguably this change is sometimes injecting noise into the output
(namely in the cases where the suggested rewrite is inline with the
suggestion and we end up highlighting the original source code).
I would not be opposed to something more aggressive/dynamic, like
revising the suggestion code to automatically print the original
source when necessary (e.g. when the error does not have a span
that includes the span of the suggestion).
* Also, as another note on this change: The doc comment for `Diagnostic::span_suggestion`
says:
/// The message
///
/// * should not end in any punctuation (a `:` is added automatically)
/// * should not be a question
/// * should not contain any parts like "the following", "as shown"
but the `:` is *not* added when the emitted line appears
out-of-line relative to the suggestion. I find that to be an
unfortunate UI experience.
----
As a drive-by fix, also changed code to combine multiple suggestions
for a pattern into a single multipart suggestion (which vastly
improves user experience IMO).
----
Includes the updates to expected NLL diagnostics.
Revert "Stabilize to_bytes and from_bytes for integers."
This reverts commit c8f9b84b39 / PR https://github.com/rust-lang/rust/pull/51835, and reopens the tracking issue https://github.com/rust-lang/rust/issues/49792.
These methods were stabilized in Rust 1.29, which is still in Nightly as of this writing. So my understanding is that it is still time to change our minds. Given the ongoing discussion in https://github.com/rust-lang/rust/pull/51919 about possibly renaming these APIs and since 1.29 goes to beta soon, I’d like to revert this stabilization for now until a decision is made in that PR. It’s possible that a decision will be made in time for 1.29, but there is no urgency. At most I expect this functionality to make it into 1.30.
Delete unused code in rustdoc
Also hid the unused crate exports of rustdoc. This is technically a breaking change but we don't even ship librustdoc in the sysroot so I don't expect breakage.
Issue 52057 — inference variable
Break out the computation of universal region relations and do it during the typeck, where we can handle the resulting constraints that arise.
r? @pnkfelix