From 8a600fc8fc5cb45f3b484c429f2560862c602088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Sat, 18 Nov 2023 18:37:11 +0200 Subject: [PATCH] Bump bitflags --- Cargo.lock | 2 +- chalk-ir/Cargo.toml | 2 +- chalk-ir/src/lib.rs | 17 +++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25518831983..52fa4ce00c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ dependencies = [ name = "chalk-ir" version = "0.95.0-dev.0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "chalk-derive", "lazy_static", ] diff --git a/chalk-ir/Cargo.toml b/chalk-ir/Cargo.toml index 415f9c21ce2..583ebf004c6 100644 --- a/chalk-ir/Cargo.toml +++ b/chalk-ir/Cargo.toml @@ -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" } diff --git a/chalk-ir/src/lib.rs b/chalk-ir/src/lib.rs index 5cf44b0c323..e63f7538c9f 100644 --- a/chalk-ir/src/lib.rs +++ b/chalk-ir/src/lib.rs @@ -531,6 +531,7 @@ pub struct TyData { 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; @@ -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.