Skip to content

Commit

Permalink
Update free.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Nov 13, 2023
1 parent 1b19d80 commit 88940aa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/erg_compiler/ty/free.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::hash::{Hash, Hasher};
use std::mem;
use std::sync::atomic::AtomicUsize;

use erg_common::consts::{BACKTRACE_MODE, DEBUG_MODE};
use erg_common::consts::DEBUG_MODE;
use erg_common::shared::Forkable;
use erg_common::traits::{LimitedDisplay, StructuralEq};
use erg_common::{addr, Str};
Expand Down Expand Up @@ -382,7 +382,7 @@ impl<T: LimitedDisplay> LimitedDisplay for FreeKind<T> {
}
match self {
Self::Linked(t) | Self::UndoableLinked { t, .. } => {
if DEBUG_MODE || BACKTRACE_MODE {
if DEBUG_MODE {
write!(f, "(")?;
t.limited_fmt(f, limit)?;
write!(f, ")")
Expand All @@ -397,14 +397,14 @@ impl<T: LimitedDisplay> LimitedDisplay for FreeKind<T> {
} => {
if *lev == GENERIC_LEVEL {
write!(f, "{name}")?;
if DEBUG_MODE || BACKTRACE_MODE {
if DEBUG_MODE {
write!(f, "(")?;
constraint.limited_fmt(f, limit - 1)?;
write!(f, ")")?;
}
} else {
write!(f, "?{name}")?;
if DEBUG_MODE || BACKTRACE_MODE {
if DEBUG_MODE {
write!(f, "(")?;
constraint.limited_fmt(f, limit - 1)?;
write!(f, ")")?;
Expand All @@ -420,14 +420,14 @@ impl<T: LimitedDisplay> LimitedDisplay for FreeKind<T> {
} => {
if *lev == GENERIC_LEVEL {
write!(f, "%{id}")?;
if DEBUG_MODE || BACKTRACE_MODE {
if DEBUG_MODE {
write!(f, "(")?;
constraint.limited_fmt(f, limit - 1)?;
write!(f, ")")?;
}
} else {
write!(f, "?{id}")?;
if DEBUG_MODE || BACKTRACE_MODE {
if DEBUG_MODE {
write!(f, "(")?;
constraint.limited_fmt(f, limit - 1)?;
write!(f, ")")?;
Expand Down

0 comments on commit 88940aa

Please sign in to comment.