- 01 2月, 2021 1 次提交
-
-
由 Eric Huss 提交于
-
- 31 1月, 2021 1 次提交
-
-
由 bors 提交于
clashing_extern_declarations: Use symbol interning to avoid string alloc. Use symbol interning as a hack to avoid allocating a string for every symbol name we store in the seen set. This hopefully addresses the minor perf regression described in https://github.com/rust-lang/rust/pull/80009#issuecomment-763526902. r? `@nagisa`
-
- 30 1月, 2021 27 次提交
-
-
由 bors 提交于
Rollup of 16 pull requests Successful merges: - #79023 (Add `core::stream::Stream`) - #80562 (Consider Scalar to be a bool only if its unsigned) - #80886 (Stabilize raw ref macros) - #80959 (Stabilize `unsigned_abs`) - #81291 (Support FRU pattern with `[feature(capture_disjoint_fields)]`) - #81409 (Slight simplification of chars().count()) - #81468 (cfg(version): treat nightlies as complete) - #81473 (Warn write-only fields) - #81495 (rustdoc: Remove unnecessary optional) - #81499 (Updated Vec::splice documentation) - #81501 (update rustfmt to v1.4.34) - #81505 (`fn cold_path` doesn't need to be pub) - #81512 (Add missing variants in match binding) - #81515 (Fix typo in pat.rs) - #81519 (Don't print error output from rustup when detecting default build triple) - #81520 (Don't clone LLVM submodule when download-ci-llvm is set) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 bors 提交于
Update dist-various to Ubuntu 20.04 This updates the dist-various-1 and dist-various-2 images to Ubuntu 20.04. This requires some adjustments: * `DEBIAN_FRONTEND=noninteractive` required for apt install. * `team-gcc-argm-embedded` PPA does not support focal. However, we can simply use the distro-provided `gcc-arm-none-eabi`. Per the comment, the PPA was only used to get a newer version. * rumprun has to be updated to avoid a linker error. * We need to build rumrun with `NOGCCERROR`, which disables use of `-Werror` and allows building with a newer compiler. * We need to install `libtinfo5`, which appears to be a dependency of the clang used during the fuchsia build. * We need to switch to `g++-8` rather than `g++-7`, as at least `g++-7-arm-linux-gnueabi` is not available on focal. * We need to upgrade to GCC 6.5 for the Solaris build, as GCC 6.4 does not support the newer libisl version. r? `@Mark-Simulacrum`
-
由 Yuki Okushi 提交于
Don't clone LLVM submodule when download-ci-llvm is set Previously, `downloading_llvm` would check `self.build` while it was still an empty string, and think it was always false. This fixes the check. This addresses the worst part of https://github.com/rust-lang/rust/issues/76653. There are still some large submodules being downloaded (in particular, `rustc-by-example` is 146 MB, and all the submodules combined are 311 MB), but this is a lot better than the whopping 1.4 GB before.
-
由 Yuki Okushi 提交于
Don't print error output from rustup when detecting default build triple Before, it could print this error if no toolchain was configured: ``` error: no default toolchain configured error: backtrace: error: stack backtrace: 0: error_chain::backtrace::imp::InternalBacktrace::new 1: rustup::config::Cfg::toolchain_for_dir 2: rustup_init::run_rustup_inner 3: rustup_init::main 4: std::rt::lang_start::{{closure}} 5: main 6: __libc_start_main 7: _start ```
-
由 Yuki Okushi 提交于
Fix typo in pat.rs parentesized -> parenthesized
-
由 Yuki Okushi 提交于
Add missing variants in match binding cc `````@bugadani````` `````@CraftSpider````` r? `````@camelid`````
-
由 Yuki Okushi 提交于
`fn cold_path` doesn't need to be pub Fixes #81429 Note: this PR also fixes a small typo that I found
-
由 Yuki Okushi 提交于
update rustfmt to v1.4.34 Short summary: Various formatting fixes (several const generic related) and introduction of `imports_granularity` config option Long summary copied from changelog: #### Changed - `merge_imports` configuration has been deprecated in favor of the new `imports_granularity` option. Any existing usage of `merge_imports` will be automatically mapped to the corresponding value on `imports_granularity` with a warning message printed to encourage users to update their config files. #### Added - New `imports_granularity` option has been added which succeeds `merge_imports`. This new option supports several additional variants which allow users to merge imports at different levels (crate or module), and even flatten imports to have a single use statement per item. ([PR rust-lang/rustfmt#4634](https://github.com/rust-lang/rustfmt/pull/4634), [PR rust-lang/rustfmt#4639](https://github.com/rust-lang/rustfmt/pull/4639)) See the section on the configuration site for more information https://rust-lang.github.io/rustfmt/?version=v1.4.33&search=#imports_granularity #### Fixed - Fix erroneous removal of `const` keyword on const trait impl ([rust-lang/rustfmt#4084](https://github.com/rust-lang/rustfmt/issues/4084)) - Fix incorrect span usage wit const generics in supertraits ([rust-lang/rustfmt#4204](https://github.com/rust-lang/rustfmt/issues/4204)) - Use correct span for const generic params ([rust-lang/rustfmt#4263](https://github.com/rust-lang/rustfmt/issues/4263)) - Correct span on const generics to include type bounds ([rust-lang/rustfmt#4310](https://github.com/rust-lang/rustfmt/issues/4310)) - Idempotence issue on blocks containing only empty statements ([rust-lang/rustfmt#4627](https://github.com/rust-lang/rustfmt/issues/4627) and [#3868](https://github.com/rust-lang/rustfmt/issues/3868)) - Fix issue with semicolon placement on required functions that have a trailing comment that ends in a line-style comment before the semicolon ([rust-lang/rustfmt#4646](https://github.com/rust-lang/rustfmt/issues/4646)) - Avoid shared interned cfg_if symbol since rustfmt can re-initialize the rustc_ast globals on multiple inputs ([rust-lang/rustfmt#4656](https://github.com/rust-lang/rustfmt/issues/4656)) - Don't insert trailing comma on (base-less) rest in struct literals within macros ([rust-lang/rustfmt#4675](https://github.com/rust-lang/rustfmt/issues/4675))
-
由 Yuki Okushi 提交于
Updated Vec::splice documentation Replacing with equal number of values does not increase the length of the vec. Reference: https://stackoverflow.com/a/62559271/3990767
-
由 Yuki Okushi 提交于
rustdoc: Remove unnecessary optional Previously, the HTML output format was represented by both `Some(OutputFormat::Html)` and `None` so there's no need to have an optional. Instead, `OutputFormat::Html` is explicitly the default and we no longer have a "tri-state enum". r? `````@GuillaumeGomez`````
-
由 Yuki Okushi 提交于
Warn write-only fields cc `@Boscop's` example in #49256.
-
由 Yuki Okushi 提交于
cfg(version): treat nightlies as complete This PR makes cfg(version) treat the nightlies for version 1.n.0 as 1.n.0, even though that nightly version might not have all stabilizations and features of the released 1.n.0. This is done for greater convenience for people who want to test a newly stabilized feature on nightly, or in other words, give newly stabilized features as many eyeballs as possible. For users who wish to pin nightlies, this commit adds a -Z assume-incomplete-release option that they can enable if they run into any issues due to this change. Implements the suggestion in https://github.com/rust-lang/rust/issues/64796#issuecomment-640851454
-
由 Yuki Okushi 提交于
Slight simplification of chars().count() Slight simplification: No need to call len(), we can just count the number of non continuation bytes. I can't see any reason not to do this, can you?
-
由 Yuki Okushi 提交于
Rollup merge of #81291 - sexxi-goose:fix-struct-update-functional-record-update-syntax-error, r=nikomatsakis Support FRU pattern with `[feature(capture_disjoint_fields)]` In case of a functional record update syntax for creating a structure, `ExprUseVisitor` to only detect the precise use of some of the field in the `..x` part of the syntax. However, when we start building MIR, we 1. First, build the place for `x` 2. and then, add precise field projections so that only some parts of `x` end up getting read. When `capture_disjoint_fields` is enabled, and FRU is used within a closure `x` won't be completely captured, and therefore the first step will fail. This PR updates `mir_build` to create a place builder in the first step and then create place from the builder only after applying the field projection. Closes https://github.com/rust-lang/project-rfc-2229/issues/32 r? ``````@nikomatsakis``````
-
由 Yuki Okushi 提交于
Stabilize `unsigned_abs` Resolves #74913. This PR stabilizes the `i*::unsigned_abs()` method, which returns the absolute value of an integer _as its unsigned equivalent_. This has the advantage that it does not overflow on `i*::MIN`. I have gone ahead and used this in a couple locations throughout the repository.
-
由 Yuki Okushi 提交于
Stabilize raw ref macros This stabilizes `raw_ref_macros` (https://github.com/rust-lang/rust/issues/73394), which is possible now that https://github.com/rust-lang/rust/issues/74355 is fixed. However, as I already said in https://github.com/rust-lang/rust/issues/73394#issuecomment-751342185, I am not particularly happy with the current names of the macros. So I propose we also change them, which means I am proposing to stabilize the following in `core::ptr`: ```rust pub macro const_addr_of($e:expr) { &raw const $e } pub macro mut_addr_of($e:expr) { &raw mut $e } ``` The macro name change means we need another round of FCP. Cc `````@rust-lang/libs````` Fixes #73394
-
由 Yuki Okushi 提交于
Consider Scalar to be a bool only if its unsigned This seems right, given that conceptually bools are unsigned, but the implications of this change may have more action at distance that I'm not sure how to exhaustively consider. For instance there are a number of cases where code attaches range metadata if `scalar.is_bool()` holds. Supposedly it would no longer be attached to the `repr(i8)` enums? Though I'm not sure why booleans are being special-cased here in the first place... Fixes #80556 cc `@EddyB`
-
由 Yuki Okushi 提交于
Add `core::stream::Stream` [[Tracking issue: #79024](https://github.com/rust-lang/rust/issues/79024)] This patch adds the `core::stream` submodule and implements `core::stream::Stream` in accordance with [RFC2996](https://github.com/rust-lang/rfcs/pull/2996). The RFC hasn't been merged yet, but as requested by the libs team in https://github.com/rust-lang/rfcs/pull/2996#issuecomment-725696389 I'm filing this PR to get the ball rolling. ## Documentatation The docs in this PR have been adapted from [`std::iter`](https://doc.rust-lang.org/std/iter/index.html), [`async_std::stream`](https://docs.rs/async-std/1.7.0/async_std/stream/index.html), and [`futures::stream::Stream`](https://docs.rs/futures/0.3.8/futures/stream/trait.Stream.html). Once this PR lands my plan is to follow this up with PRs to add helper methods such as `stream::repeat` which can be used to document more of the concepts that are currently missing. That will allow us to cover concepts such as "infinite streams" and "laziness" in more depth. ## Feature gate The feature gate for `Stream` is `stream_trait`. This matches the `#[lang = "future_trait"]` attribute name. The intention is that only the APIs defined in RFC2996 will use this feature gate, with future additions such as `stream::repeat` using their own feature gates. This is so we can ensure a smooth path towards stabilizing the `Stream` trait without needing to stabilize all the APIs in `core::stream` at once. But also don't start expanding the API until _after_ stabilization, as was the case with `std::future`. __edit:__ the feature gate has been changed to `async_stream` to match the feature gate proposed in the RFC. ## Conclusion This PR introduces `core::stream::{Stream, Next}` and re-exports it from `std` as `std::stream::{Stream, Next}`. Landing `Stream` in the stdlib has been a mult-year process; and it's incredibly exciting for this to finally happen! --- r? `````@KodrAus````` cc/ `````@rust-lang/wg-async-foundations````` `````@rust-lang/libs`````
-
由 bors 提交于
Update Python and Clang on x86 dist images LLVM 12 no longer builds with Python 2, so install Python 3 in preparation for the upgrade (#81451). However, Clang 10 does not build with Python 3, so we need update to Clang 11 as well, which supports both. Unfortunately, doing so results in errors while linking the libLLVM.so into other binaries: > __morestack: invalid needed version 2 This is fixed by using LLD instead. Possibly this is due to a binutils linker bug, but updating to the latest binutils version does not fix it. r? `@Mark-Simulacrum` cc `@cuviper`
-
由 bors 提交于
rustdoc tweaking * Reuse memory * simplify `next_def_id`, avoid multiple hashing and unnecessary lookups * remove `all_fake_def_ids`, use the global map instead (probably not a good step toward parallelization, though...) * convert `add_deref_target` to iterative implementation * use `ArrayVec` where we know the max number of elements * minor touchups here and there * avoid building temporary vectors that get appended to other vectors At most places I may or may not be doing the compiler's job is this PR.
-
由 bors 提交于
* Reuse memory * simplify `next_def_id`, avoid multiple hashing and unnecessary lookups * remove `all_fake_def_ids`, use the global map instead (probably not a good step toward parallelization, though...) * convert `add_deref_target` to iterative implementation * use `ArrayVec` where we know the max number of elements * minor touchups here and there * avoid building temporary vectors that get appended to other vectors At most places I may or may not be doing the compiler's job is this PR.
-
由 Simonas Kazlauskas 提交于
This seems right, given that conceptually bools are unsigned, but the implications of this change may have more action at distance that I'm not sure how to exhaustively consider. For instance there are a number of cases where code attaches range metadata if `scalar.is_bool()` holds. Supposedly it would no longer be attached to the `repr(i8)` enums? Though I'm not sure why booleans are being special-cased here in the first place... Fixes #80556
-
由 bors 提交于
update Miri Fixes https://github.com/rust-lang/rust/issues/81467 Cc `@rust-lang/miri` r? `@ghost`
-
由 Ralf Jung 提交于
-
由 Nikita Popov 提交于
This updates the dist-various-1 and dist-various-2 images to Ubuntu 20.04. This requires some adjustments: * `DEBIAN_FRONTEND=noninteractive` required for apt install. * `team-gcc-argm-embedded` PPA does not support focal. However, we can simply use the distro-provided `gcc-arm-none-eabi`. Per the comment, the PPA was only used to get a newer version. * rumprun has to be updated to avoid a linker error. * We need to build rumrun with `NOGCCERROR`, which disables use of `-Werror` and allows building with a newer compiler. * We need to install `libtinfo5`, which appears to be a dependency of the clang used during the fuchsia build. * We need to switch to `g++-8` rather than `g++-7`, as at least `g++-7-arm-linux-gnueabi` is not available on focal. * We need to upgrade to GCC 6.5 for the Solaris build, as GCC 6.4 does not support the newer libisl version.
-
由 Joshua Nelson 提交于
Previously, `downloading_llvm` would check `self.build` while it was still an empty string, and think it was always false. This fixes the check.
-
由 Joshua Nelson 提交于
Before, it could print this error if no toolchain was configured: ``` error: no default toolchain configured error: backtrace: error: stack backtrace: 0: error_chain::backtrace::imp::InternalBacktrace::new 1: rustup::config::Cfg::toolchain_for_dir 2: rustup_init::run_rustup_inner 3: rustup_init::main 4: std::rt::lang_start::{{closure}} 5: main 6: __libc_start_main 7: _start ```
-
- 29 1月, 2021 11 次提交
-
-
由 Ikko Ashimine 提交于
parentesized -> parenthesized
-
由 Ralf Jung 提交于
-
由 bors 提交于
Avoid memory allocation when removing dead blocks Use `reachable_as_bitset` to reuse a bitset from the traversal rather than allocating it seprately. Additionally check if there are any unreachable blocks before proceeding.
-
由 Guillaume Gomez 提交于
-
由 Henry Boisdequin 提交于
-
由 bors 提交于
Pre-canoncalize ExternLocation::ExactPaths This stores pre-canacolized paths inside `ExternLocation::ExactPaths` so that we don't need to canoncalize them every time we want to compare them to source lib paths. This is related to #81414.
-
由 Ryan Levick 提交于
-
由 Henry Boisdequin 提交于
-
由 est31 提交于
-
由 est31 提交于
This commit makes cfg(version) treat the nightlies for version 1.n.0 as 1.n.0, even though that nightly version might not have all stabilizations and features of the released 1.n.0. This is done for greater convenience for people who want to test a newly stabilized feature on nightly. For users who wish to pin nightlies, this commit adds a -Z assume-incomplete-release option that they can enable if there are any issues due to this change.
-
由 bors 提交于
Visit only statements in always live locals No functional changes intended.
-