-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 9 pull requests #64687
Rollup of 9 pull requests #64687
Conversation
Summary: Invoking `rev` does not add a trailing newline when none is present in the input (at least on my Debian). Nearby examples use `echo` rather than `rev`, which probably explains the source of the discrepancy. Also, a `mut` qualifier is unused. Test Plan: Copy the code block into <https://play.rust-lang.org> with a `fn main` wrapper, and run it. Note that it compiles and runs cleanly; prior to this commit, it would emit an `unused_mut` warning and then panic. wchargin-branch: stdio-piped-docs
…ngs_named_same_as_variants`.
Pacify `tidy`. It's also more correct in this context.
also removed some duplicated logic from TypeRelation methods.
…crichton panic=abort support in libtest Add experimental support for tests compiled with panic=abort. Enabled with `-Z panic_abort_tests`. r? @alexcrichton cc @cramertj
… r=Dylan-DPC Fix `Stdio::piped` example code and lint Summary: Invoking `rev` does not add a trailing newline when none is present in the input (at least on my Debian). Nearby examples use `echo` rather than `rev`, which probably explains the source of the discrepancy. Also, a `mut` qualifier is unused. Test Plan: Copy the code block into <https://play.rust-lang.org> with a `fn main` wrapper, and run it. Note that it compiles and runs cleanly; prior to this commit, it would emit an `unused_mut` warning and then panic. wchargin-branch: stdio-piped-docs
or-patterns: Push `PatKind/PatternKind::Or` at top level to HIR & HAIR Following up on work in rust-lang#64111, rust-lang#63693, and rust-lang#61708, in this PR: - We change `hair::Arm.patterns: Vec<Pattern<'_>>` into `hir::Arm.pattern: Pattern<'_>`. - `fn hair::Arm::top_pats_hack` is introduced as a temporary crutch in MIR building to avoid more changes. - We change `hir::Arm.pats: HirVec<P<Pat>>` into `hir::Arm.pat: P<Pat>`. - The hacks in `rustc::hir::lowering` are removed since the representation hack is no longer necessary. - In some places, `fn hir::Arm::top_pats_hack` is introduced to leave some things as future work. - Misc changes: HIR pretty printing is adjusted to behave uniformly wrt. top/inner levels, rvalue promotion is adjusted, regionck, and dead_code is also. - Type checking is adjusted to uniformly handle or-patterns at top/inner levels. To make things compile, `p_0 | ... | p_n` is redefined as a "reference pattern" in [`fn is_non_ref_pat`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/struct.FnCtxt.html#method.is_non_ref_pat) for now. This is done so that reference types are not eagerly stripped from the `expected: Ty<'tcx>`. - Liveness is adjusted wrt. the `unused_variables` and `unused_assignments` lints to handle top/inner levels uniformly and the handling of `fn` parameters, `let` locals, and `match` arms are unified in this respect. This is not tested for now as exhaustiveness checks are reachable and will ICE. - In `check_match`, checking `@` and by-move bindings is adjusted. However, exhaustiveness checking is not adjusted the moment and is handled by @dlrobertson in rust-lang#63688. - AST borrowck (`construct.rs`) is not adjusted as AST borrowck will be removed soon. r? @matthewjasper cc @dlrobertson @varkor @oli-obk
…e-tests, r=nikomatsakis Bugfix/rfc 2451 rerebalance tests r? @nikomatsakis Fixes rust-lang#64412 Depends/Contains on rust-lang#64414 cc rust-lang#55437 and rust-lang#63599
… r=petrochenkov Cleanup syntax::ext::build I suspect most of this code could be inlined but I only removed the bits where the inlining didn't really hurt readability (i.e., method call -> function call) or the completely unused code.
…tril Propagate `types.err` in locals further to avoid spurious knock-down errors Fix rust-lang#33575, fix rust-lang#44504.
…c, r=petrochenkov Parse assoc type bounds in generic params and provide custom diagnostic Fix rust-lang#26271.
remove outdated comment
Infer consts more consistently Moved some duplicated logic in `TypeRelation` methods into `super_combined_consts`. Before some `TypeRelation`s like `Lub` wasn't using `replace_if_possible`, meaning some inference types were staying around longer than they should be. Fixes rust-lang#64519 r? @varkor
@bors r+ p=9 rollup=never |
📌 Commit afd1c60 has been approved by |
⌛ Testing commit afd1c60 with merge 2fe02dd9d0ab22a65224434966ae88436309ea44... |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-azure |
Successful merges:
Stdio::piped
example code and lint #64294 (FixStdio::piped
example code and lint)PatKind/PatternKind::Or
at top level to HIR & HAIR #64508 (or-patterns: PushPatKind/PatternKind::Or
at top level to HIR & HAIR)types.err
in locals further to avoid spurious knock-down errors #64674 (Propagatetypes.err
in locals further to avoid spurious knock-down errors)Failed merges:
r? @ghost