Same error code is used for all unstable features?

I recently ran into this:

error[E0658]: anonymous lifetimes in `impl Trait` are unstable
   --> src/lib.rs:407:55
    |
407 |     change_stream: &impl ParallelIterator<Result<git::Change, Error>>,
    |                                                       ^^^^^^

Usually when I accidentally depend on something unstable rustc helpfully gives a github issue link, but for some reason didn't in this case. So I googled E0658 to try and find one (I like to subscribe to the issues so I get notified if the feature becomes stable later). And curiously it seems to come up often for unrelated errors:

They're all related to unstable feature use though, so it appears there's one error code used for that for all unstable features. However this undermines the point of the error codes -- when I google E0658 I'm getting advice that's not relevant to my issue. Ideally what would come up would be something relevant to my use of anonymous lifetimes with impl trait.

Not a huge papercut but I figured worth mentioning, seems like low hanging fruit for improving user error experience.

It is a blanket error. There's some similar gripes in #50459.

You didn't include enough code for me to reproduce, but if you try to use something with a feature gate on nightly, it will generally tell you the feature gate name (which it doesn't tell you on stable). That in turn can help you find the tracking issue. I have also thought it would be nice to be given that information on stable.

1 Like

LOL, there is a comment from me 3 years ago in that thread, apparently I have run into this before :joy:

1 Like