Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9cd1de5
suggest swapping equality on e0277
makai410 Feb 17, 2025
f462cb7
Update `compiler-builtins` to 0.1.149
tgross35 Feb 25, 2025
6e4adbe
Remove visit_const_block in typeck writeback
nbdd0121 Feb 26, 2025
8282181
Use Binder<Vec<T>> instead of Vec<Binder<T>> in new solver
compiler-errors Feb 26, 2025
ad74788
Use bound_coroutine_witnesses in old solver
compiler-errors Feb 26, 2025
f482460
Handle asm const similar to inline const
nbdd0121 Feb 26, 2025
395b0fb
Bless tests
nbdd0121 Feb 26, 2025
f20dd49
Use original command for showing sccache stats
Kobzol Feb 27, 2025
31388f5
checked_ilog tests: deal with a bit of float imprecision
RalfJung Feb 27, 2025
b3cae68
move `rust.description` to `build.description`
onur-ozkan Feb 27, 2025
0becb57
add change-entry
onur-ozkan Feb 27, 2025
f877b12
pass `CFG_VER_DESCRIPTION` to tool builds
onur-ozkan Feb 27, 2025
6cc6b86
Update E0133 docs for 2024 edition
ehuss Feb 27, 2025
d504f70
Unconditionally lower match arm even if it's unneeded for never patte…
mu001999 Feb 27, 2025
0f7da1a
replace `rust.description` with `build.description`
onur-ozkan Feb 27, 2025
cdd8895
Add inference constraining Copy impl test
BoxyUwU Feb 14, 2025
dc6db19
Defer repeat expr `Copy` check
BoxyUwU Feb 14, 2025
6c3243f
Bless
BoxyUwU Feb 15, 2025
86945c0
Tweak incorrect ABI suggestion
estebank Feb 28, 2025
e6b3b88
Rollup merge of #137045 - BoxyUwU:defer_repeat_expr_checks, r=compile…
matthiaskrgr Feb 28, 2025
3a92645
Rollup merge of #137171 - makai410:swapping-e0277, r=compiler-errors
matthiaskrgr Feb 28, 2025
32405da
Rollup merge of #137634 - tgross35:update-builtins, r=tgross35
matthiaskrgr Feb 28, 2025
59a5466
Rollup merge of #137686 - nbdd0121:asm_const, r=compiler-errors
matthiaskrgr Feb 28, 2025
2dd51d1
Rollup merge of #137689 - compiler-errors:coroutine, r=lcnr
matthiaskrgr Feb 28, 2025
ff6c07d
Rollup merge of #137718 - Kobzol:sccache-stats, r=marcoieni
matthiaskrgr Feb 28, 2025
7d3015a
Rollup merge of #137723 - onur-ozkan:cfg-ver-description, r=pietroalb…
matthiaskrgr Feb 28, 2025
c2711e8
Rollup merge of #137730 - RalfJung:checked_ilog_tests, r=tgross35
matthiaskrgr Feb 28, 2025
0ba2a8a
Rollup merge of #137735 - ehuss:e0133-edition-docs, r=compiler-errors
matthiaskrgr Feb 28, 2025
ba63753
Rollup merge of #137742 - mu001999-contrib:fix-137708, r=compiler-errors
matthiaskrgr Feb 28, 2025
1a45baa
Rollup merge of #137771 - estebank:abi-sugg, r=compiler-errors
matthiaskrgr Feb 28, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove visit_const_block in typeck writeback
There is a `visit_inline_const` visitor method and it is used instead.
  • Loading branch information
nbdd0121 committed Feb 26, 2025
commit 6e4adbed76ff406994682ee526366f6f2ea11b9f
21 changes: 8 additions & 13 deletions compiler/rustc_hir_typeck/src/writeback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,6 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
}
}
}

fn visit_const_block(&mut self, span: Span, anon_const: &hir::ConstBlock) {
self.visit_node_id(span, anon_const.hir_id);

let body = self.tcx().hir_body(anon_const.body);
self.visit_body(body);
}
}

///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -284,9 +277,6 @@ impl<'cx, 'tcx> Visitor<'tcx> for WritebackCx<'cx, 'tcx> {
hir::ExprKind::Field(..) | hir::ExprKind::OffsetOf(..) => {
self.visit_field_id(e.hir_id);
}
hir::ExprKind::ConstBlock(ref anon_const) => {
self.visit_const_block(e.span, anon_const);
}
_ => {}
}

Expand All @@ -297,6 +287,14 @@ impl<'cx, 'tcx> Visitor<'tcx> for WritebackCx<'cx, 'tcx> {
self.fix_index_builtin_expr(e);
}

fn visit_inline_const(&mut self, anon_const: &hir::ConstBlock) {
let span = self.tcx().def_span(anon_const.def_id);
self.visit_node_id(span, anon_const.hir_id);

let body = self.tcx().hir_body(anon_const.body);
self.visit_body(body);
}

fn visit_generic_param(&mut self, p: &'tcx hir::GenericParam<'tcx>) {
match &p.kind {
hir::GenericParamKind::Lifetime { .. } => {
Expand Down Expand Up @@ -343,9 +341,6 @@ impl<'cx, 'tcx> Visitor<'tcx> for WritebackCx<'cx, 'tcx> {

fn visit_pat_expr(&mut self, expr: &'tcx hir::PatExpr<'tcx>) {
self.visit_node_id(expr.span, expr.hir_id);
if let hir::PatExprKind::ConstBlock(c) = &expr.kind {
self.visit_const_block(expr.span, c);
}
intravisit::walk_pat_expr(self, expr);
}

Expand Down