Skip to content

Implement TryFrom between NonZero types. - #77339

Merged
bors merged 2 commits into
rust-lang:masterfrom
fusion-engineering-forks:tryfrom-nonzero-to-nonzero
Oct 23, 2020
Merged

Implement TryFrom between NonZero types.#77339
bors merged 2 commits into
rust-lang:masterfrom
fusion-engineering-forks:tryfrom-nonzero-to-nonzero

Conversation

@m-ou-se

Copy link
Copy Markdown
Member

This will instantly be stable, as trait implementations for stable types and traits can not be #[unstable].

Closes#77258.

@rustbot modify labels: +T-libs

@rustbotrustbot added the T-libs-api [DEPRECATED; DO NOT USE] label Sep 29, 2020
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @dtolnay

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2020
@scottmcmscottmcm added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Oct 1, 2020

@dtolnaydtolnay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, this is great.

@dtolnay

Copy link
Copy Markdown
Member

@rust-lang/libs: This PR adds all the appropriate nonzero->nonzero TryFrom impls, e.g.:

implTryFrom<NonZeroU64>forNonZeroI32

The Error associated type of the TryFrom impl is the same one that we use for all int->int, int->nonzero, nonzero->int TryFrom impls already.

@rfcbot fcp merge

@rfcbot

rfcbot commented Oct 15, 2020

Copy link
Copy Markdown

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbotrfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 15, 2020
@rfcbotrfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Oct 23, 2020
@rfcbot

Copy link
Copy Markdown

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbotrfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Oct 23, 2020
@dtolnay

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit b9db54b has been approved by dtolnay

@bors

bors commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2020
@JohnTitorJohnTitor mentioned this pull request Oct 23, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 23, 2020
Rollup of 17 pull requests
Successful merges:
- rust-lang#77268 (Link to "Contributing to Rust" rather than "Getting Started".)
- rust-lang#77339 (Implement TryFrom between NonZero types.)
- rust-lang#77488 (Mark `repr128` as `incomplete_features`)
- rust-lang#77890 (Fixing escaping to ensure generation of welformed json.)
- rust-lang#77918 (Cleanup network tests)
- rust-lang#77920 (Avoid extraneous space between visibility kw and ident for statics)
- rust-lang#77969 (Doc formating consistency between slice sort and sort_unstable, and big O notation consistency)
- rust-lang#78098 (Clean up and improve some docs)
- rust-lang#78116 (Make inline const work in range patterns)
- rust-lang#78153 (Sync LLVM submodule if it has been initialized)
- rust-lang#78163 (Clean up lib docs)
- rust-lang#78169 (Update cargo)
- rust-lang#78231 (Make closures inherit the parent function's target features)
- rust-lang#78235 (Explain where the closure return type was inferred)
- rust-lang#78255 (Reduce diagram mess in 'match arms have incompatible types' error)
- rust-lang#78263 (Add regression test of issue-77668)
- rust-lang#78265 (Add some inference-related regression tests about incorrect diagnostics)
Failed merges:
r? `@ghost`
@bors
bors merged commit 8e37330 into rust-lang:masterOct 23, 2020
@rustbotrustbot added this to the 1.49.0 milestone Oct 23, 2020
@rfcbotrfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Nov 2, 2020
@spastorinospastorino removed the to-announce Announce this issue on triage meeting label Nov 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-libs-api[DEPRECATED; DO NOT USE]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing TryFrom<NonZeroFoo> for NonZeroBar

8 participants

@m-ou-se@rust-highfive@dtolnay@rfcbot@bors@spastorino@scottmcm@rustbot