Skip to content

Commit

Permalink
derive(Default) is too aggressive
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Sep 24, 2019
1 parent a05aea4 commit 4174c20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions polonius-engine/src/facts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ pub struct AllFacts<Origin: Atom, Loan: Atom, Point: Atom, Variable: Atom, MoveP
pub path_accessed_at: Vec<(MovePath, Point)>,
}

// 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<Origin: Atom, Loan: Atom, Point: Atom, Variable: Atom, MovePath: Atom> Default
for AllFacts<Origin, Loan, Point, Variable, MovePath>
{
Expand Down

0 comments on commit 4174c20

Please sign in to comment.