From 4174c20d7c583c3109475710e5f583e3682159a3 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Tue, 24 Sep 2019 13:15:46 +0200 Subject: [PATCH] derive(Default) is too aggressive I don't really understand the details, so will just list sources: - https://github.com/rust-lang/polonius/pull/122#discussion_r324344120 - https://rust-lang.zulipchat.com/#narrow/stream/122657-t-compiler.2Fwg-nll/topic/rustc-and-polonius.20integration/near/127049249 --- polonius-engine/src/facts.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/polonius-engine/src/facts.rs b/polonius-engine/src/facts.rs index eb90b3f2846..edd23b25f5d 100644 --- a/polonius-engine/src/facts.rs +++ b/polonius-engine/src/facts.rs @@ -64,6 +64,10 @@ pub struct AllFacts, } +// We impl Default manually because the more convenient +// `#[derive(Default)]` syntax would result in, for example, +// `rustc::ty::RegionVid`, an `Atom`, also having to impl `Default`, +// something that does not make sense for that type. impl Default for AllFacts {