Commit e56b411
gccrs: Resolve lang item types
Lang items might not already be resolved when an expression depending on
them is resolved.
The new test is a copy of for-loop1.rs in the same directory, but the
main function item is moved towards the top of the file. It still
produces a compiler error after type checking, but that can be resolved
in another patch.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc
(TypeCheckExpr::visit (BoxExpr)): Attempt to resolve lang item,
instead of just looking it up.
(TypeCheckExpr::visit (RangeFromToExpr)): Likewise.
(TypeCheckExpr::visit (RangeFromExpr)): Likewise.
(TypeCheckExpr::visit (RangeToExpr)): Likewise.
(TypeCheckExpr::visit (RangeFullExpr)): Likewise.
gcc/testsuite/ChangeLog:
* rust/compile/for-loop3.rs: New test.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>1 parent c869502 commit e56b411
2 files changed
Lines changed: 554 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 202 | | |
206 | 203 | | |
207 | 204 | | |
| |||
829 | 826 | | |
830 | 827 | | |
831 | 828 | | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
| 829 | + | |
836 | 830 | | |
837 | 831 | | |
838 | 832 | | |
| |||
880 | 874 | | |
881 | 875 | | |
882 | 876 | | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
| 877 | + | |
887 | 878 | | |
888 | 879 | | |
889 | 880 | | |
| |||
924 | 915 | | |
925 | 916 | | |
926 | 917 | | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
| 918 | + | |
931 | 919 | | |
932 | 920 | | |
933 | 921 | | |
| |||
1065 | 1053 | | |
1066 | 1054 | | |
1067 | 1055 | | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
| 1056 | + | |
1072 | 1057 | | |
1073 | 1058 | | |
1074 | 1059 | | |
| |||
0 commit comments