Increased severity of lints in 2021 edition

If there is a 2021 edition, what lints should have increased severity, if any?

Looking through the list of lints, a few are already listed as deprecated/being phased out but are allow by default:

Similarly, currently warn by default and deprecated/being phased out:

I think this is a good starting point, but there are definitely others (like const-err) that make perfect sense to increase the severity of.

2 Likes

I would be happy already if at least rustdoc would follow this. (See for example the return type of

Mutex::lock.)

2 Likes

Wait, what? The docs you linked to say:

So now lifetime elision is being deprecated? Why?

2 Likes

You can still elide obvious cases with direct references, but it's the hidden cases that are deprecated. If you have a struct Foo<'a>, then in use it should at least be written Foo<'_>, if not with an explicit lifetime.

2 Likes

Ah, okay. The documentation is kinda short-spoken on that.

A better name for the lint would probably be omitted lifetime, not elided.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.