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 70ed626
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hugr/rewrite/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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 @@ -148,6 +149,7 @@ mod test {
type_row,
types::FunctionType,
};
#[rustversion::since(1.75)] // uses impl in return position
#[test]
fn test_const_remove() -> Result<(), Box<dyn std::error::Error>> {
let mut build = ModuleBuilder::new();
Expand Down

0 comments on commit 70ed626

Please sign in to comment.