21e6de7eb6
Warn (or error) when `Self` ctor from outer item is referenced in inner nested item This implements a warning `SELF_CONSTRUCTOR_FROM_OUTER_ITEM` when a self constructor from an outer impl is referenced in an inner nested item. This is a proper fix mentioned https://github.com/rust-lang/rust/pull/117246#discussion_r1374648388. This warning is additionally bumped to a hard error when the self type references generic parameters, since it's almost always going to ICE, and is basically *never* correct to do. This also reverts part of https://github.com/rust-lang/rust/pull/117246, since I believe this is the proper fix and we shouldn't need the helper functions (`opt_param_at`/`opt_type_param`) any longer, since they shouldn't really ever be used in cases where we don't have this problem. |
||
---|---|---|
.. | ||
do-not-ice-on-note_and_explain.rs | ||
do-not-ice-on-note_and_explain.stderr | ||
issue-69341-malformed-derive-inert.rs | ||
issue-69341-malformed-derive-inert.stderr | ||
issue-107423-unused-delim-only-one-no-pair.rs | ||
issue-107423-unused-delim-only-one-no-pair.stderr | ||
malformed-derive-entry.rs | ||
malformed-derive-entry.stderr | ||
malformed-interpolated.rs | ||
malformed-interpolated.stderr | ||
malformed-meta-delim.rs | ||
malformed-meta-delim.stderr | ||
malformed-regressions.rs | ||
malformed-regressions.stderr | ||
malformed-special-attrs.rs | ||
malformed-special-attrs.stderr |