Skip to content

WASI FileExt::tell is gone, breaks build #385

Description

@Mrmaxmeier

Hi,

building cap-std against wasm32-wasip1 fails with the following compiler error with recent nightlies:

error[E0782]: expected a type, found a trait
   --> cap-std/src/fs/file.rs:528:9
    |
528 |         std::os::wasi::fs::FileExt::tell(&self.std)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: you can add the `dyn` keyword if you want a trait object
    |
528 |         <dyn std::os::wasi::fs::FileExt>::tell(&self.std)
    |         ++++                           +

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

The method was removed here: rust-lang/rust#137205

(I'm not sure how cap-std handles version bumps considering that WASI support depends on the unstable wasi_ext feature but I guess just removing the fn tell(&self) from cap-std's extension trait might be fine?)

Thanks! 🙂

Activity

  1. added a commit that references this issue on Mar 21, 2025
    998e1e0
  2. sunfishcode commented on Mar 21, 2025

    @sunfishcode
    Owner

    Thanks for the report! I've now posted #387 to fix this.

  3. added a commit that references this issue on Apr 4, 2025
    9a7e1be
  4. sunfishcode commented on Apr 4, 2025

    @sunfishcode
    Owner

    This is now fixed in cap-std 3.4.3,

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions