Skip to content

Commit 3c03242

Browse files
committed
Remove bug! macro again.
1 parent e46087f commit 3c03242

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_lint/src/types.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,13 +1117,7 @@ pub(crate) fn repr_nullable_ptr<'tcx>(
11171117
return Some(get_nullable_type(tcx, field_ty).unwrap());
11181118
}
11191119
WrappingRange { start: 1, .. } => {
1120-
let nullable_type = get_nullable_type(tcx, field_ty);
1121-
1122-
if nullable_type.is_none() {
1123-
bug!("cannot get nullable type for field_ty {field_ty:?}");
1124-
}
1125-
1126-
return Some(nullable_type.unwrap());
1120+
return Some(get_nullable_type(tcx, field_ty).unwrap());
11271121
}
11281122
WrappingRange { start, end } => {
11291123
unreachable!("Unhandled start and end range: ({}, {})", start, end)

0 commit comments

Comments
 (0)