Rust ergonomics keeps getting better

370 points geoffmureithi

I really like the "Rust reports potentially useful cfg-disabled items in errors" feature that was added in 1.72, I don't have to go looking through docs or even code to find a specific feature. 👏

--> src/lib.rs:172:26
        |
    172 |         let svc = tower::service_fn(|request: usize| async move { Ok(request) });
        |                          ^^^^^^^^^^ not found in `tower`
        |
    note: found an item that was configured out
       --> _/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/lib.rs:223:22
        |
    223 | pub use self::util::{service_fn, ServiceExt};
        |                      ^^^^^^^^^^
        = note: the item is gated behind the `util` feature

Now I just have to adjust the dependency

tower = { vesion = "0.4", features = ["util"] }

Looking forward to more features!