-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 16 pull requests #66365
Rollup of 16 pull requests #66365
Conversation
This skips the loop when the element type is known not to have drop glue, even in debug mode.
One of the links in the docs was being rendered as a literal open-bracket followed by a single quote, instead of being transformed into a link. Fix it to match the link earlier in the same paragraph.
This was essentially a "query" previously (with no key, just always run once when resolving the crate dependencies), and remains so, just now in a way that isn't on Session. This removes the need for the `Once` as well.
Similarly to the previous commit, there's no need for this to be in Session and have a Once around it.
In bootstrap, we set `RUSTC_INSTALL_BINDIR` to `config.bindir`, so rustdoc can find rustc relative to the toolchain sysroot. However, if a distro script like Fedora's `%configure` sets an absolute path, then rustdoc's `sysroot.join(bin_path)` ignores that sysroot altogether. That would be OK once the toolchain is actually installed, but it breaks the in-tree doc tests during the build, since `/usr/bin/rustc` is still the old version. So now we try to make `RUSTC_INSTALL_BINDIR` relative to the sysroot prefix in the first place.
perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits. `ConstProp` doesn't currently intern the memory used by its `Machine` so we can't yet propagate allocations which is why `ConstProp::should_const_prop()` checks if the value being propagated is a scalar or not.
This makes it easier to add new non-standard constructors, and this also ensures that we don't forget cases when adding a new constructor.
It counts as an extra constructor for types that are not allowed to be matched exhaustively.
The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal).
This helps decouple the lint system from needing the implicit TLS TyCtxt as well.
Use `drop_in_place` in `array::IntoIter::drop` This skips the loop when the element type is known not to have drop glue, even in debug mode.
download .tar.xz if python3 is used fixes rust-lang#65757
…oli-obk [mir-opt] Turn on the `ConstProp` pass by default perf.rlo shows that running the `ConstProp` pass results in across-the-board wins regardless of debug or opt complilation mode. As a result, we're turning it on to get the compile time benefits.
Fix documentation for `Iterator::count()`. The documentation of std::core::Iterator::count() stated that the number returned is the number of times `next` is called on the iterator. However this is not true as the number of times `next` is called is exactly one plus the number returned by `count()`.
…c, r=QuietMisdreavus rename cfg(rustdoc) into cfg(doc) Needed by rust-lang#61351 r? @QuietMisdreavus
…-E0623, r=Dylan-DPC Add long error explanation for E0623 Part of rust-lang#61137. r? @Dylan-DPC
…sh-link, r=Dylan-DPC docs: Fix link to BufWriter::flush One of the links in the docs was being rendered as a literal open-bracket followed by a single quote, instead of being transformed into a link. Fix it to match the link earlier in the same paragraph.
…onSapin add raw ptr variant of UnsafeCell::get This has come up recently in rust-lang#66051 (Cc @Centril @pitdicker) as well as in discussion with @nikomatsakis and in unrelated discussion with @withoutboats.
add Result::map_or This PR adds this API to make it consistent with `Option::map_or`. ```rust impl<T, E> Result<T, E> { pub fn map_or<U, F: FnOnce(T) -> U>(self, default: U, f: F) -> U { match self { Ok(t) => f(t), Err(_) => default, } } } ``` This API is very small. We already has a similar API for `Option::map_or`.
Add a callback that allows compiler consumers to override queries. This pull request adds an additional callback that allows compiler consumers such as Prusti and MIRAI to override queries. My hope is that in this way it will be possible to get access to the internal compiler information (e.g. borrow checker) without major changes to the compiler. This pull request is work in progress because I am still testing if I can get the information which I need. cc @nikomatsakis r? @oli-obk
…ulacrum Use a relative bindir for rustdoc to find rustc In bootstrap, we set `RUSTC_INSTALL_BINDIR` to `config.bindir`, so rustdoc can find rustc relative to the toolchain sysroot. However, if a distro script like Fedora's `%configure` sets an absolute path, then rustdoc's `sysroot.join(bin_path)` ignores that sysroot altogether. That would be OK once the toolchain is actually installed, but it breaks the in-tree doc tests during the build, since `/usr/bin/rustc` is still the old version. So now we try to make `RUSTC_INSTALL_BINDIR` relative to the sysroot prefix in the first place. r? @Mark-Simulacrum
…, r=varkor Improve non-exhaustiveness handling in usefulness checking The comments around code paths for the `non_exhaustive` feature mention stuff like "we act as if the type had an extra unmatcheable constructor". So I thought I'd make this explicit by defining a special constructor that does exactly this. This makes those code paths a bit more legible and less prone to error.
Add some tests for fixed ICEs Closes rust-lang#30904 (fixed between nightly-2019-07-14 and nightly-2019-07-31) Closes rust-lang#40231 (example 1 is fixed in 1.32.0, example 2 is fixed in 1.38.0) Closes rust-lang#52432 (fixed in rustc 1.40.0-beta.1 (76b4053 2019-11-05)) Closes rust-lang#63279 (fixed in rustc 1.40.0-nightly (246be7e 2019-10-25)) r? @Centril
…ochenkov Move Session fields to CrateStore `allocator_kind` and `injected_panic_runtime` are both query-like, this moves them out of Session and into CrateStore, avoiding the `Once` they previously had by clearing separating initialization and de-initialization.
…a, r=michaelwoerister Move self-profile infrastructure to data structures The single dependency on queries (QueryName) can be fairly easily abstracted via a trait and this further decouples Session from librustc (the primary goal). This is intended as a precursor to moving Session out of librustc, but since that involves lots of smaller steps that move around code I'm splitting it up into separate PRs.
…r=Dylan-DPC Remove dead code for encoding/decoding lint IDs This helps decouple the lint system from needing the implicit TLS TyCtxt as well.
@bors r+ p=16 rollup=never |
📌 Commit 96a9511 has been approved by |
⌛ Testing commit 96a9511 with merge 87e79738f69be0188d64532e4ae21ec30c42654a... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
drop_in_place
inarray::IntoIter::drop
#65821 (Usedrop_in_place
inarray::IntoIter::drop
)ConstProp
pass by default #66074 ([mir-opt] Turn on theConstProp
pass by default)Iterator::count()
. #66094 (Fix documentation forIterator::count()
.)Failed merges:
r? @ghost