You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
postponedRFCs that have been postponed and may be revisited at a later time.T-langRelevant to the language team, which will review and decide on the RFC.
This would be significantly less useful as a normal lint, because lints run after type checking and so on, and most problems caused by lifetime/type parameter shadowing give errors before the lints can run. It would probably have to be a different kind of lint that runs before type checking to be useful, and as far as I know we don’t have such a category of lints at the moment.
@P1start yeah, we discussed this in the meeting and that is why it is accepted as a hard error. In order to make this a lint, we need to improve the lint infrastructure to allow lints to run before type checking.
I would argue that lints running after typeck is not the only concern around making shadowing a lint and not a hard error. If, for instance, we empirically determine that shadowing type/lifetime params is not intended in, say, 90% of code that inhibits it, then there's little value in it being a lint and some potential cost: lints do not stop compilation, therefore typeck errors emerging from an unintended shadowing could obscure the lint and thus make reading the compiler output more difficult.
nrc
added
the
T-lang
Relevant to the language team, which will review and decide on the RFC.
label
May 15, 2015
postponedRFCs that have been postponed and may be revisited at a later time.T-langRelevant to the language team, which will review and decide on the RFC.
see #459
We accepted this RFC as a hard error, but it should probably be a configurable lint.
The text was updated successfully, but these errors were encountered: