Skip to content

Commit fd8cd45

Browse files
authored
Merge pull request #377 from crlf0710/master
Rename field `goals` of type `Goals` to `interned`.
2 parents e6dec10 + b0db16a commit fd8cd45

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

chalk-ir/src/debug.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl<I: Interner> Debug for Goal<I> {
4747

4848
impl<I: Interner> Debug for Goals<I> {
4949
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error> {
50-
I::debug_goals(self, fmt).unwrap_or_else(|| write!(fmt, "{:?}", self.goals))
50+
I::debug_goals(self, fmt).unwrap_or_else(|| write!(fmt, "{:?}", self.interned))
5151
}
5252
}
5353

chalk-ir/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ impl<T> UCanonical<T> {
13761376
#[derive(Clone, PartialEq, Eq, Hash, HasInterner)]
13771377
/// A list of goals.
13781378
pub struct Goals<I: Interner> {
1379-
goals: I::InternedGoals,
1379+
interned: I::InternedGoals,
13801380
}
13811381

13821382
impl<I: Interner> Goals<I> {
@@ -1385,13 +1385,13 @@ impl<I: Interner> Goals<I> {
13851385
}
13861386

13871387
pub fn interned(&self) -> &I::InternedGoals {
1388-
&self.goals
1388+
&self.interned
13891389
}
13901390

13911391
pub fn from(interner: &I, goals: impl IntoIterator<Item = impl CastTo<Goal<I>>>) -> Self {
13921392
use crate::cast::Caster;
13931393
Goals {
1394-
goals: I::intern_goals(interner, goals.into_iter().casted(interner)),
1394+
interned: I::intern_goals(interner, goals.into_iter().casted(interner)),
13951395
}
13961396
}
13971397

@@ -1420,7 +1420,7 @@ impl<I: Interner> Goals<I> {
14201420
}
14211421

14221422
pub fn as_slice(&self, interner: &I) -> &[Goal<I>] {
1423-
interner.goals_data(&self.goals)
1423+
interner.goals_data(&self.interned)
14241424
}
14251425
}
14261426

0 commit comments

Comments
 (0)