- 10 12月, 2020 10 次提交
-
-
由 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)
-
由 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 17 次提交
-
-
由 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 提交于
-
由 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 提交于
-
由 Matthias Krüger 提交于
-
由 Matthias Krüger 提交于
-
由 Matthias Krüger 提交于
-
由 Aaron Hill 提交于
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()`
-
- 08 12月, 2020 13 次提交
-
-
由 LingMan 提交于
Using an `if` seems like a better semantic fit and saves a few lines.
-
由 bors 提交于
Replace simple `if let` constructs with Option::map Replaces a few constructs of the form ``` if let Some(x) = var { Some(...) } else { None } ``` with calls to `Option::map`. `@rustbot` modify labels +C-cleanup +T-compiler
-
由 LingMan 提交于
-
由 bors 提交于
Visit ForeignItems when marking dead code Follow-up to #79318 r? `@lcnr`
-
由 bors 提交于
Fixup: `filter().is_none()` -> `!any()`
-
由 Camille GILLOT 提交于
-
由 bors 提交于
Add a regression test for issue-66286 Fixes #66422
-
由 bors 提交于
Update cargo 10 commits in 63d0fe43449adcb316d34d98a982b597faca4178..d274fcf862b89264fa2c6b917b15230705257317 2020-12-02 01:44:30 +0000 to 2020-12-07 23:08:44 +0000 - Clarify cargo manifest edition field docs (rust-lang/cargo#8953) - Run rustdoc doctests relative to the workspace (rust-lang/cargo#8954) - Workaround fs issue in `cargo publish`. (rust-lang/cargo#8950) - Fix panic with -Zbuild-std and no roots. (rust-lang/cargo#8942) - Slightly optimize `cargo vendor` (rust-lang/cargo#8937) - Fixes rust-lang/cargo#8783 , cargo new fails without a author name or email (rust-lang/cargo#8912) - Fix test escaping __CARGO_TEST_ROOT (rust-lang/cargo#8929) - Add period to allowed feature name characters. (rust-lang/cargo#8932) - faq: small fixes (rust-lang/cargo#8931) - Fix semver documentation tests. (rust-lang/cargo#8930)
-
由 Eric Huss 提交于
-
由 Rich Kadel 提交于
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.
-
由 LingMan 提交于
Replaces a few constructs of the form if let Some(x) = var { Some(...) } else { None } with calls to Option::map.
-
由 bors 提交于
Use `summary_opts()` in another spot I added `summary_opts()` before I cut the branch for #77686 (2 months ago!), so this "slipped through the cracks".
-
由 bors 提交于
Validate naked functions definitions Validate that naked functions are defined in terms of a single inline assembly block that uses only `const` and `sym` operands and has `noreturn` option. Implemented as future incompatibility lint with intention to migrate it into hard error. When it becomes a hard error it will ensure that naked functions are either unsafe or contain an unsafe block around the inline assembly. It will guarantee that naked functions do not reference functions parameters (obsoleting part of existing checks from #79411). It will limit the definitions of naked functions to what can be reliably supported. It will also reject naked functions implemented using legacy LLVM style assembly since it cannot satisfy those conditions. https://github.com/rust-lang/rfcs/pull/2774 https://github.com/rust-lang/rfcs/pull/2972
-