Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

unreachable expression #103

Open
yurivict opened this issue Mar 9, 2022 · 0 comments · May be fixed by #108
Open

unreachable expression #103

yurivict opened this issue Mar 9, 2022 · 0 comments · May be fixed by #108

Comments

@yurivict
Copy link

yurivict commented Mar 9, 2022

This warning is printed during the build of the starship project:

warning: unreachable expression
   --> /wrkdirs/usr/ports/shells/starship/work/starship-1.4.0/cargo-crates/sys-info-0.9.1/lib.rs:857:5
    |
838 |                 return Err(Error::IO(io::Error::last_os_error()));
    |                 ------------------------------------------------- any code following this expression is unreachable
...
857 |     Err(Error::UnsupportedSystem)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression
    |
note: the lint level is defined here
   --> /wrkdirs/usr/ports/shells/starship/work/starship-1.4.0/cargo-crates/sys-info-0.9.1/lib.rs:856:12
    |
856 |     #[warn(unreachable_code)]
    |            ^^^^^^^^^^^^^^^^

warning: `sys-info` (lib) generated 1 warning
tmfink added a commit to tmfink/sys-info-rs that referenced this issue Apr 21, 2022
This has the opposite of the desired behavior. Instead of causing a
warning on *unsupported* platforms, this only emits an error on
*supported* platforms.

As of writing, there is no `compiler_warning!` macro like there is
`compile_error!` in std.

Resolves FillZpp#103.
tmfink added a commit to tmfink/sys-info-rs that referenced this issue Apr 21, 2022
Beforehand, this has the opposite of the desired behavior. Instead of
causing a warning on *unsupported* platforms, this only emits an error
on *supported* platforms.

As of writing, there is no `compiler_warning!` macro like there is
`compile_error!` in std.

Resolves FillZpp#103.
@tmfink tmfink linked a pull request Apr 21, 2022 that will close this issue
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 a pull request may close this issue.

1 participant