Use {Decodable,Encodable}_NoContext in type_ir
This commit is contained in:
parent
e5a2220327
commit
6438b9eca8
24 changed files with 281 additions and 105 deletions
|
@ -4,7 +4,7 @@ use std::fmt::Debug;
|
|||
use std::mem;
|
||||
use std::ops::{Bound, Index, IndexMut, RangeBounds};
|
||||
|
||||
use rustc_macros::{Decodable_Generic, Encodable_Generic};
|
||||
use rustc_macros::{Decodable_NoContext, Encodable_NoContext};
|
||||
|
||||
use crate::stable_hasher::{HashStable, StableHasher, StableOrd};
|
||||
|
||||
|
@ -20,7 +20,7 @@ pub use index_map::SortedIndexMultiMap;
|
|||
/// stores data in a more compact way. It also supports accessing contiguous
|
||||
/// ranges of elements as a slice, and slices of already sorted elements can be
|
||||
/// inserted efficiently.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable_Generic, Decodable_Generic)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable_NoContext, Decodable_NoContext)]
|
||||
pub struct SortedMap<K, V> {
|
||||
data: Vec<(K, V)>,
|
||||
}
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
use std::fmt;
|
||||
|
||||
use rustc_macros::{Decodable_Generic, Encodable_Generic};
|
||||
use rustc_macros::{Decodable_NoContext, Encodable_NoContext};
|
||||
|
||||
use crate::fingerprint::Fingerprint;
|
||||
use crate::stable_hasher;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable_Generic, Decodable_Generic, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable_NoContext, Decodable_NoContext, Hash)]
|
||||
pub struct Svh {
|
||||
hash: Fingerprint,
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::iter::{Product, Sum};
|
|||
use std::ops::Index;
|
||||
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use rustc_macros::{Decodable_Generic, Encodable_Generic};
|
||||
use rustc_macros::{Decodable_NoContext, Encodable_NoContext};
|
||||
|
||||
use crate::fingerprint::Fingerprint;
|
||||
use crate::stable_hasher::{HashStable, StableCompare, StableHasher, ToStableHashKey};
|
||||
|
@ -224,7 +224,7 @@ trait UnordCollection {}
|
|||
///
|
||||
/// See [MCP 533](https://github.com/rust-lang/compiler-team/issues/533)
|
||||
/// for more information.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable_Generic, Decodable_Generic)]
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable_NoContext, Decodable_NoContext)]
|
||||
pub struct UnordSet<V: Eq + Hash> {
|
||||
inner: FxHashSet<V>,
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ impl<HCX, V: Hash + Eq + HashStable<HCX>> HashStable<HCX> for UnordSet<V> {
|
|||
///
|
||||
/// See [MCP 533](https://github.com/rust-lang/compiler-team/issues/533)
|
||||
/// for more information.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable_Generic, Decodable_Generic)]
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable_NoContext, Decodable_NoContext)]
|
||||
pub struct UnordMap<K: Eq + Hash, V> {
|
||||
inner: FxHashMap<K, V>,
|
||||
}
|
||||
|
@ -639,7 +639,7 @@ impl<HCX, K: Hash + Eq + HashStable<HCX>, V: HashStable<HCX>> HashStable<HCX> fo
|
|||
///
|
||||
/// See [MCP 533](https://github.com/rust-lang/compiler-team/issues/533)
|
||||
/// for more information.
|
||||
#[derive(Default, Debug, Eq, PartialEq, Clone, Encodable_Generic, Decodable_Generic)]
|
||||
#[derive(Default, Debug, Eq, PartialEq, Clone, Encodable_NoContext, Decodable_NoContext)]
|
||||
pub struct UnordBag<V> {
|
||||
inner: Vec<V>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue