X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Frustc_hir%2Fsrc%2Fhir.rs;h=4696a4bd9ab63aeab10c4291c451fc93d1eddce4;hb=1d3f5b49d6bdfb2a051ddbfb7ad4b4ad603e9908;hp=b456bd08048db153a3e8e10e95d940d2f11cedd5;hpb=62a1e76d2beaa87d7f02a55e2d7faa03cdd5fd7f;p=rust.git diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index b456bd08048..4696a4bd9ab 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -831,8 +831,6 @@ pub struct OwnerNodes<'tcx> { pub nodes: IndexVec>>, /// Content of local bodies. pub bodies: SortedMap>, - /// Non-owning definitions contained in this owner. - pub local_id_to_def_id: SortedMap, } impl<'tcx> OwnerNodes<'tcx> { @@ -862,7 +860,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { .collect::>(), ) .field("bodies", &self.bodies) - .field("local_id_to_def_id", &self.local_id_to_def_id) .field("hash_without_bodies", &self.hash_without_bodies) .field("hash_including_bodies", &self.hash_including_bodies) .finish() @@ -2106,8 +2103,8 @@ pub enum LocalSource { } /// Hints at the original code for a `match _ { .. }`. -#[derive(Copy, Clone, PartialEq, Eq, Encodable, Hash, Debug)] -#[derive(HashStable_Generic)] +#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] +#[derive(HashStable_Generic, Encodable, Decodable)] pub enum MatchSource { /// A `match _ { .. }`. Normal, @@ -2117,6 +2114,8 @@ pub enum MatchSource { TryDesugar, /// A desugared `.await`. AwaitDesugar, + /// A desugared `format_args!()`. + FormatArgs, } impl MatchSource { @@ -2128,6 +2127,7 @@ pub const fn name(self) -> &'static str { ForLoopDesugar => "for", TryDesugar => "?", AwaitDesugar => ".await", + FormatArgs => "format_args!()", } } }