Skip to content

Commit

Permalink
Fix assert! macro usage
Browse files Browse the repository at this point in the history
There is a bug in rustc that allows adding invalid trailing tokens to
the `assert!` macro call. They are currently ignored but are going to
produce errors in the future.

Fix assert! macro usage to add missing comma.

For more information, see
rust-lang/rust#60024 and
rust-lang/rust#60039
  • Loading branch information
rasendubi committed Apr 25, 2019
1 parent 92b1621 commit 0eafc21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qustate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl QuState
bits: &[usize])
where G: crate::gates::Gate + ?Sized
{
assert!(control.len() == self.nr_shots
assert!(control.len() == self.nr_shots,
"The number of control bits does not match the number of runs");

let gate_bits = gate.nr_affected_bits();
Expand Down

0 comments on commit 0eafc21

Please sign in to comment.