This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit cf6a73c
committed
Remove where bound from
Basically, this entails moving the arguments cleaning to the call site.
I extracted several local variables because:
1. It makes the code easier to read and understand.
2. If I hadn't, the extra `clean()` calls would have caused complicated
tuples to be split across several lines.
3. I couldn't just extract local variables for `args` because then the
arguments would be cleaned *before* the generics, while rustdoc expects
them to be cleaned *after*. Only extracting `args` caused panics like
this:
thread 'rustc' panicked at 'assertion failed: cx.impl_trait_bounds.is_empty()',
src/librustdoc/clean/utils.rs:462:5
Extracting variables makes the control flow -- and the required
order of cleaning -- more explicit.clean_fn_decl_with_args
1 parent 169b84f commit cf6a73c
1 file changed
+19
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
766 | 769 | | |
767 | 770 | | |
768 | 771 | | |
| |||
805 | 808 | | |
806 | 809 | | |
807 | 810 | | |
808 | | - | |
| 811 | + | |
809 | 812 | | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
821 | 817 | | |
822 | 818 | | |
823 | 819 | | |
| |||
897 | 893 | | |
898 | 894 | | |
899 | 895 | | |
900 | | - | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
901 | 900 | | |
902 | 901 | | |
903 | 902 | | |
| |||
1731 | 1730 | | |
1732 | 1731 | | |
1733 | 1732 | | |
1734 | | - | |
| 1733 | + | |
| 1734 | + | |
1735 | 1735 | | |
1736 | 1736 | | |
1737 | 1737 | | |
| |||
2029 | 2029 | | |
2030 | 2030 | | |
2031 | 2031 | | |
2032 | | - | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
2033 | 2036 | | |
2034 | 2037 | | |
2035 | 2038 | | |
| |||
0 commit comments