-
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 11 pull requests #69056
Rollup of 11 pull requests #69056
Commits on Feb 2, 2020
-
Don't requery the param_env of a union
Union fields have the ParamEnv of the union.
Configuration menu - View commit details
-
Copy full SHA for 91cf0e7 - Browse repository at this point
Copy the full SHA 91cf0e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 570c161 - Browse repository at this point
Copy the full SHA 570c161View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3973322 - Browse repository at this point
Copy the full SHA 3973322View commit details -
* Handle cycles in `needs_drop` correctly * Normalize types when computing `needs_drop` * Move queries from rustc to rustc_ty
Configuration menu - View commit details
-
Copy full SHA for d196521 - Browse repository at this point
Copy the full SHA d196521View commit details -
* Handle arrays with const-generic lengths * Use closure for repeated code.
Configuration menu - View commit details
-
Copy full SHA for d20646b - Browse repository at this point
Copy the full SHA d20646bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 465b862 - Browse repository at this point
Copy the full SHA 465b862View commit details
Commits on Feb 6, 2020
-
Avoid instantiating many
Parser
structs ingeneric_extension
.Currently, every iteration of the main loop in `generic_extension` instantiates a `Parser`, which is expensive because `Parser` is a large type. Many of those instantiations are only used immutably, particularly for simple-but-repetitive macros of the sort seen in `html5ever` and PR 68836. This commit initializes a single "base" parser outside the loop, and then uses `Cow` to avoid cloning it except for the mutating iterations. This speeds up `html5ever` runs by up to 15%.
Configuration menu - View commit details
-
Copy full SHA for 6bf2cc2 - Browse repository at this point
Copy the full SHA 6bf2cc2View commit details -
Remove the
Cow
fromDirectory
.The previous commit wrapped `Parser` within a `Cow` for the hot macro parsing path. As a result, there's no need for the `Cow` within `Directory`, because it lies within `Parser`.
Configuration menu - View commit details
-
Copy full SHA for f840a95 - Browse repository at this point
Copy the full SHA f840a95View commit details -
Change condition ordering in
parse_tt
.This is a small win, because `Failure` is much more common than `Success`.
Configuration menu - View commit details
-
Copy full SHA for 2a13b24 - Browse repository at this point
Copy the full SHA 2a13b24View commit details
Commits on Feb 8, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 3998249 - Browse repository at this point
Copy the full SHA 3998249View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19aaf63 - Browse repository at this point
Copy the full SHA 19aaf63View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ce8d2b - Browse repository at this point
Copy the full SHA 6ce8d2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for adde3d4 - Browse repository at this point
Copy the full SHA adde3d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60889d4 - Browse repository at this point
Copy the full SHA 60889d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e30dd86 - Browse repository at this point
Copy the full SHA e30dd86View commit details -
Configuration menu - View commit details
-
Copy full SHA for f38e270 - Browse repository at this point
Copy the full SHA f38e270View commit details -
Configuration menu - View commit details
-
Copy full SHA for d366343 - Browse repository at this point
Copy the full SHA d366343View commit details -
Configuration menu - View commit details
-
Copy full SHA for a53f45f - Browse repository at this point
Copy the full SHA a53f45fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d04b95 - Browse repository at this point
Copy the full SHA 8d04b95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85e3661 - Browse repository at this point
Copy the full SHA 85e3661View commit details -
Configuration menu - View commit details
-
Copy full SHA for 814aa06 - Browse repository at this point
Copy the full SHA 814aa06View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b10fc4 - Browse repository at this point
Copy the full SHA 9b10fc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77d158d - Browse repository at this point
Copy the full SHA 77d158dView commit details
Commits on Feb 9, 2020
-
Apply suggestions from code review
Co-Authored-By: varkor <github@varkor.com>
Configuration menu - View commit details
-
Copy full SHA for 3eb5241 - Browse repository at this point
Copy the full SHA 3eb5241View commit details -
Configuration menu - View commit details
-
Copy full SHA for 842938a - Browse repository at this point
Copy the full SHA 842938aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 202d401 - Browse repository at this point
Copy the full SHA 202d401View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28f85c6 - Browse repository at this point
Copy the full SHA 28f85c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d2f6ae - Browse repository at this point
Copy the full SHA 7d2f6aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae23f70 - Browse repository at this point
Copy the full SHA ae23f70View commit details
Commits on Feb 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b434d7e - Browse repository at this point
Copy the full SHA b434d7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddb050 - Browse repository at this point
Copy the full SHA 1ddb050View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6c5a04 - Browse repository at this point
Copy the full SHA d6c5a04View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8893df - Browse repository at this point
Copy the full SHA b8893dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e78ce0 - Browse repository at this point
Copy the full SHA 9e78ce0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75afd0b - Browse repository at this point
Copy the full SHA 75afd0bView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc3ecb2 - Browse repository at this point
Copy the full SHA fc3ecb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d79921 - Browse repository at this point
Copy the full SHA 8d79921View commit details -
Configuration menu - View commit details
-
Copy full SHA for 25de80a - Browse repository at this point
Copy the full SHA 25de80aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 97d1f8d - Browse repository at this point
Copy the full SHA 97d1f8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53b16fb - Browse repository at this point
Copy the full SHA 53b16fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for c561d23 - Browse repository at this point
Copy the full SHA c561d23View commit details -
Configuration menu - View commit details
-
Copy full SHA for c38b4b6 - Browse repository at this point
Copy the full SHA c38b4b6View commit details
Commits on Feb 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 6575abc - Browse repository at this point
Copy the full SHA 6575abcView commit details -
Rollup merge of #68679 - matthewjasper:needs-type-op, r=varkor
Improve `ty.needs_drop` * Handle cycles in `needs_drop` correctly * Normalize types when computing `needs_drop` * Move queries from rustc to rustc_ty * Avoid query in simple cases reopens #65918
Configuration menu - View commit details
-
Copy full SHA for 98b3d21 - Browse repository at this point
Copy the full SHA 98b3d21View commit details -
Rollup merge of #68848 - nnethercote:hasten-macro-parsing, r=petroche…
…nkov Hasten macro parsing r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 2125b06 - Browse repository at this point
Copy the full SHA 2125b06View commit details -
Rollup merge of #68947 - chrissimpkins:python-fmt, r=alexcrichton
Python script PEP8 style guide space formatting and minor Python source cleanup This PR includes the following changes in the Python sources based on a flake8 3.7.9 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.6 on Darwin lint: - PEP8 style guide spacing updates *without* line length changes - removal of unused local variable assignments in context managers and exception handling - removal of unused Python import statements - removal of unnecessary semicolons
Configuration menu - View commit details
-
Copy full SHA for 7b4772a - Browse repository at this point
Copy the full SHA 7b4772aView commit details -
Rollup merge of #69002 - RalfJung:miri-op-overflow, r=oli-obk,wesleyw…
…iser miri: improve and simplify overflow detection This simplifies the overflow detection for signed binary operators, and adds overflow detection to unary operators so that const-prop doesn't have to crudely hand-roll that. It also fixes some bugs in the operator implementation that however, I think, were not observable. r? @oli-obk @wesleywiser
Configuration menu - View commit details
-
Copy full SHA for 98e8d78 - Browse repository at this point
Copy the full SHA 98e8d78View commit details -
Rollup merge of #69022 - ljedrz:traits_tweak_vecs, r=petrochenkov
traits: preallocate 2 Vecs of known initial size The 2 preallocations are pretty obvious; both vectors will be as big as or larger than the collections they are created from. In `WfPredicates::normalize` the change from a functional style improves readability and should be perf-friendly, too.
Configuration menu - View commit details
-
Copy full SHA for cede9c1 - Browse repository at this point
Copy the full SHA cede9c1View commit details -
Rollup merge of #69026 - TimDiekmann:common-usage, r=Amanieu
Remove common usage pattern from `AllocRef` This removes the common usage patterns from `AllocRef`: - `alloc_one` - `dealloc_one` - `alloc_array` - `realloc_array` - `dealloc_array` Actually, they add nothing to `AllocRef` except a [convenience wrapper around `Layout` and other methods in this trait](https://doc.rust-lang.org/1.41.0/src/core/alloc.rs.html#1076-1240) but have a major flaw: The documentation of `AllocRefs` notes, that > some higher-level allocation methods (`alloc_one`, `alloc_array`) are well-defined on zero-sized types and can optionally support them: it is left up to the implementor whether to return `Err`, or to return `Ok` with some pointer. With the current API, `GlobalAlloc` does not have those methods, so they cannot be overridden for `liballoc::Global`, which means that even if the global allocator would support zero-sized allocations, `alloc_one`, `alloc_array`, and `realloc_array` for `liballoc::Global` will error, while calling `alloc` with a zeroed-size `Layout` could succeed. Even worse: allocating with `alloc` and deallocating with `dealloc_{one,array}` could end up with not calling `dealloc` at all! For the full discussion please see rust-lang/wg-allocators#18 r? @Amanieu
Configuration menu - View commit details
-
Copy full SHA for fc25e05 - Browse repository at this point
Copy the full SHA fc25e05View commit details -
Rollup merge of #69027 - TimDiekmann:zeroed-alloc, r=Amanieu
Add missing `_zeroed` varants to `AllocRef` The majority of the allocator wg has decided to add the missing `_zeroed` variants to `AllocRef`: > these should be added since they can be efficiently implemented with the `mremap` system call on Linux. `mremap` allows you to move/grow/shrink a memory mapping, and any new pages added for growth are guaranteed to be zeroed. > > If `AllocRef` does not have these methods then the user will have to manually write zeroes to the added memory since the API makes no guarantees on their contents. For the full discussion please see rust-lang/wg-allocators#14. This PR provides default implementations for `realloc_zeroed`, `alloc_excess_zeroed`, `realloc_excess_zeroed`, and `grow_in_place_zeroed`. r? @Amanieu
Configuration menu - View commit details
-
Copy full SHA for 9e72cc8 - Browse repository at this point
Copy the full SHA 9e72cc8View commit details -
Rollup merge of #69031 - Centril:dyntest, r=eddyb
Use `dyn Trait` more in tests Here are some tests using the old trait object type syntax which are not testing the syntax itself. This has been extracted from #66364.
Configuration menu - View commit details
-
Copy full SHA for ff8d628 - Browse repository at this point
Copy the full SHA ff8d628View commit details -
Rollup merge of #69032 - chrissimpkins:ice-yield-println-#69017, r=pe…
…trochenkov ICE in nightly-2020-02-08: handle TerminatorKind::Yield in librustc_mir::transform::promote_consts::Validator method IR: #69017 regressed commit: f8fd462 Source: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=55e65a869e1f5fef64cc4462b1a5a087 Addresses ICE reported in #69017 by handling `TerminatorKind::Yield` in https://github.com/rust-lang/rust/blob/4d1241f5158ffd66730e094d8f199ed654ed52ae/src/librustc_mir/transform/promote_consts.rs#L465-L468. <details><summary>Nightly build</summary> <p> ``` $ cargo +nightly build Compiling yielder v0.1.0 (/Users/chris/Desktop/tests/rustlang-tests/yielder) error: internal compiler error: src/librustc_mir/transform/promote_consts.rs:467: _1 = suspend(move _21) -> [resume: bb2, drop: bb3] not promotable --> src/main.rs:8:27 | 8 | println!("-> {}", yield); | ^^^^^ thread 'rustc' panicked at 'Box<Any>', <::std::macros::panic macros>:2:4 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.43.0-nightly (71c7e14 2020-02-09) running on x86_64-apple-darwin note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin note: some of the compiler flags provided by cargo are hidden error: aborting due to previous error error: could not compile `yielder`. To learn more, run the command again with --verbose. ``` </p> </details> <details><summary>Stage 1 dev build</summary> <p> ``` $ cargo +stage1 build Compiling yielder v0.1.0 (/Users/chris/Desktop/tests/rustlang-tests/yielder) warning: function is never used: `gen` --> src/main.rs:6:4 | 6 | fn gen() -> impl Generator<usize> { | ^^^ | = note: `#[warn(dead_code)]` on by default Finished dev [unoptimized + debuginfo] target(s) in 0.53s ``` </p> </details> @jonas-schievink @oli-obk
Configuration menu - View commit details
-
Copy full SHA for 3cf7cd8 - Browse repository at this point
Copy the full SHA 3cf7cd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fcb1a3 - Browse repository at this point
Copy the full SHA 8fcb1a3View commit details -
Rollup merge of #69047 - ehuss:rustfmt-vendor, r=Centril
Don't rustfmt check the vendor directory. I need to be able to run `x.py tidy` to do license checks (which requires vendored dependencies). However, when vendoring is enabled, it wants to rustfmt check the entire vendor directory, which doesn't work.
Configuration menu - View commit details
-
Copy full SHA for 4f1f2b5 - Browse repository at this point
Copy the full SHA 4f1f2b5View commit details