Skip to content

Commit

Permalink
Bump bitflags
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Nov 18, 2023
1 parent 8a508a0 commit 8a600fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chalk-ir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ edition = "2018"

[dependencies]
lazy_static = "1.4.0"
bitflags = "1.2.1"
bitflags = "2.4.1"
chalk-derive = { version = "0.95.0-dev.0", path = "../chalk-derive" }
17 changes: 9 additions & 8 deletions chalk-ir/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ pub struct TyData<I: Interner> {

bitflags! {
/// Contains flags indicating various properties of a Ty
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct TypeFlags : u16 {
/// Does the type contain an InferenceVar
const HAS_TY_INFER = 1;
Expand Down Expand Up @@ -564,16 +565,16 @@ bitflags! {
const STILL_FURTHER_SPECIALIZABLE = 1 << 14;

/// True when the type contains free names local to a particular context
const HAS_FREE_LOCAL_NAMES = TypeFlags::HAS_TY_INFER.bits
| TypeFlags::HAS_CT_INFER.bits
| TypeFlags::HAS_TY_PLACEHOLDER.bits
| TypeFlags::HAS_CT_PLACEHOLDER.bits
| TypeFlags::HAS_FREE_LOCAL_REGIONS.bits;
const HAS_FREE_LOCAL_NAMES = TypeFlags::HAS_TY_INFER.bits()
| TypeFlags::HAS_CT_INFER.bits()
| TypeFlags::HAS_TY_PLACEHOLDER.bits()
| TypeFlags::HAS_CT_PLACEHOLDER.bits()
| TypeFlags::HAS_FREE_LOCAL_REGIONS.bits();

/// Does the type contain any form of projection
const HAS_PROJECTION = TypeFlags::HAS_TY_PROJECTION.bits
| TypeFlags::HAS_TY_OPAQUE.bits
| TypeFlags::HAS_CT_PROJECTION.bits;
const HAS_PROJECTION = TypeFlags::HAS_TY_PROJECTION.bits()
| TypeFlags::HAS_TY_OPAQUE.bits()
| TypeFlags::HAS_CT_PROJECTION.bits();
}
}
/// Type data, which holds the actual type information.
Expand Down

0 comments on commit 8a600fc

Please sign in to comment.