Move ty::print methods to Drop-based scope guards
This commit is contained in:
parent
393fdc1048
commit
9763486034
30 changed files with 142 additions and 142 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue