Skip to content

Cleanup NonZero<T>::get #129081

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 2 commits into from
Closed

Cleanup NonZero<T>::get #129081

wants to merge 2 commits into from

Conversation

slanterns
Copy link
Contributor

After #128371, we may be able to remove this complexity.

Codegen test was introduced in #119452.

r? libs

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 14, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.863 Building wheels for collected packages: reuse
#16 2.864   Building wheel for reuse (pyproject.toml): started
#16 3.105   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 3.106   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#16 3.107   Stored in directory: /tmp/pip-ephem-wheel-cache-2y2ze1lc/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 3.109 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.495 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.495 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.6s
---
    Checking core v0.0.0 (/checkout/library/core)
   Compiling libc v0.2.155
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/checkout/library/std)
error[E0609]: no field `0` on type `<T as ZeroablePrimitive>::NonZeroInner`
   --> core/src/num/nonzero.rs:429:16
429 |         self.0.0
    |                ^ unknown field

For more information about this error, try `rustc --explain E0609`.

@slanterns
Copy link
Contributor Author

slanterns commented Aug 14, 2024

I don't know how to bound that NonZero<T> must have a <T as ZeroablePrimitive>::NonZeroInner = NonZeroTInner(T) :( Seems the current design doesn't want to leak the inner type.

@slanterns slanterns closed this Aug 14, 2024
@slanterns slanterns deleted the nonzero_get branch August 14, 2024 09:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants