I have a written a bit of rust by now, but one problem I always seem to encounter it that the features a create supports never seem to be documented. Neither what features are available, what they each do or which are default. Is that really the case, or am I missing something?

I constantly seem to include something from the docs, only to be told by the compiler that it does not exist, and then I have to open the source for the create to figure out if it’s hidden behind a feature flag.

Also, is it really true that I can’t disable a single feature from the default set, without having to copy the default list and manually removing it?

You are viewing a single thread.
View all comments View context
1 point

Didn’t know about this, looking forward for this to be stabilized. But a comment on your command, it is easier to use --all-features instead of listing them all.

permalink
report
parent
reply
1 point
*

--all-features doesn’t work with that particular crate because two of the features conflict with each other. The features list in my command is the one used for docs.rs from the crate’s Cargo.toml.

permalink
report
parent
reply

Rust

!rust@programming.dev

Create post

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

Community stats

  • 491

    Monthly active users

  • 813

    Posts

  • 3.7K

    Comments