Camille GILLOT
60e04d1e8c
Compute generator saved locals on MIR.
2023-01-27 20:10:06 +00:00
Kyle Matsuda
a969c194d8
fix up subst_identity vs skip_binder; add some FIXMEs as identified in review
2023-01-26 20:28:31 -07:00
Kyle Matsuda
c2414dfaa4
change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add EarlyBinder to fn_sig in metadata
2023-01-26 20:28:25 -07:00
Kyle Matsuda
e982971ff2
replace usages of fn_sig query with bound_fn_sig
2023-01-26 20:15:36 -07:00
Vincenzo Palazzo
7d2c1103d7
fix: use LocalDefId instead of HirId in trait res
...
use LocalDefId instead of HirId in trait resolution to simplify
the obligation clause resolution
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-23 11:42:18 +00:00
Michael Goulet
8742fd9c85
Label closure captures/generator locals that make opaque types recursive
2023-01-21 05:49:36 +00:00
bors
56ee85274e
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
...
Remove some `ref` patterns from the compiler
Previous PR: https://github.com/rust-lang/rust/pull/105368
r? `@Nilstrieb`
2023-01-20 04:52:28 +00:00
Scott McMurray
925dc37313
Stop using BREAK
& CONTINUE
in compiler
...
Switching them to `Break(())` and `Continue(())` instead.
libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17 23:17:51 -08:00
Matthias Krüger
68f12338af
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
...
Remove double spaces after dots in comments
Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17 20:21:25 +01:00
Maybe Waffle
6a28fb42a8
Remove double spaces after dots in comments
2023-01-17 08:09:33 +00:00
Maybe Waffle
8d3c90ae13
Review suggestions
2023-01-17 07:48:20 +00:00
Maybe Waffle
09485eaae1
rustc_hir_analysis
: remove ref
patterns
2023-01-17 07:48:19 +00:00
Maybe Waffle
d60e772e14
rustc_hir_analysis
: some general code improvements
2023-01-17 07:48:19 +00:00
Maybe Waffle
360e978437
Don't call closures immediately, use try{}
blocks
2023-01-17 07:48:19 +00:00
Michael Goulet
90df86f474
Remove bound_{explicit,}_item_bounds
2023-01-15 15:36:06 +00:00
Michael Goulet
9b28edb6d7
Make InstantiatedPredicates impl IntoIterator
2023-01-15 15:36:06 +00:00
Michael Goulet
91fd862df0
instantiate_own doesn't need to return a pair of vectors
2023-01-15 15:29:53 +00:00
Kyle Matsuda
6e969ea85e
fix various subst_identity vs skip_binder
2023-01-14 00:30:03 -07:00
Kyle Matsuda
f29a334c90
change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14 00:29:56 -07:00
Kyle Matsuda
be130b57d4
change usages of impl_trait_ref to bound_impl_trait_ref
2023-01-14 00:23:32 -07:00
Kyle Matsuda
ef58baf8b8
change const_param_default query to return EarlyBinder; remove bound_const_param_default query; add EarlyBinder to const_param_default in metadata
2023-01-14 00:13:07 -07:00
Kyle Matsuda
bd6c63597b
change usages of const_param_default query to bound_const_param_default
2023-01-14 00:13:07 -07:00
Matthias Krüger
1dc43b2e8b
Rollup merge of #106465 - compiler-errors:bump-IMPLIED_BOUNDS_ENTAILMENT, r=lcnr
...
Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow
https://github.com/rust-lang/rust/pull/105575#issuecomment-1357201969
> and then later in the same cycle increase the lint to `deny` and change it to `FutureCompatReportNow` in this nightly cycle.
r? ```@lcnr``` when they're back from holiday 😄
2023-01-13 19:16:41 +01:00
Michael Goulet
eaa7cc84d3
Add logic to make IMPLIED_BOUNDS_ENTAILMENT easier to understand
2023-01-13 00:39:54 +00:00
Michael Goulet
5924c2511e
Only point at impl self ty in WF if trait predicate shares self ty
2023-01-12 22:25:30 +00:00
Michael Goulet
2aabb0fd5d
Point at impl self type for impl wf obligations
2023-01-12 20:44:47 +00:00
Michael Goulet
d76e168f01
Point at HIR types when impl trait ref doesn't normalize
2023-01-12 20:44:47 +00:00
Michael Goulet
c8334ce60c
Move autoderef to rustc_hir_analysis
2023-01-11 20:12:57 +00:00
Yuki Okushi
e5e116dca9
Rollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obk
...
No need to take opaques in `check_type_bounds`
`InferCtxt` already has its defining use anchor set to err
r? ``@oli-obk``
2023-01-10 08:05:34 +09:00
Michael Goulet
f769d34291
Assert defining anchor is set in take_opaque_types
2023-01-09 18:14:28 +00:00
Michael Goulet
5132e13f13
No need to take opaques in check_type_bounds
2023-01-09 17:27:42 +00:00
fee1-dead
7779386a3a
Rollup merge of #106164 - compiler-errors:check-region-tweak, r=oli-obk
...
Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`
Makes sense for this function to live with its sibling `resolve_regions_and_report_errors`, around which it's basically just a wrapper.
2023-01-09 23:35:29 +08:00
bors
c54c8cbac8
Auto merge of #106582 - compiler-errors:better-spans-on-bad-tys, r=lcnr
...
Improve spans of non-WF implied bound types
Fixes #60980
2023-01-09 08:40:08 +00:00
Michael Goulet
6afd16171d
Rollup merge of #106131 - compiler-errors:not-ptrs, r=davidtwco
...
Mention "signature" rather than "fn pointer" when impl/trait methods are incompatible
Fixes #80929
Fixes #67296
2023-01-08 19:57:53 -08:00
Michael Goulet
0bddce5090
Normalize assumed_wf_types after wfchecking is complete, for better spans
2023-01-08 18:50:09 +00:00
Michael Goulet
ca554efaf7
Improve spans of non-WF implied bound types
2023-01-08 18:50:08 +00:00
Michael Goulet
49f849a3d2
Mention signature rather than fn pointers when comparing impl/trait methods
2023-01-08 03:49:24 +00:00
Michael Goulet
3c41003873
Add type flags support for Ty and Const late-bound regions
2023-01-08 03:37:20 +00:00
Michael Goulet
c104ee9f6d
Move check_region_obligations_and_report_errors to TypeErrCtxt
2023-01-03 23:58:12 +00:00
Matthias Krüger
c610aeb592
Rollup merge of #106221 - Nilstrieb:rptr-more-like-ref-actually, r=compiler-errors
...
Rename `Rptr` to `Ref` in AST and HIR
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already as well.
2022-12-29 13:16:04 +01:00
Nilstrieb
9067e4417e
Rename Rptr
to Ref
in AST and HIR
...
The name makes a lot more sense, and `ty::TyKind` calls it `Ref` already
as well.
2022-12-28 18:52:36 +01:00
bors
83a28ef095
Auto merge of #106129 - compiler-errors:compare_method-tweaks, r=BoxyUwU
...
Some `compare_method` tweaks
1. Make some of the comparison functions' names more regular
2. Reduce pub scope of some of the things in `compare_method`
~3. Remove some unnecessary opaque type handling code -- `InferCtxt` already is in a mode that doesn't define opaque types~
* moved to a different PR
4. Bubble up `ErrorGuaranteed` for region constraint errors in `compare_method` - Improves a redundant error message in one unit test.
5. Move the `compare_method` module to have a more general name, since it's more like `compare_impl_item` :)
6. Rename `collect_trait_impl_trait_tys`
2022-12-28 13:07:30 +00:00
Michael Goulet
96d8011fa8
better names and a comment
2022-12-28 04:18:37 +00:00
Michael Goulet
c7b414adb6
Rename module compare_method -> compare_impl_item
2022-12-28 04:18:37 +00:00
Michael Goulet
91613c5030
make some things less pub
2022-12-28 04:18:37 +00:00
Esteban Küber
50c1be1d19
Emit fewer errors on invalid #[repr(transparent)]
on enum
...
Fix #68420 .
2022-12-27 18:28:02 -08:00
Matthias Krüger
d8874f259a
fix more clippy::style findings
...
match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed
2022-12-25 17:32:26 +01:00
Michael Goulet
8973b3e3cc
Bubble up ErrorGuaranteed from region constraints in method item compare
2022-12-24 21:37:00 +00:00
Michael Goulet
6161758b6d
Rename some compare_method functions
2022-12-24 21:36:58 +00:00
Matthias Krüger
d23cb738d2
Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
...
rustc: Remove needless lifetimes
2022-12-24 00:31:41 +01:00