Skip to content

Commit 5aa15bf

Browse files
committed
Remove leftover mentions of from_anon_const
1 parent 124ab20 commit 5aa15bf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustc/mir/interpret/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub struct LitToConstInput<'tcx> {
151151
pub enum LitToConstError {
152152
/// The literal's inferred type did not match the expected `ty` in the input.
153153
/// This is used for graceful error handling (`delay_span_bug`) in
154-
/// type checking (`AstConv::ast_const_to_const`).
154+
/// type checking (`Const::from_anon_const`).
155155
TypeError,
156156
UnparseableFloat,
157157
Reported,

src/librustc/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,7 @@ impl<'tcx> Const<'tcx> {
24352435
if let Ok(c) = tcx.at(expr.span).lit_to_const(lit_input) {
24362436
return c;
24372437
} else {
2438-
tcx.sess.delay_span_bug(expr.span, "ast_const_to_const: couldn't lit_to_const");
2438+
tcx.sess.delay_span_bug(expr.span, "Const::from_anon_const: couldn't lit_to_const");
24392439
}
24402440
}
24412441

src/test/ui/consts/issue-69310-array-size-lit-wrong-ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// we call the query `lit_to_const(input);`.
44
// However, the literal `input.lit` would not be of the type expected by `input.ty`.
55
// As a result, we immediately called `bug!(...)` instead of bubbling up the problem
6-
// so that it could be handled by the caller of `lit_to_const` (`ast_const_to_const`).
6+
// so that it could be handled by the caller of `lit_to_const` (`from_anon_const`).
77

88
fn main() {}
99

0 commit comments

Comments
 (0)