Skip to content

Non-primitive cast error #4

Closed
Closed

Description

@scalarwaves

While building:

error[E0605]: non-primitive cast: `sysinfo::linux::process::ProcessStatus` as `i64`
  --> src/object/process.rs:20:35
   |
20 |     dict.add("status", Value::int(proc.status() as i64));
   |                                   ^^^^^^^^^^^^^^^^^^^^
   |
   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait

error: aborting due to previous error

For more information about this error, try `rustc --explain E0605`.
error: Could not compile `nu`.

I'm running rustc 1.36.0-nightly (7158ed9cb 2019-05-15)

Activity

  1. twe4ked commented on May 17, 2019

    @twe4ked
    Contributor

    I get the same issue on rustc 1.36.0-nightly (4443957f2 2019-05-12) on macOS 10.14.1 (18B75).

  2. wycats commented on May 17, 2019

    @wycats
    Contributor

    I'm looking into this on Linux, but I think I have a lead.

  3. wycats commented on May 17, 2019

    @wycats
    Contributor

    Fixed in 1167773

  4. added a commit that references this issue on Jun 24, 2021
  5. added a commit that references this issue on Feb 7, 2022
  6. added 2 commits that reference this issue on Jan 27, 2023
  7. 5 remaining items

  8. added a commit that references this issue on Apr 27, 2024
  9. added a commit that references this issue on Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions