From 70ed62677baffbcb09f214ed8a446f8a067437dc 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hugr/rewrite/consts.rs b/src/hugr/rewrite/consts.rs index f00b67cb0..9ebeff111 100644 --- a/src/hugr/rewrite/consts.rs +++ b/src/hugr/rewrite/consts.rs @@ -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; @@ -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> { let mut build = ModuleBuilder::new();