From 26bc5ff1afb2a589e2b7f97249ac1e3c5cdac2c0 Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Fri, 22 Dec 2023 13:41:17 +0000 Subject: [PATCH] add rust version guards --- src/hugr/rewrite/consts.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hugr/rewrite/consts.rs b/src/hugr/rewrite/consts.rs index f00b67cb0..d8a0060b7 100644 --- a/src/hugr/rewrite/consts.rs +++ b/src/hugr/rewrite/consts.rs @@ -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; @@ -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; @@ -134,6 +136,7 @@ impl Rewrite for RemoveConst { } } +#[rustversion::since(1.75)] // uses impl in return position #[cfg(test)] mod test { use super::*;