We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1709a85 commit ba12a99Copy full SHA for ba12a99
compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs
@@ -1106,7 +1106,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
1106
.collect::<String>()
1107
),
1108
[(only, _)] => only.to_string(),
1109
- [] => "this type".to_string(),
+ [] => bug!("expected one segment to deny"),
1110
};
1111
1112
let arg_spans: Vec<Span> = segments
@@ -1136,7 +1136,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
1136
"s",
1137
1138
[only] => (only.to_string(), ""),
1139
- [] => unreachable!("expected at least one generic to prohibit"),
+ [] => bug!("expected at least one generic to prohibit"),
1140
1141
let last_span = *arg_spans.last().unwrap();
1142
let span: MultiSpan = arg_spans.into();
0 commit comments