1
Fork 0

Move ty::print methods to Drop-based scope guards

This commit is contained in:
Mark Rousskov 2022-02-16 13:04:48 -05:00
parent 393fdc1048
commit 9763486034
30 changed files with 142 additions and 142 deletions

View file

@ -535,8 +535,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
UninitValid => !layout.might_permit_raw_init(bx, /*zero:*/ false),
};
if do_panic {
let msg_str = with_no_visible_paths(|| {
with_no_trimmed_paths(|| {
let msg_str = with_no_visible_paths!({
with_no_trimmed_paths!({
if layout.abi.is_uninhabited() {
// Use this error even for the other intrinsics as it is more precise.
format!("attempted to instantiate uninhabited type `{}`", ty)