-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc suggests std::os::ext::fs::FileExt then can't find it #38978
Comments
When I add Edit: It seems there is only a os specific version #35704, because windows updates the file pointer. |
You can use |
Hm, I'm going to close in favor of #26454. I don't think that it's all that helpful to keep this issue around as well; and |
I'm new to Rust and this got me sidetracked a bit. I know
read_at()
needs aFileExt
trait, but I didn't remember where it was, so I referenced it anyway expecting the compiler would direct me to the right place. It didn't. My experience was roughly:Adding the suggested
use
, we get this playground link, which fails with the contradictory error messages:I asked
#rust-beginners
as a sanity check, and they said this is a known issue, namely #26454. I'm reporting it anyway becauseFileExt
will be stable as of 1.15, and if I hit this bug that route, surely others will too.It's not obvious from the error messages that my current target can be served by
use std::os::unix::fs::FileExt;
, and it's not obvious from the online docs that there is a Windows implementation of this trait either. For whatever it's worth, when I sawrustc
suggest an OS-agnostic trait without mentioning the OS-specific ones, I was expecting to find an alias that worked on both platforms (and which wouldn't exist on others) rather than a compiler bug.The text was updated successfully, but these errors were encountered: