Skip to content

Commit

Permalink
Remove leftover mentions of from_anon_const
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Mar 23, 2020
1 parent 124ab20 commit 5aa15bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/librustc/mir/interpret/mod.rs
Expand Up @@ -151,7 +151,7 @@ pub struct LitToConstInput<'tcx> {
pub enum LitToConstError {
/// The literal's inferred type did not match the expected `ty` in the input.
/// This is used for graceful error handling (`delay_span_bug`) in
/// type checking (`AstConv::ast_const_to_const`).
/// type checking (`Const::from_anon_const`).
TypeError,
UnparseableFloat,
Reported,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/sty.rs
Expand Up @@ -2435,7 +2435,7 @@ impl<'tcx> Const<'tcx> {
if let Ok(c) = tcx.at(expr.span).lit_to_const(lit_input) {
return c;
} else {
tcx.sess.delay_span_bug(expr.span, "ast_const_to_const: couldn't lit_to_const");
tcx.sess.delay_span_bug(expr.span, "Const::from_anon_const: couldn't lit_to_const");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/issue-69310-array-size-lit-wrong-ty.rs
Expand Up @@ -3,7 +3,7 @@
// we call the query `lit_to_const(input);`.
// However, the literal `input.lit` would not be of the type expected by `input.ty`.
// As a result, we immediately called `bug!(...)` instead of bubbling up the problem
// so that it could be handled by the caller of `lit_to_const` (`ast_const_to_const`).
// so that it could be handled by the caller of `lit_to_const` (`from_anon_const`).

fn main() {}

Expand Down

0 comments on commit 5aa15bf

Please sign in to comment.