delegation: simplify matches on FnKind, minor refactorings - #160853
delegation: simplify matches on FnKind, minor refactorings#160853aerooneqq wants to merge 1 commit into
FnKind, minor refactorings#160853Conversation
e9a04e2 to
e680d29
Compare
|
I'm generally skeptical about introduction of the extension trait. Removing unnecessary lifetime parameters (#160853 (comment)) will make things nicer if the current setup without the extension trait is kept. |
|
The logic behind the fn kind matching refactoring is also not very clear to me. |
|
Reverted creation of extension to
I think exhaustive matching does not allow to see the general strategy of handling different In In In So I like new matches more than old ones (wildcard patterns reduce thinking overhead which is needed when first-time looking at exhaustive pattern with 4 tuples of @rustbot ready |
|
✌️ @aerooneqq, you can now approve this pull request! If @petrochenkov told you to " |
|
Reminder, once the PR becomes ready for a review, use |
|
@bors squash |
This comment has been minimized.
This comment has been minimized.
* More concise matches on `FnKind`, some renamings * Move most of utility functions to extensions * Address review comments * Revert "Move most of utility functions to extensions" * Address review comments
|
🔨 5 commits were squashed into d6e4a1d. |
c5400fa to
d6e4a1d
Compare
|
@bors r=petrochenkov |
…es, r=petrochenkov delegation: simplify matches on `FnKind`, minor refactorings This PR refactors matches on `FnKind` making them smaller and more concise, next in all matches except `fn_kinds` function we no longer panic on delegation to inherent impls. And some minor renamings/refactorings. First step for rust-lang#160505. Part of rust-lang#118212. r? @petrochenkov
…es, r=petrochenkov delegation: simplify matches on `FnKind`, minor refactorings This PR refactors matches on `FnKind` making them smaller and more concise, next in all matches except `fn_kinds` function we no longer panic on delegation to inherent impls. And some minor renamings/refactorings. First step for rust-lang#160505. Part of rust-lang#118212. r? @petrochenkov
…uwer Rollup of 16 pull requests Successful merges: - #161259 (move some attribute related structs out of rustc_attr_ir) - #160853 (delegation: simplify matches on `FnKind`, minor refactorings) - #159899 ( `GenericArgs::types` triage + possible fixes) - #160459 (Use attribute parser for `deprecated` attribute checking) - #160813 (Optimize linked list iterator performance) - #161271 (doc: document safety requirements for core WTF-8) - #161317 (LLVM 24: configure float-abi via module flag) - #161320 (Only suggest `RUST_MIN_STACK` if maybe stack overflow) - #161369 (Add regression test for confusing lifetime error message issue) - #161393 (Configure LLM policy URL for triagebot) - #161403 (splat-fn-ptr-ptr-tuple.rs: add `let` to avoid UB) - #161409 (Add back `tests/rustdoc-gui/notable-trait.goml` test) - #161410 (Fix rustdoc remapping `documentation` scope documentation) - #161415 (Update expect messages in path docs to better follow guidelines) - #161438 (Change triagebot backport to ping T-libs-fcp) - #161442 (Add regression test for dead code on type alias used in impl self type) Failed merges: - #160509 (Remove `RegionExt`; move methods to `Region` in `rustc_type_ir`)
…es, r=petrochenkov delegation: simplify matches on `FnKind`, minor refactorings This PR refactors matches on `FnKind` making them smaller and more concise, next in all matches except `fn_kinds` function we no longer panic on delegation to inherent impls. And some minor renamings/refactorings. First step for rust-lang#160505. Part of rust-lang#118212. r? @petrochenkov
This PR refactors matches on
FnKindmaking them smaller and more concise, next in all matches exceptfn_kindsfunction we no longer panic on delegation to inherent impls. And some minor renamings/refactorings. First step for #160505.Part of #118212.
r? @petrochenkov