Skip to content

Now is never - #233

Merged
MusicalNinjaDad merged 4 commits into
mainfrom
now_is_never
Sep 1, 2026
Merged

MusicalNinjaDad merged 4 commits into
mainfrom
now_is_never

Conversation

@MusicalNinjaDad

Copy link
Copy Markdown
Owner

update tests & examples to work with stabilised-in-nightly never_type

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="crates/try_v2/src/lib.rs" line_range="11" />
<code_context>
 //!
 //!   - nightly
-//!   - `#![feature(never_type)]`
+//!   - `#![cfg_attr(unstable_never_type, feature(never_type))]`
 //!   - `#![feature(try_trait_v2)]`
 //!   - `#![feature(try_trait_v2_residual)]`
</code_context>
<issue_to_address>
**issue:** The documented `cfg_attr(unstable_never_type, feature(never_type))` does not enable `never_type` for downstream crates, because `unstable_never_type` is emitted by this package's build script only for this package's compilation and is not propagated to consumers. On a pre-stabilization nightly, users copying these examples therefore compile the generated `!` residual types without the required feature and receive a never-type feature-gate error.

**Triggers:** When a consumer uses a pinned nightly older than the stabilization of `never_type` and follows the crate or derive-macro documentation.

**Suggested fix:** Document an unconditional `#![feature(never_type)]` for downstream users, or provide a separately documented consumer-side version/cfg mechanism rather than relying on this crate's private build-script cfg.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: crates/try_v2/src/lib.rs:11


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread crates/try_v2/src/lib.rs Outdated
@MusicalNinjaDad
MusicalNinjaDad enabled auto-merge (squash) September 1, 2026 10:17
@MusicalNinjaDad
MusicalNinjaDad merged commit 3ab2dc9 into main Sep 1, 2026
20 checks passed
@MusicalNinjaDad
MusicalNinjaDad deleted the now_is_never branch September 1, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant