Vadim Petrochenkov
b6312eb943
Create some minimal HIR for associated opaque types
2024-03-13 17:33:09 +03:00
León Orell Valerian Liehr
05ce209d20
Rename some normalization-related items
2024-02-20 17:30:49 +01:00
Matthias Krüger
ca36ed27be
Rollup merge of #119600 - aDotInTheVoid:comment-fix, r=compiler-errors
...
Remove outdated references to librustc_middle
The relevant comment is now in 791a53f380/compiler/rustc_middle/src/tests.rs (L3-L13)
2024-02-05 06:37:14 +01:00
Oli Scherer
557b111870
Make crate_inherent_impls fallible and stop using track_errors for it
2024-01-17 10:02:29 +00:00
Oli Scherer
5461836281
specialization_graph_of's errored field is used in the only call site, and used to immediately throw away the rest of the value. Let's use Result to statically signal that this is happening
2024-01-11 20:34:59 +00:00
Alona Enraght-Moony
16e117cf96
Remove outdated references to librustc_middle.
2024-01-05 16:34:52 +00:00
Michael Woerister
5c8eee4275
Make iteration order of collect_return_position_impl_trait_in_trait_tys query stable
2024-01-04 13:48:57 +01:00
Michael Goulet
f3218b2a70
Make ConstKind and TyKind Copy
2023-12-12 01:09:12 +00:00
Michael Goulet
4ec68576d3
Cache flags for ty::Const
2023-11-22 23:28:28 +00:00
Nicholas Nethercote
6ba4c2f017
Remove unused arena kinds in rustc_hir and rustc_middle.
2023-11-20 15:05:26 +11:00
lcnr
15ae59ba03
use global cache when computing proof trees
2023-11-02 10:41:27 +01:00
Lukas Wirth
6d141c11c0
Implement Deref<LayoutS> for Layout
2023-10-02 21:31:16 +02:00
bjorn3
c6247387b4
Remove metadata_loader query
...
It is only used by CrateLoader. We can store the metadata loader in
CStore instead which CrateLoader has access to.
2023-08-13 16:38:50 +00:00
Vadim Petrochenkov
7353c96be8
rustc: Move features from Session to GlobalCtxt
...
Removes two pieces of mutable state.
Follow up to #114622 .
2023-08-11 16:51:50 +08:00
Michael Goulet
fbdef58414
Migrate predicates_of and caller_bounds to Clause
2023-06-26 23:12:03 +00:00
Camille GILLOT
7d5b2e4926
Make closure_saved_names_of_captured_variables a query.
2023-06-19 16:50:52 +00:00
Nilstrieb
a647ba250a
Remember names of cfg-ed out items to mention them in diagnostics
...
`#[cfg]`s are frequently used to gate crate content behind cargo
features. This can lead to very confusing errors when features are
missing. For example, `serde` doesn't have the `derive` feature by
default. Therefore, `serde::Serialize` fails to resolve with a generic
error, even though the macro is present in the docs.
This commit adds a list of all stripped item names to metadata. This is
filled during macro expansion and then, through a fed query, persisted
in metadata. The downstream resolver can then access the metadata to
look at possible candidates for mentioning in the errors.
This slightly increases metadata (800k->809k for the feature-heavy
windows crate), but not enough to really matter.
2023-06-01 19:17:19 +02:00
Michael Goulet
f3c9c21658
Prepopulate opaques in canonical input
2023-05-25 03:21:22 +00:00
Maybe Waffle
e496fbec92
Split {Idx, IndexVec, IndexSlice} into their own modules
2023-04-24 13:53:35 +00:00
Kyle Matsuda
522bc5f817
add EarlyBinder to return type of collect_return_position_impl_trait_in_trait_tys query; remove bound_X version
2023-04-18 16:33:06 -06:00
Vadim Petrochenkov
d11b9165ee
resolve: Preserve reexport chains in ModChildren
...
This may be potentially useful for
- avoiding uses of `hir::ItemKind::Use`
- preserving documentation comments on all reexports
- preserving and checking stability/deprecation info on reexports
- all kinds of diagnostics
2023-04-08 13:29:15 +03:00
Vadim Petrochenkov
aca1b1e0b3
rustc_interface: Add a new query pre_configure
...
It partially expands crate attributes before the main expansion pass (without modifying the crate), and the produced preliminary crate attribute list is used for querying a few attributes that are required very early.
Crate-level cfg attributes are then expanded normally during the main expansion pass, like attributes on any other nodes.
2023-03-23 14:22:48 +04:00
Matthias Krüger
df50001c7d
Rollup merge of #108806 - cjgillot:query-lints, r=davidtwco
...
Querify register_tools and post-expansion early lints
The 2 extra queries correspond to code that happen before and after macro expansion, and don't need the resolver to exist.
2023-03-11 15:43:15 +01:00
Camille GILLOT
b7e2b049f3
Querify registered_tools.
2023-03-06 10:56:23 +00:00
Michael Woerister
ee8bc5b0b2
Use FxIndexSet instead of FxHashSet for asm_target_features query.
2023-03-01 10:19:26 +01:00
Camille GILLOT
0915d55d87
Wrap more into into closure_typeinfo query.
2023-02-26 10:30:27 +00:00
Oli Scherer
c3522d0637
Move the resolver into a query
2023-02-20 15:28:59 +00:00
Dylan DPC
9800dbe883
Rollup merge of #107163 - mikebenfield:parameters-pr, r=TaKO8Ki
...
Remove some superfluous type parameters from layout.rs.
Specifically remove V, which can always be VariantIdx, and F, which can always be Layout.
2023-02-15 12:24:54 +05:30
Vadim Petrochenkov
b62b82aef4
Resolve documentation links in rustc and store the results in metadata
...
This commit implements MCP https://github.com/rust-lang/compiler-team/issues/584
It also removes code that is no longer used, and that includes code cloning resolver, so issue #83761 is fixed.
2023-02-10 09:34:13 +04:00
Michael Goulet
41883fd19a
intern external constraints
2023-02-03 21:36:59 +00:00
Camille GILLOT
15d6325747
Remove HirId -> LocalDefId map from HIR.
2023-01-28 09:55:26 +00:00
Michael Benfield
8df27d07ae
Remove some superfluous type parameters from layout.rs.
...
Specifically remove V, which can always be VariantIdx, and F, which can
always be Layout.
2023-01-21 10:22:31 -08:00
Oli Scherer
fbe2d5aad2
Remove output_filenames field from TyCtxt and feed the query instead
2023-01-12 17:14:17 +00:00
Oli Scherer
33b6a7790e
Remove untracked_crate field and instead pass it along with the resolver.
2023-01-12 17:14:17 +00:00
Oli Scherer
408ae0fcb9
Feed resolutions query instead of it being a thin wrapper around an untracked field
2023-01-12 17:14:17 +00:00
Oli Scherer
02cbc017d7
Rename ConstS to ConstData
2022-12-16 10:02:51 +00:00
Matthias Krüger
db416ea195
Rollup merge of #104898 - oli-obk:group_all_the_things, r=wesleywiser
...
Put all cached values into a central struct instead of just the stable hash
cc `@nnethercote`
this allows re-use of the type for Predicate without duplicating all the logic for the non-hash cached fields
2022-12-06 16:54:52 +01:00
Oli Scherer
f693b7848e
feed resolver_for_lowering instead of storing it in a field
2022-12-05 10:58:55 +00:00
Oli Scherer
907ef227ef
Remove PredicateS type
2022-11-30 14:47:40 +00:00
Oli Scherer
147b854ded
Remove TyS
2022-11-30 12:17:54 +00:00
Oli Scherer
87a04f51ba
move WithCachedTypeInfo to rustc_type_ir
2022-11-30 12:17:13 +00:00
Oli Scherer
3d31e5c981
s/WithStableHash/WithCachedTypeInfo/
2022-11-30 12:11:19 +00:00
Oli Scherer
8582f9644b
Cache Predicates' hash within themselves
2022-11-25 16:25:28 +00:00
hkalbasi
09a384643e
make rustc_target usable outside of rustc
2022-11-24 16:26:12 +03:30
bors
607878d069
Auto merge of #102698 - michaelwoerister:unord-collections, r=lncr
...
Introduce UnordMap, UnordSet, and UnordBag (MCP 533)
This is the start of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533 ).
I followed `@eddyb's` suggestion of naming the collection types `Unord(Map/Set/Bag)` which is a bit easier to type than `Unordered(Map/Set/Bag)`
r? `@eddyb`
2022-10-29 06:20:48 +00:00
Michael Woerister
9117ea9758
Introduce UnordMap, UnordSet, and UnordBag (see MCP 533)
...
MCP 533: https://github.com/rust-lang/compiler-team/issues/533
Also, as an example, substitute UnordMap for FxHashMap in
used_trait_imports query result.
2022-10-27 13:23:26 +00:00
Vadim Petrochenkov
34eb73c72d
privacy: Rename "accessibility levels" to "effective visibilities"
...
And a couple of other naming tweaks
Related to https://github.com/rust-lang/rust/issues/48054
2022-10-26 16:34:53 +04:00
Cameron Steffen
ff940db666
Rewrite representability
2022-10-07 09:33:46 -05:00
Michael Goulet
4cdf264e6f
cache collect_trait_impl_trait_tys
2022-09-14 20:50:52 +00:00
Michael Goulet
cdf78073c5
Deeply check that method signatures match, and allow for nested RPITITs
2022-09-09 01:31:46 +00:00