Skip to content

Commit

Permalink
add rust version guards
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Dec 22, 2023
1 parent ba81e7b commit 26bc5ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hugr/rewrite/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use crate::{
hugr::{HugrError, HugrMut},
HugrView, Node,
};
#[rustversion::since(1.75)] // uses impl in return position
use itertools::Itertools;
use thiserror::Error;

Expand All @@ -32,6 +33,7 @@ pub enum RemoveConstIgnoreError {
RemoveFail(#[from] HugrError),
}

#[rustversion::since(1.75)] // uses impl in return position
impl Rewrite for RemoveConstIgnore {
type Error = RemoveConstIgnoreError;

Expand Down Expand Up @@ -134,6 +136,7 @@ impl Rewrite for RemoveConst {
}
}

#[rustversion::since(1.75)] // uses impl in return position
#[cfg(test)]
mod test {
use super::*;
Expand Down

0 comments on commit 26bc5ff

Please sign in to comment.