Santiago Pastorino
ef8abd54b6
fix RPIT ICE for implicit HRTB when missing dyn
2022-09-19 14:39:20 +02:00
Ralf Jung
c7f8e68194
CTFE: more informative error message on ReadPointerAsBytes trouble
2022-09-02 12:47:45 +02:00
bors
1ec9b66a12
Auto merge of #101050 - pnkfelix:revert-mir-inline-policy-for-beta-1.64, r=compiler-errors
...
revert mir inlining policy for beta-1.64
revert mir inlining policy for beta-1.64
Fix #101004
2022-08-31 15:25:57 +00:00
bors
cff90fee12
Auto merge of #99860 - oli-obk:revert_97346, r=pnkfelix
...
Revert "Rollup merge of #97346 - JohnTitor:remove-back-compat-hacks, …
…r=oli-obk"
This reverts commit c703d11dcc , reversing
changes made to 64eb9ab869 .
it didn't apply cleanly, so now it works the same for RPIT and for TAIT instead of just working for RPIT, but we should keep those in sync anyway. It also exposed a TAIT bug (see the feature gated test that now ICEs).
r? `@pnkfelix`
fixes #99536
2022-08-30 17:03:59 -07:00
Dylan DPC
116e19f863
Rollup merge of #100155 - compiler-errors:issue-100154, r=jackh726
...
Use `node_type_opt` to skip over generics that were not expected
Fixes #100154
2022-08-30 17:02:49 -07:00
bors
b4b39cd970
Auto merge of #99893 - compiler-errors:issue-99387, r=davidtwco
...
Delay formatting trimmed path until lint/error is emitted
Fixes #99387
r? `@davidtwco`
2022-08-30 17:02:19 -07:00
Felix S. Klock II
63bb951914
revert mir inlining policy for beta-1.64 to resolve issue #101004 .
2022-08-26 12:18:26 -04:00
Nilstrieb
11a367a7c0
Revert let_chains stabilization
...
This reverts commit 3266460749 .
It was discovered that they are not implemented correctly, which
does not make them ready for stabilization.
2022-08-15 09:05:24 +02:00
Santiago Pastorino
c8da3d4fc7
Add docs for get_remapped_def_id
2022-08-11 11:06:25 -04:00
Santiago Pastorino
babe5a0c67
Iterate def_ids map backwards to try first the latest mappings (it's a stack)
2022-08-11 11:06:25 -04:00
bors
9bbbf60b04
Auto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebank
...
Warn about dead tuple struct fields
Continuation of #92972 . Fixes #92790 .
The language team has already commented on this in https://github.com/rust-lang/rust/pull/92972#issuecomment-1021511970 ; I have incorporated their requests here. Specifically, there is now a new allow-by-default `unused_tuple_struct_fields` lint (name bikesheddable), and fields of unit type are ignored (https://github.com/rust-lang/rust/pull/92972#issuecomment-1021815408 ), so error messages look like this:
```
error: field is never read: `1`
--> $DIR/tuple-struct-field.rs:6:21
|
LL | struct Wrapper(i32, [u8; LEN], String);
| ^^^^^^^^^
|
help: change the field to unit type to suppress this warning while preserving the field numbering
|
LL | struct Wrapper(i32, (), String);
| ~~
```
r? `@joshtriplett`
2022-08-05 09:32:26 +00:00
bors
cdfd675a63
Auto merge of #99867 - spastorino:refactor-remap-lifetimes, r=nikomatsakis
...
Split create_def and lowering of lifetimes for opaque types and bare async fns
r? `@cjgillot`
This work is kind of half-way, but I think it could be merged anyway.
I think we should be able to remove all the vacant arms in `new_named_lifetime_with_res`, if I'm not wrong that requires visiting more nodes. We can do that as a follow up.
In follow-up PRs, besides the thing mentioned previously, I'll be trying to remove `LifetimeCaptureContext`, `captured_lifetimes` as a global data structure, global `binders_to_ignore` and all their friends :).
Also try to remap in a more general way based on def-ids.
2022-08-05 06:35:12 +00:00
Matthias Krüger
c2d7321a2d
Rollup merge of #100148 - durin42:llvm-16-pointertype, r=nikic
...
RustWrapper: update for TypedPointerType in LLVM
This is a result of https://reviews.llvm.org/D130592 .
r? `@nikic`
2022-08-04 22:25:06 +02:00
Matthias Krüger
01ccde5ec8
Rollup merge of #100095 - jackh726:early-binder, r=lcnr
...
More EarlyBinder cleanups
Each commit is independent
r? types
2022-08-04 22:25:04 +02:00
Matthias Krüger
6b938c8491
Rollup merge of #100093 - wcampbell0x2a:unused-parens-for-match-arms, r=petrochenkov
...
Enable unused_parens for match arms
Fixes: https://github.com/rust-lang/rust/issues/92751
Currently I can't get the `stderr` to work with `./x.py test`, but this should fix the issue. Help would be appreciated!
2022-08-04 22:25:02 +02:00
Matthias Krüger
d3aa757ff8
Rollup merge of #100058 - TaKO8Ki:suggest-positional-formatting-argument-instead-of-format-args-capture, r=estebank
...
Suggest a positional formatting argument instead of a captured argument
This patch fixes a part of #96999 .
fixes #98241
fixes #97311
r? `@estebank`
2022-08-04 22:25:01 +02:00
Matthias Krüger
f6ea143f93
Rollup merge of #98796 - compiler-errors:no-semi-if-comma, r=estebank
...
Do not exclusively suggest `;` when `,` is also a choice
Fixes #96791
2022-08-04 22:24:59 +02:00
Santiago Pastorino
4170d7390b
Fix typo
2022-08-04 15:13:47 -03:00
Santiago Pastorino
065e497630
Improve opt_local_def_id docs
2022-08-04 15:13:44 -03:00
Santiago Pastorino
bf1c7da147
Improve record_def_id_remap docs
2022-08-04 12:47:19 -03:00
Santiago Pastorino
ece52451f6
Do not collect lifetimes with Infer resolution
2022-08-04 12:40:00 -03:00
Augie Fackler
cdbe956ec3
RustWrapper: update for TypedPointerType in LLVM
...
This is a result of https://reviews.llvm.org/D130592 .
2022-08-04 11:31:57 -04:00
Santiago Pastorino
45991f9175
Use span_bug instead of panic
2022-08-04 12:07:03 -03:00
Santiago Pastorino
c0923c8934
Add docs to generics_def_id_map
2022-08-04 11:27:03 -03:00
Santiago Pastorino
5e71659983
Add docs to record_elided_anchor
2022-08-04 11:27:02 -03:00
Santiago Pastorino
f8b1b2bdfb
Extract record_elided_anchor
2022-08-04 11:27:02 -03:00
Santiago Pastorino
9f10f589a7
Move new_remapping inside with_hir_id_owner
2022-08-04 11:27:02 -03:00
Santiago Pastorino
1ece866cf1
Add documentation for create_lifetime_defs
2022-08-04 11:27:02 -03:00
Santiago Pastorino
2f353d1f72
Add more debug calls
2022-08-04 11:27:01 -03:00
Santiago Pastorino
cab67404a4
Add documentation about lifetime args
2022-08-04 11:27:01 -03:00
Santiago Pastorino
a3bfdc77a7
Add documentation about lifetime_defs
2022-08-04 11:27:01 -03:00
Santiago Pastorino
9c7de6fb3c
Move hir_bounds after lifetime_defs
2022-08-04 11:27:01 -03:00
Santiago Pastorino
3f7db370ef
captures -> collected_lifetimes
2022-08-04 11:27:00 -03:00
Santiago Pastorino
12fa3393a5
Move lifetimes_in_bounds call to outside with_hir_id_owner block in lower_async_fn_ret_ty
2022-08-04 11:27:00 -03:00
Santiago Pastorino
4b9b5838ac
Move lifetimes_in_bounds call to outside with_hir_id_owner block in lower_opaque_impl_trait
2022-08-04 11:27:00 -03:00
Santiago Pastorino
76b518fc83
Document what collected_lifetimes vec containts
2022-08-04 11:27:00 -03:00
Santiago Pastorino
d85720a083
Document lower_opaque_impl_trait
2022-08-04 11:26:59 -03:00
Santiago Pastorino
6289d0eb53
with_lifetime_binder is now lower_lifetime_binder and doesn't need a closure
2022-08-04 11:26:59 -03:00
Santiago Pastorino
11e00f502a
Add comments on with_remapping
2022-08-04 11:26:59 -03:00
Santiago Pastorino
c946cdceb4
Document opt_local_def_id
2022-08-04 11:26:59 -03:00
Santiago Pastorino
966269a464
Document generics_def_id_map field and record/get methods on it
2022-08-04 11:26:58 -03:00
Santiago Pastorino
78585098b5
Add comments about lifetime collect and create lifetime defs for RPITs
2022-08-04 11:26:58 -03:00
Santiago Pastorino
40bcbed3c7
Avoid explicitly handling res when is not needed
2022-08-04 11:26:58 -03:00
Santiago Pastorino
cd3c388418
create_and_capture_lifetime_defs -> create_lifetime_defs
2022-08-04 11:26:57 -03:00
Santiago Pastorino
13800624de
Remove captured_lifetimes and LifetimeCaptureContext and make create_lifetime_defs return the captures
2022-08-04 11:26:57 -03:00
Santiago Pastorino
1d6cebfd6b
Implement def_id based remapping
2022-08-04 11:26:57 -03:00
Santiago Pastorino
f0db1d68e6
Remove local_def_id from captured_lifetimes
2022-08-04 11:26:57 -03:00
Santiago Pastorino
2d826e27c4
Capture things as Lifetime object to simplify things
2022-08-04 11:26:57 -03:00
Santiago Pastorino
f6b4dd1541
Create new_mapping local structure and avoid checking def_ids on captures
2022-08-04 11:26:56 -03:00
Santiago Pastorino
6c6a81e48e
Remove binders_to_ignore from LifetimeCaptureContext
2022-08-04 11:26:56 -03:00