- 12 12月, 2020 3 次提交
-
-
由 Joshua Nelson 提交于
This was simpler than expected.
-
由 Joshua Nelson 提交于
This should *vastly* reduce memory usage.
-
由 Joshua Nelson 提交于
-
- 10 12月, 2020 22 次提交
-
-
由 bors 提交于
Constier maybe uninit I was playing around trying to make `[T; N]::zip()` in #79451 be `const fn`. One of the things I bumped into was `MaybeUninit::assume_init`. Is there any reason for the intrinsic `assert_inhabited<T>()` and therefore `MaybeUninit::assume_init` not being `const`? --- I have as best as I could tried to follow the instruction in [library/core/src/intrinsics.rs](https://github.com/rust-lang/rust/blob/master/library/core/src/intrinsics.rs#L11). I have no idea what I am doing but it seems to compile after some slight changes after the copy paste. Is this anywhere near how this should be done? Also any ideas for name of the feature gate? I guess `const_maybe_assume_init` is quite misleading since I have added some more methods. Should I add test? If so what should be tested?
-
由 bors 提交于
implement better availability probing for copy_file_range Followup to https://github.com/rust-lang/rust/pull/75428#discussion_r469616547 Previously syscall detection was overly pessimistic. Any attempt to copy to an immutable file (EPERM) would disable copy_file_range support for the whole process. The change tries to copy_file_range on invalid file descriptors which will never run into the immutable file case and thus we can clearly distinguish syscall availability.
-
由 bors 提交于
Accept arbitrary expressions in key-value attributes at parse time Continuation of https://github.com/rust-lang/rust/pull/77271. We now support arbitrary expressions in values of key-value attributes at parse time. ``` #[my_attr = EXPR] ``` Previously only unsuffixed literals and interpolated expressions (`$expr`) were accepted. There are two immediate motivational cases for this: - External doc strings (`#[doc = include_str!("my_doc.md")]`, eliminating the need in https://github.com/rust-lang/rust/issues/44732) and expanding macros in this position in general. Currently such macro expansions are supported in this position in interpolated `$expr`s (the `#[doc = $doc]` idiom). - Paths (`#[namespace = foo::bar] extern "C++" { ... }`) like proposed in https://github.com/rust-lang/rust/pull/76734. If the attribute in question survives expansion, then the value is still restricted to unsuffixed literals by a semantic check. This restriction doesn't prevent the use cases listed above, so this PR keeps it in place for now. Closes https://github.com/rust-lang/rust/issues/52607. Previous attempt - https://github.com/rust-lang/rust/pull/67121. Some more detailed write up on internals - https://internals.rust-lang.org/t/macro-expansion-points-in-attributes/11455. Tracking issue - https://github.com/rust-lang/rust/issues/78835.
-
由 bors 提交于
Rollup of 12 pull requests Successful merges: - #79732 (minor stylistic clippy cleanups) - #79750 (Fix trimming of lint docs) - #79777 (Remove `first_merge` from liveness debug logs) - #79795 (Privatize some of libcore unicode_internals) - #79803 (Update xsv to prevent random CI failures) - #79810 (Account for gaps in def path table during decoding) - #79818 (Fixes to Rust coverage) - #79824 (Strip prefix instead of replacing it with empty string) - #79826 (Simplify visit_{foreign,trait}_item) - #79844 (Move RWUTable to a separate module) - #79861 (Update LLVM submodule) - #79862 (Remove tab-lock and replace it with ctrl+up/down arrows to switch between search result tabs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Tyler Mandry 提交于
Remove tab-lock and replace it with ctrl+up/down arrows to switch between search result tabs Fixes https://github.com/rust-lang/rust/issues/65212 What took the longest time was to update the help popup in the end. r? `@Manishearth`
-
由 Tyler Mandry 提交于
Update LLVM submodule * [[msan] Fix bugs when instrumenting x86.avx512*_cvt* intrinsics](https://github.com/rust-lang/llvm-project/pull/84) * [[X86][AVX512] Only lower to VPALIGNR if we have BWI (PR48322)](https://github.com/rust-lang/llvm-project/pull/85)
-
由 Tyler Mandry 提交于
Move RWUTable to a separate module
-
由 Tyler Mandry 提交于
Simplify visit_{foreign,trait}_item Using an `if` seems like a better semantic fit and saves a few lines. Noticed while looking at https://github.com/rust-lang/rust/pull/79752, but that's already merged. r? `@lcnr,` cc `@cjgillot` `@rustbot` modify labels +C-cleanup +T-compiler
-
由 Tyler Mandry 提交于
Strip prefix instead of replacing it with empty string r? `@lcnr,` since you reviewed my other PR in the area. `@rustbot` modify labels +C-cleanup +T-compiler
-
由 Tyler Mandry 提交于
Fixes to Rust coverage Fixes: #79725 Some macros can create a situation where `fn_sig_span` and `body_span` map to different files. New documentation on coverage tests incorrectly assumed multiple test binaries could just be listed at the end of the `llvm-cov` command, but it turns out each binary needs a `--object` prefix. This PR fixes the bug and updates the documentation to correct that issue. It also fixes a few other minor issues in internal implementation comments, and adds documentation on getting coverage results for doc tests.
-
由 Tyler Mandry 提交于
Account for gaps in def path table during decoding When encoding a proc-macro crate, there may be gaps in the table (since we only encode the crate root and proc-macro items). Account for this by checking if the entry is present, rather than using `unwrap()`
-
由 Tyler Mandry 提交于
Update xsv to prevent random CI failures This fixes occasional proptest failures due to a bug in xsv, which aren't related to bugs in the rust compiler. See https://github.com/rust-lang/rust/pull/79751#issuecomment-740027046 for context.
-
由 Tyler Mandry 提交于
Privatize some of libcore unicode_internals My understanding is that these API are perma unstable, so it doesn't make sense to pollute docs & IDE completion[1] with them. [1]: https://github.com/rust-analyzer/rust-analyzer/issues/6738
-
由 Tyler Mandry 提交于
Remove `first_merge` from liveness debug logs
-
由 Tyler Mandry 提交于
Fix trimming of lint docs Fixes #79748. It was removing all the indentation before. r? `@Mark-Simulacrum`
-
由 Tyler Mandry 提交于
minor stylistic clippy cleanups simplify if let Some(_) = x to if x.is_some() (clippy::redundant_pattern_matching) don't create owned values for comparison (clippy::cmp_owned) use .contains() or .any() instead of find(x).is_some() (clippy::search_is_some) don't wrap code block in Ok() (clipppy::unit_arg)
-
由 The8472 提交于
-
由 The8472 提交于
previously any attempt to copy to an immutable file (EPERM) would disable copy_file_range support for the whole process.
-
由 bors 提交于
Directly use raw pointers in `AtomicPtr` store/load I was unable to find any reason for this limitation in the latest source of LLVM or in the documentation [here](http://llvm.org/docs/Atomics.html#libcalls-atomic). fixes https://github.com/rust-lang/miri/issues/1574
-
由 Guillaume Gomez 提交于
-
由 Vadim Petrochenkov 提交于
-
由 bors 提交于
ext/ucred: Support PID in peer creds on macOS This is a follow-up to https://github.com/rust-lang/rust/pull/75148 (RFC: https://github.com/rust-lang/rust/issues/42839). The original PR used `getpeereid` on macOS and the BSDs, since they don't (generally) support the `SO_PEERCRED` mechanism that Linux supplies. This PR splits the macOS/iOS implementation of `peer_cred()` from that of the BSDs, since macOS supplies the `LOCAL_PEERPID` sockopt as a source of the missing PID. It also adds a `cfg`-gated tests that ensures that platforms with support for PIDs in `UCred` have the expected data.
-
- 09 12月, 2020 15 次提交
-
-
由 bors 提交于
Properly re-use def path hash in incremental mode Fixes #79661 In incremental compilation mode, we update a `DefPathHash -> DefId` mapping every time we create a `DepNode` for a foreign `DefId`. This mapping is written out to the on-disk incremental cache, and is read by the next compilation session to allow us to lazily decode `DefId`s. When we decode a `DepNode` from the current incremental cache, we need to ensure that any previously-recorded `DefPathHash -> DefId` mapping gets recorded in the new mapping that we write out. However, PR #74967 didn't do this in all cases, leading to us being unable to decode a `DefPathHash` in certain circumstances. This PR refactors some of the code around `DepNode` deserialization to prevent this kind of mistake from happening again.
-
由 bors 提交于
Also generate `StorageDead` in constants r? `@EddyB` None of this special casing is actually necessary since we started promoting within constants and statics. We may want to keep some of it around out of perf reasons, but it's not required for user visible behaviour somewhat related: #68622
-
由 oli 提交于
-
由 bors 提交于
remove this weird special case from promotion Promotion has a special case to ignore interior mutability under some specific circumstances. The purpose of this PR is to figure out what changes if we remove that. Since `Cell::new` and friends only get promoted inside `const`/`static` initializers these days, it actually is not easy to exploit this case: you need something like ```rust const TEST_INTERIOR_MUT: () = { // The "0." case is already ruled out by not permitting any interior mutability in `const`. let _val: &'static _ = &(Cell::new(1), 2).1; }; ``` I assume something like `&Some(&(Cell::new(1), 2).1)` would hit the nested case inside `validate_rvalue`... though I am not sure why that would not just trigger nested promotion, first promoting the inner reference and then the outer one? Fixes https://github.com/rust-lang/rust/issues/67534 (by simply rejecting that code^^) r? `@oli-obk` (but for now this is not meant to be merged!) Cc `@rust-lang/wg-const-eval`
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 Ralf Jung 提交于
-
由 bors 提交于
Don't ICE on malformed `rustc_args_required_const` attribute
-
由 bors 提交于
Don't time `emit_ignored_resolution_errors` This printed several hundred lines each time rustdoc was run, almost all of which rounded to 0.000. Since this isn't useful info, don't print it everywhere, so other perf info is easier to read. r? `@Mark-Simulacrum`
-
由 bors 提交于
Use is_write_vectored to optimize the write_vectored implementation for BufWriter In case when the underlying writer does not have an efficient implementation `write_vectored`, the present implementation of `write_vectored` for `BufWriter` may still forward vectored writes directly to the writer depending on the total length of the data. This misses the advantage of buffering, as the actually written slice may be small. Provide an alternative code path for the non-vectored case, where the slices passed to `BufWriter` are coalesced in the buffer before being flushed to the underlying writer with plain `write` calls. The buffer is only bypassed if an individual slice's length is at least as large as the buffer. Remove a FIXME comment referring to #72919 as the issue has been closed with an explanation provided.
-
由 Tomasz Miąsko 提交于
-
由 Tomasz Miąsko 提交于
-
由 Tomasz Miąsko 提交于
-
由 bors 提交于
Compress RWU from at least 32 bits to 4 bits The liveness uses a mixed representation of RWUs based on the observation that most of them have invalid reader and invalid writer. The packed variant uses 32 bits and unpacked 96 bits. Unpacked data contains reader live node and writer live node. Since live nodes are used only to determine their validity, RWUs can always be stored in a packed form with four bits for each: reader bit, writer bit, used bit, and one extra padding bit to simplify packing and unpacking operations.
-
由 Matthias Krüger 提交于
-