rust/tests/ui/malformed
bors 21e6de7eb6 Auto merge of #124187 - compiler-errors:self-ctor, r=petrochenkov
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.
2024-05-25 01:17:55 +00:00
..
do-not-ice-on-note_and_explain.rs Warn/error on self ctor from outer item in inner item 2024-05-18 13:08:34 -04:00
do-not-ice-on-note_and_explain.stderr Warn/error on self ctor from outer item in inner item 2024-05-18 13:08:34 -04:00
issue-69341-malformed-derive-inert.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-69341-malformed-derive-inert.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-107423-unused-delim-only-one-no-pair.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-107423-unused-delim-only-one-no-pair.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
malformed-derive-entry.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
malformed-derive-entry.stderr Tweak output for 'add line' suggestion 2023-04-12 22:50:10 +00:00
malformed-interpolated.rs Improve an error involving attribute values. 2023-12-12 15:54:25 +11:00
malformed-interpolated.stderr Improve an error involving attribute values. 2023-12-12 15:54:25 +11:00
malformed-meta-delim.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
malformed-meta-delim.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
malformed-regressions.rs Make early lints translatable 2024-05-21 20:16:39 +00:00
malformed-regressions.stderr Make early lints translatable 2024-05-21 20:16:39 +00:00
malformed-special-attrs.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
malformed-special-attrs.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00