rustdoc: Fix duplicated impls with generics
The same type can appear multiple times in impls so we need to use a set
to avoid adding it multiple times.
Fixes: #45584
regenerate libcore/char_private.rs
(filed separately from the work in #45569, because of this matter of the updated Unicode data; see also #45567)
char_private.rs is generated programmatically by char_private.py, using data retrieved from the Unicode Consortium's website.
The motivation here was to make `is_printable` crate-visible (with `pub(crate)`), but it would seem that the Unicode data has changed slightly since char_private.rs was last generated.
extend NLL with preliminary support for free regions on functions
This PR extends https://github.com/rust-lang/rust/pull/45538 with support for free regions. This is pretty preliminary and will no doubt want to change in various ways, particularly as we add support for closures, but it's enough to get the basic idea in place:
- We now create specific regions to represent each named lifetime declared on the function.
- Region values can contain references to these regions (represented for now as a `BTreeSet<RegionIndex>`).
- If we wind up trying to infer that `'a: 'b` must hold, but no such relationship was declared, we report an error.
It also does a number of drive-by refactorings.
r? @arielb1
cc @spastorino
tools: Fix rustfmt and the RLS
These tools have been corrected in their upstream repo's, and the submodules have been updated here to reflect that. I also had to update Cargo to match what the RLS is expecting.
The tool states for `rustfmt` and `rls` where both changed from "Broken" to "Testing" in this commit, thus enabling testing and distribution again.
When cross-compiling, also build target-arch tarballs for libstd. (Closes: #42320)
Half of the logic is actually in there already in install.rs:install_std but it fails with an error like:
sh: 0: Can't open /<<BUILDDIR>>/rustc-1.21.0+dfsg1/build/tmp/dist/rust-std-1.21.0-powerpc64le-unknown-linux-gnu/install.sh
because the target-arch dist tarball wasn't built as well. This commit fixes that so the overall install works.
There is one minor bug in the existing code which this commit doesn't fix - the install.log from multiple runs of the installer gets clobbered, which seems like it might interfere with the uninstall process (I didn't look very deeply into this, because it doesn't affect what I need to do.) The actual installed files under DESTDIR seem fine though - either they are installed under an arch-specific path, or the multiple runs will clobber the same path with the same arch-independent file.
These tools have been corrected in their upstream repo's, and the
submodules have been updated here to reflect that. I also had to update
Cargo to match what the RLS is expecting.
The tool states for `rustfmt` and `rls` where both changed from "Broken"
to "Testing" in this commit, thus enabling testing and distribution
again.
Now that the upstream LLVM bug is now fixed this commit cherry-picks the commit
onto our LLVM and then re-enables the ThinLTO paths for MIPS.
Closes#45654
Implement is_empty() for BufReader
Simple implementation of `is_empty` method for BufReader so it is possible to tell whether there is any data in its buffer.
I didn't know correct stability annotation to place on the function. Presumably there is no reason to place this feature behind a feature flag, but I wasn't sure how to tag it as an unstable feature without that.
CC: #45323
This fixes cross-compile installation. Half of the logic is actually in there
already in install.rs:install_std but it fails with an error like:
sh: 0: Can't open /<<BUILDDIR>>/rustc-1.21.0+dfsg1/build/tmp/dist/rust-std-1.21.0-powerpc64le-unknown-linux-gnu/install.sh
because the target-arch dist tarball wasn't built as well.
Make last structs indexes definitions use newtype_index macro
This PR makes the last two index structs not using newtype_index macro to use it and also fixes this https://github.com/rust-lang/rust/issues/45763 issue.