1 // Copyright (c) Facebook, Inc. and its affiliates.
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
6 use std::cmp::Ordering;
10 use no_pos_hash::NoPosHash;
11 use ocamlrep_derive::{FromOcamlRepIn, ToOcamlRep};
13 use crate::{local_id::LocalId, typing_reason::Blame};
26 pub struct IdWithBlame<'a>(pub LocalId<'a>, Blame<'a>);
28 impl arena_trait::TrivialDrop for IdWithBlame<'_> {}
30 impl PartialEq for IdWithBlame<'_> {
31 fn eq(&self, other: &Self) -> bool {
36 impl PartialOrd for IdWithBlame<'_> {
37 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
38 self.0.partial_cmp(&other.0)
42 /// A set of LocalIds which treats blame as metadata
43 pub type BlameSet<'a> = arena_collections::set::Set<'a, IdWithBlame<'a>>;