Deadbeef
65a0bee0b7
address review comments
2024-06-28 15:44:20 +00:00
Deadbeef
0a2330630d
general fixups and turn TODO
s into FIXME
s
2024-06-28 10:57:35 +00:00
Deadbeef
74e7b5bd76
temporarily disable effects on specialization tests
2024-06-28 10:57:35 +00:00
Deadbeef
72e8244e64
implement new effects desugaring
2024-06-28 10:57:35 +00:00
Nicholas Nethercote
c34ebba134
Remove extern crate rustc_middle
from rustc_ty_utils
.
2024-05-13 08:20:18 +10:00
Michael Goulet
1c19b6ad60
Rename Generics::params to Generics::own_params
2024-05-09 20:58:46 -04:00
Oli Scherer
3a09680671
Ensure nested statics have a HIR node to prevent various queries from ICEing
2024-03-19 09:38:15 +00:00
Oli Scherer
bdb682eda6
The AssocOpaqueTy HIR node is not actually needed to differentiate from other hir nodes that were fed
2024-03-19 08:37:53 +00:00
Guillaume Gomez
3d4464d4d7
Rollup merge of #122513 - petrochenkov:somehir4, r=fmease
...
hir: Remove `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id`
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`.
Follow up to https://github.com/rust-lang/rust/pull/120943 .
2024-03-15 17:24:09 +01:00
Vadim Petrochenkov
ef5513f278
Fill in HIR hash for associated opaque types
2024-03-14 23:29:12 +03:00
Vadim Petrochenkov
89b536dbc8
hir: Remove opt_local_def_id_to_hir_id
and opt_hir_node_by_def_id
...
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`
2024-03-14 22:34:24 +03:00
Vadim Petrochenkov
b6312eb943
Create some minimal HIR for associated opaque types
2024-03-13 17:33:09 +03:00
Michael Goulet
ebc45c8505
Uplift some feeding out of associated_type_for_impl_trait_in_impl and into queries
2024-03-05 15:55:31 +00:00
zetanumbers
24f009c5e5
Move some methods from tcx.hir()
to tcx
...
Renamings:
- find -> opt_hir_node
- get -> hir_node
- find_by_def_id -> opt_hir_node_by_def_id
- get_by_def_id -> hir_node_by_def_id
Fix rebase changes using removed methods
Use `tcx.hir_node_by_def_id()` whenever possible in compiler
Fix clippy errors
Fix compiler
Apply suggestions from code review
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Add FIXME for `tcx.hir()` returned type about its removal
Simplify with with `tcx.hir_node_by_def_id`
2023-12-12 06:40:29 -08:00
Vadim Petrochenkov
17e799c270
rustc: Harmonize DefKind
and DefPathData
...
`DefPathData::(ClosureExpr,ImplTrait)` are renamed to match `DefKind::(Closure,OpaqueTy)`.
`DefPathData::ImplTraitAssocTy` is replaced with `DefPathData::TypeNS(kw::Empty)` because both correspond to `DefKind::AssocTy`.
It's possible that introducing `(DefKind,DefPathData)::AssocOpaqueTy` could be a better solution, but that would be a much more invasive change.
Const generic parameters introduced for effects are moved from `DefPathData::TypeNS` to `DefPathData::ValueNS`, because constants are values.
`DefPathData` is no longer passed to `create_def` functions to avoid redundancy.
2023-12-03 16:24:56 +03:00
Vadim Petrochenkov
f0dc906319
resolve: Feed the def_kind
query immediately on DefId
creation
2023-11-28 15:39:31 +03:00
Vadim Petrochenkov
c697927f44
rustc: hir().local_def_id_to_hir_id()
-> tcx.local_def_id_to_hir_id()
cleanup
2023-11-26 12:41:21 +03:00
Vadim Petrochenkov
2c23386344
rustc: Make def_kind
mandatory for all DefId
s
2023-11-25 14:49:43 +03:00
Nilstrieb
21a870515b
Fix clippy::needless_borrow
in the compiler
...
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.
Then I had to remove a few unnecessary parens and muts that were exposed
now.
2023-11-21 20:13:40 +01:00
Nicholas Nethercote
e2664eba50
Reduce exposure of some items.
2023-11-20 14:10:19 +11:00
DaniPopes
27364309a5
compiler: use copied
instead of manual map
2023-11-03 17:18:56 +01:00
Michael Goulet
b2d2184ede
Format all the let chains in compiler
2023-10-13 08:59:36 +00:00
Michael Goulet
bf38111ac1
tighten span slightly for synthetic item
2023-07-27 22:20:32 +00:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Mark Rousskov
cc907f80b9
Re-format let-else per rustfmt update
2023-07-12 21:49:27 -04:00
Santiago Pastorino
20429af7a3
Replace RPITIT current impl with new strategy that lowers as a GAT
2023-07-08 18:21:34 -03:00
Boxy
12138b8e5e
Move TyCtxt::mk_x
to Ty::new_x
where applicable
2023-07-05 20:27:07 +01:00
Deadbeef
58c105af04
include host_effect_index
in Generics
2023-07-04 17:21:52 +00:00
Santiago Pastorino
4925b57782
Add bidirectional where clauses on RPITIT synthesized GATs
2023-06-29 14:26:26 -03:00
Oli Scherer
c8979e587b
Move opaque_type_origin_unchecked
onto TyCtxt
and re-use it where it was open coded
2023-06-22 14:31:15 +00:00
Deadbeef
21bc5cded4
Rename impl_defaultness
to defaultness
2023-06-01 06:14:06 +00:00
lcnr
08d149ca85
EarlyBinder::new -> EarlyBinder::bind
2023-05-29 13:46:10 +02:00
Kyle Matsuda
03534ac8b7
Replace EarlyBinder(x) with EarlyBinder::new(x)
2023-05-28 10:44:50 -06:00
John Kåre Alsaker
fff20a703d
Move expansion of query macros in rustc_middle to rustc_middle::query
2023-05-15 08:49:13 +02:00
Santiago Pastorino
f2cf795af4
Make generics_of has_self on RPITITs delegate to the opaque
2023-05-05 16:24:51 -03:00
Michael Goulet
76b0cf812b
Walk return-position impl trait in trait deeply in associated_item_def_ids
2023-03-29 11:19:48 -03:00
bors
8859fde21f
Auto merge of #109497 - matthiaskrgr:rollup-6txuxm0, r=matthiaskrgr
...
Rollup of 10 pull requests
Successful merges:
- #109373 (Set LLVM `LLVM_UNREACHABLE_OPTIMIZE` to `OFF`)
- #109392 (Custom MIR: Allow optional RET type annotation)
- #109394 (adapt tests/codegen/vec-shrink-panik for LLVM 17)
- #109412 (rustdoc: Add GUI test for "Auto-hide item contents for large items" setting)
- #109452 (Ignore the vendor directory for tidy tests.)
- #109457 (Remove comment about reusing rib allocations)
- #109461 (rustdoc: remove redundant `.content` prefix from span/a colors)
- #109477 (`HirId` to `LocalDefId` cleanup)
- #109489 (More general captures)
- #109494 (Do not feed param_env for RPITITs impl side)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2023-03-22 21:35:02 +00:00
Santiago Pastorino
1c9ad28dd2
Do not feed param_env for RPITITs impl side
2023-03-22 14:06:22 -03:00
Michael Goulet
c3e6f68931
RPITITs are DefKind::Opaque with new lowering strategy
2023-03-21 23:36:07 +00:00
Michael Goulet
7e6506764b
IdentitySubsts::identity_for_item takes Into<DefId>
2023-03-21 15:38:52 +00:00
Michael Goulet
2eb1c08e43
Use local key in providers
2023-03-21 15:38:51 +00:00
Matthias Krüger
d86fd83ef6
Rollup merge of #109277 - spastorino:new-rpitit-14, r=compiler-errors
...
Fix generics_of for impl's RPITIT synthesized associated type
The only useful commit is the last one.
This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used.
This solution is better but we still need to fix resolution of the generated generics.
r? ``@compiler-errors``
2023-03-20 09:46:53 +01:00
Michael Goulet
4fd66d70cb
Update some names and comments
2023-03-20 04:51:53 +00:00
Santiago Pastorino
640c20272e
Fix generics_of for impl's RPITIT synthesized associated type
2023-03-17 20:01:57 -03:00
Santiago Pastorino
11f1810831
Feed is_type_alias_impl_trait for RPITITs on the trait side
2023-03-15 16:58:37 -03:00
Santiago Pastorino
39ffe9699a
Properly implement generics_of for traits
2023-03-15 12:27:16 -03:00
Santiago Pastorino
26c4c1ea97
Rename impl_trait_in_trait_parent to impl_trait_in_trait_parent_fn
2023-03-15 12:27:16 -03:00
Santiago Pastorino
a4e40370d0
Make fns from other crates with RPITIT work
2023-03-14 10:20:35 -03:00
Michael Goulet
ce8dae5800
Don't opt_rpitit_info as a separate query
2023-03-13 17:02:47 +00:00
bors
9455a5591b
Auto merge of #108700 - spastorino:new-rpitit-impl-side-2, r=compiler-errors
...
Make RPITITs simple cases work when using lower_impl_trait_in_trait_to_assoc_ty
r? `@compiler-errors`
It's probably best reviewed commit by commit.
2023-03-12 00:49:35 +00:00