Skip to content

Commit

Permalink
ci: TRYBUILD=overwrite on stable
Browse files Browse the repository at this point in the history
  • Loading branch information
MingweiSamuel committed Dec 12, 2024
1 parent d115fc5 commit e462d24
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions hydroflow_lang/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ pub struct SerdeSpan {
}
impl From<Span> 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() {
Expand All @@ -204,11 +208,7 @@ impl From<Span> for SerdeSpan {
.into();
}

#[cfg_attr(
not(nightly),
expect(clippy::diverging_sub_expression, reason = "conditional compilation")
)]
break 'a "unknown".into();
"unknown".into()
};

Self {
Expand Down
15 changes: 6 additions & 9 deletions hydroflow_lang/src/graph/hydroflow_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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!(
Expand Down

0 comments on commit e462d24

Please sign in to comment.