Skip to content

Commit 347b9ff

Browse files
committed
Add Mutability to chalk-ir
1 parent ff137d4 commit 347b9ff

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

chalk-ir/src/fold/boring_impls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ copy_fold!(IntTy);
248248
copy_fold!(FloatTy);
249249
copy_fold!(Scalar);
250250
copy_fold!(ClausePriority);
251+
copy_fold!(Mutability);
251252

252253
#[macro_export]
253254
macro_rules! id_fold {

chalk-ir/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ pub enum Scalar {
136136
Float(FloatTy),
137137
}
138138

139+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
140+
pub enum Mutability {
141+
Mut,
142+
Not,
143+
}
144+
139145
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Fold, Visit)]
140146
pub enum TypeName<I: Interner> {
141147
/// a type like `Vec<T>`

chalk-ir/src/visit/boring_impls.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! The more interesting impls of `Visit` remain in the `visit` module.
66
77
use crate::{
8-
AssocTypeId, ClausePriority, DebruijnIndex, FloatTy, Goals, ImplId, IntTy, Interner,
8+
AssocTypeId, ClausePriority, DebruijnIndex, FloatTy, Goals, ImplId, IntTy, Interner, Mutability,
99
OpaqueTyId, Parameter, ParameterKind, PlaceholderIndex, ProgramClause, ProgramClauseData,
1010
ProgramClauses, QuantifiedWhereClauses, QuantifierKind, Scalar, StructId, Substitution,
1111
SuperVisit, TraitId, UintTy, UniverseIndex, Visit, VisitResult, Visitor,
@@ -211,6 +211,7 @@ const_visit!(Scalar);
211211
const_visit!(UintTy);
212212
const_visit!(IntTy);
213213
const_visit!(FloatTy);
214+
const_visit!(Mutability);
214215

215216
#[macro_export]
216217
macro_rules! id_visit {

0 commit comments

Comments
 (0)