forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Sync with rust-lang/rust master branch #21
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also document `ast::Pat::walk`.
Fuse `parse_top_pat` and `parse_top_pat_unpack` into just `parse_top_pat`.
Introduces a temporary hack to keep `Vec<P<Pat>>` in `hir::Arm.pats` so that we keep the changes more incremental.
Previously the build would take the presence of the LLVM_CONFIG envvar to mean that the sanitizers should be built, but this is a common envvar that could be set for reasons unrelated to the rustc sanitizers. This commit adds a new envvar RUSTC_BUILD_SANITIZERS and uses it instead.
Extend Polonius fact generation for (some) move tracking This PR will extend rustc to emit facts used for tracking moves and initialization in Polonius. It is most likely the final part of my master's thesis work.
Use unicode-xid crate instead of libcore This PR proposes to remove `char::is_xid_start` and `char::is_xid_continue` functions from `libcore` and use `unicode_xid` crate from crates.io (note that this crate is already present in rust-lang/rust's Cargo.lock). Reasons to do this: * removing rustc-binary-specific stuff from libcore * making sure that, across the ecosystem, there's a single definition of what rust identifier is (`unicode-xid` has almost 10 million downs, as a `proc_macro2` dependency) * making it easier to share `rustc_lexer` crate with rust-analyzer: no need to `#[cfg]` if we are building as a part of the compiler Reasons not to do this: * increased maintenance burden: we'll need to upgrade unicode version both in libcore and in unicode-xid. However, this shouldn't be a too heavy burden: just running `./unicode.py` after new unicode version. I (@matklad) am ready to be a t-compiler side maintainer of unicode-xid. Moreover, given that xid-unicode is an important dependency of syn, *someone* needs to maintain it anyway. * xid-unicode implementation is significantly slower. It uses a more compact table with binary search, instead of a trie. However, this shouldn't matter in practice, because we have fast-path for ascii anyway, and code size savings is a plus. Moreover, in #59706 not using libcore turned out to be *faster*, presumably beacause checking for whitespace with match is even faster. <details> <summary>old description</summary> Followup to #59706 r? @eddyb Note that this doesn't actually remove tables from libcore, to avoid conflict with #62641. cc unicode-rs/unicode-xid#11 </details>
Upgrade rand to 0.7 Also upgrades `getrandom` to avoid bug encountered by #61393 which bumps libc to `0.2.62`.
…henkov Always emit unresolved import errors and hide unused import lint Fix #63724. r? @petrochenkov
Bump RLS and Rustfmt submodules to use rustc-ap-* v583 Closes #64180 Closes #64179 r? @topecongiro
Update LLVM submodule Updates the LLVM submodule to current LLVM 9 HEAD. Fixes #63918. Fixes #63791. r? @alexcrichton
Update version of `rustc-std-workspace-*` crates This commit updates the version of the `rustc-std-workspace-*` crates in-tree which are used in `[patch]`. This will guarantee that Cargo will select these versions even if minor updates are published to crates.io because otherwise a newer version on crates.io would be preferred which misses the point of `[patch]`!
Rollup of 5 pull requests Successful merges: - #63806 (Upgrade rand to 0.7) - #64054 (Always emit unresolved import errors and hide unused import lint) - #64279 (Bump RLS and Rustfmt submodules to use rustc-ap-* v583) - #64317 (Update LLVM submodule) - #64320 (Update version of `rustc-std-workspace-*` crates) Failed merges: r? @ghost
This better aligns with Cargo (CARGO_LOG) and rustc (RUSTC_LOG).
On architectures such as powerpc64 that use extend_integer_width_to in their C ABI processing, integer parameters shorter than the native register width will be annotated with the ArgAttribute::SExt or ArgAttribute::ZExt attribute, and that attribute will be included in the generated LLVM IR. In this test, all relevant parameters are `i32`, which will get the `signext` annotation on the relevant 64-bit architectures. Match both the annotated and non-annotated case, but enforce that the annotation is applied consistently.
Update clippy Closes #64215 r? @Manishearth cc @oli-obk
Update miri submodule fixes #64244
update reference r? @Centril
…crichton Always show backtrace on Fuchsia r? @alexcrichton cc @JakeEhrlich
Switch rustdoc logging to RUSTDOC_LOG This better aligns with Cargo (CARGO_LOG) and rustc (RUSTC_LOG). Fixes #64309 r? @GuillaumeGomez
This commit changes the HIR lowering around `await` so that temporary lifetimes are extended. Previously, await was lowered as: ```rust { let mut pinned = future; loop { match ::std::future::poll_with_tls_context(unsafe { <::std::pin::Pin>::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result, ::std::task::Poll::Pending => {} } yield (); } } ``` With this commit, await is lowered as: ```rust match future { mut pinned => loop { match ::std::future::poll_with_tls_context(unsafe { <::std::pin::Pin>::new_unchecked(&mut pinned) }) { ::std::task::Poll::Ready(result) => break result, ::std::task::Poll::Pending => {} } yield (); } } ``` However, this change has the following side-effects: - All temporaries in future will be considered to live across a yield for the purpose of auto-traits. - Borrowed temporaries in future are likely to be considered to be live across the yield for the purpose of the generator transform. Signed-off-by: David Wood <david@davidtw.co>
Allow cross-compiling doctests This PR allows doctest to receive a --runtool argument, as well as possibly many --runtool-arg arguments, which are then used to run cross compiled doctests. Also, functionality has been added to rustdoc to allow it to skip testing doctests on a per-target basis, in the same way that compiletest does it. For example, tagging the doctest with "ignore-sgx" disables testing on any targets that contain "sgx". A plain "ignore" still skips testing on all targets. See [here](rust-lang/cargo#6892) for the companion PR in the cargo project that extends functionality in Cargo so that it passes the appropriate parameters to rustdoc when cross compiling and testing doctests. Part of [#6460](rust-lang/cargo#6460)
Make `abs`, `wrapping_abs`, `overflowing_abs` const functions This makes `abs`, `wrapping_abs` and `overflowing_abs` const functions like #58044 makes `wrapping_neg` and `overflowing_neg` const functions. `abs` is made const by returning `(self ^ -1) - -1` = `!self + 1` = `-self` for negative numbers and `(self ^ 0) - 0` = `self` for non-negative numbers. The subexpression `self >> ($BITS - 1)` evaluates to `-1` for negative numbers and `0` otherwise. The subtraction overflows when `self` is `min_value()`, as we would be subtracting `max_value() - -1`; this is when `abs` should overflow. `wrapping_abs` and `overflowing_abs` make use of `wrapping_sub` and `overflowing_sub` instead of the subtraction operator.
Add Yaah to clippy toolstain notification list
test/c-variadic: Fix patterns on powerpc64 On architectures such as powerpc64 that use extend_integer_width_to in their C ABI processing, integer parameters shorter than the native register width will be annotated with the ArgAttribute::SExt or ArgAttribute::ZExt attribute, and that attribute will be included in the generated LLVM IR. In this test, all relevant parameters are `i32`, which will get the `signext` annotation on the relevant 64-bit architectures. Match both the annotated and non-annotated case, but enforce that the annotation is applied consistently.
…mes, r=matthewjasper lowering: extend temporary lifetimes around await Fixes #63832. r? @matthewjasper cc @nikomatsakis
lldb: avoid mixing "Hit breakpoint" message with other output. This is to get `src/test/debuginfo/lexical-scopes-in-block-expression.rs` working. It used to work like a week ago, and the main change that happened was I switched from Python 2 to Python 3 (I don't remember why, but I did get rid of the build dir entirely, and it fixed something else). The error was: ``` error: line not found in debugger output: [...]$27 = 10 ``` Relevant part of the output: ``` print val (long) $26 = 15 print ten (long) $27 = 10 Hit breakpoint 15.1: where = a`lexical_scopes_in_block_expression::main::hcdd5c3caa9166e73 + 1223 at lexical-scopes-in-block-expression.rs:504:4, address = 0x00005555555556e7, resolved, hit count = 1 Hit breakpoint 16.1: where = a`lexical_scopes_in_block_expression::main::hcdd5c3caa9166e73 + 631 at lexical-scopes-in-block-expression.rs:510:8, address = 0x0000555555555497, resolved, hit count = 1 ``` There are most `print` commands and their outputs before, and more `Hit breakpoint` messages afterwards, so I assume what happens is the `Hit breakpoint` messages should be interleaved but somehow they ended up being buffered after all of the other output. As a stopgap measure I'm adding a newline before each `Hit breakpoint` so they don't end up on the same line as the last `print` output (which breaks our pattern-matching). r? @michaelwoerister
Clarify E0507 to note Fn/FnMut relationship to borrowing Fixes #37904.
Changed instant is earlier to instant is later Fixed the documentation issue from #64322
…=oli-obk rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly. This brings `mir-opt` tests from `197s` (over 3 minutes!) to `2.85s`, on my build server. That's a nice speedup of about `69x` and so it definitely fixes #58485, for me. It's such a beginner mistake I feel like maybe `clippy` should lint against it? (cc @Manishearth @oli-obk)
Rollup of 8 pull requests Successful merges: - #63786 (Make `abs`, `wrapping_abs`, `overflowing_abs` const functions) - #63989 (Add Yaah to clippy toolstain notification list) - #64256 (test/c-variadic: Fix patterns on powerpc64) - #64292 (lowering: extend temporary lifetimes around await) - #64311 (lldb: avoid mixing "Hit breakpoint" message with other output.) - #64330 (Clarify E0507 to note Fn/FnMut relationship to borrowing) - #64331 (Changed instant is earlier to instant is later) - #64344 (rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly.) Failed merges: r? @ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.