Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fe1bf8e

Browse files
committedFeb 23, 2021
Auto merge of rust-lang#82443 - Dylan-DPC:rollup-yni7uio, r=Dylan-DPC
Rollup of 10 pull requests Successful merges: - rust-lang#81629 (Point out implicit deref coercions in borrow) - rust-lang#82113 (Improve non_fmt_panic lint.) - rust-lang#82258 (Implement -Z hir-stats for nested foreign items) - rust-lang#82296 (Support `pub` on `macro_rules`) - rust-lang#82297 (Consider auto derefs before warning about write only fields) - rust-lang#82305 (Remove many RefCells from DocContext) - rust-lang#82308 (Lower condition of `if` expression before it's "then" block) - rust-lang#82311 (Jsondocck improvements) - rust-lang#82362 (Fix mir-cfg dumps) - rust-lang#82391 (disable atomic_max/min tests in Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0196107 + 51511c7 commit fe1bf8e

File tree

66 files changed

+1160
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1160
-157
lines changed
 

‎compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,9 @@ impl<'hir> LoweringContext<'_, 'hir> {
347347
) -> hir::ExprKind<'hir> {
348348
macro_rules! make_if {
349349
($opt:expr) => {{
350+
let cond = self.lower_expr(cond);
350351
let then_expr = self.lower_block_expr(then);
351-
hir::ExprKind::If(self.lower_expr(cond), self.arena.alloc(then_expr), $opt)
352+
hir::ExprKind::If(cond, self.arena.alloc(then_expr), $opt)
352353
}};
353354
}
354355
if let Some(rslt) = else_opt {

‎compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) {
665665
// involved, so we only emit errors where there are no other parsing errors.
666666
gate_all!(destructuring_assignment, "destructuring assignments are unstable");
667667
}
668+
gate_all!(pub_macro_rules, "`pub` on `macro_rules` items is unstable");
668669

669670
// All uses of `gate_all!` below this point were added in #65742,
670671
// and subsequently disabled (with the non-early gating readded).

0 commit comments

Comments
 (0)
This repository has been archived.