diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e9aa17667d..cc586264168 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,6 +182,8 @@ jobs: - name: Run cargo nextest on all targets run: cargo nextest run --no-fail-fast --features python --features deploy --all-targets + env: + TRYBUILD: ${{ matrix.rust_release != 'pinned-nightly' && 'overwrite' || '' }} - name: Run doctests run: cargo test --no-fail-fast --features python --features deploy --doc diff --git a/hydroflow_lang/src/diagnostic.rs b/hydroflow_lang/src/diagnostic.rs index 39468ba5ee8..1ac175d9e50 100644 --- a/hydroflow_lang/src/diagnostic.rs +++ b/hydroflow_lang/src/diagnostic.rs @@ -192,6 +192,10 @@ pub struct SerdeSpan { } impl From for SerdeSpan { fn from(span: Span) -> Self { + #[cfg_attr( + not(nightly), + expect(unused_labels, reason = "conditional compilation") + )] let path = 'a: { #[cfg(nightly)] if proc_macro::is_available() { @@ -204,11 +208,7 @@ impl From for SerdeSpan { .into(); } - #[cfg_attr( - not(nightly), - expect(clippy::diverging_sub_expression, reason = "conditional compilation") - )] - break 'a "unknown".into(); + "unknown".into() }; Self { diff --git a/hydroflow_lang/src/graph/hydroflow_graph.rs b/hydroflow_lang/src/graph/hydroflow_graph.rs index af45012a59e..13af7adb8e6 100644 --- a/hydroflow_lang/src/graph/hydroflow_graph.rs +++ b/hydroflow_lang/src/graph/hydroflow_graph.rs @@ -1008,6 +1008,10 @@ impl HydroflowGraph { subgraph_op_iter_code.push(write_iterator); if include_type_guards { + #[cfg_attr( + not(nightly), + expect(unused_labels, reason = "conditional compilation") + )] let source_info = 'a: { #[cfg(nightly)] if proc_macro::is_available() { @@ -1027,20 +1031,13 @@ impl HydroflowGraph { ); } - #[cfg_attr( - not(nightly), - expect( - clippy::diverging_sub_expression, - reason = "conditional compilation" - ) - )] - break 'a format!( + format!( "loc_nopath_{}_{}_{}_{}", op_span.start().line, op_span.start().column, op_span.end().line, op_span.end().column - ); + ) }; let fn_ident = format_ident!(