We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
try_from_lit
1 parent 91376f4 commit c76dc95Copy full SHA for c76dc95
compiler/rustc_middle/src/ty/consts.rs
@@ -305,12 +305,7 @@ impl<'tcx> Const<'tcx> {
305
// mir.
306
match tcx.at(expr.span).lit_to_const(lit_input) {
307
Ok(c) => return Some(c),
308
- Err(e) => {
309
- tcx.dcx().span_delayed_bug(
310
- expr.span,
311
- format!("Const::from_anon_const: couldn't lit_to_const {e:?}"),
312
- );
313
- }
+ Err(_) => return None,
314
}
315
316
tests/crashes/116308.rs renamed to tests/ui/const-generics/adt_const_params/116308.rs
@@ -1,6 +1,8 @@
1
-//@ known-bug: #116308
+//@ check-pass
2
#![feature(adt_const_params)]
3
4
+// Regression test for #116308
5
+
6
pub trait Identity {
7
type Identity;
8
0 commit comments