Vadim Petrochenkov
c83553da31
rustc_middle: Remove trait DefIdTree
...
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
2023-03-02 23:46:44 +04:00
Camille GILLOT
03dff82d59
Add of_trait
to DefKind::Impl.
2023-02-14 19:55:44 +00: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
Deadbeef
6e63f7be54
attempt to make a minimal example work
2023-01-12 02:28:37 +00:00
Michael Goulet
ab36a2fe16
Revert "Unify tcx.constness and param env constness checks"
...
This reverts commit bef8681a18
.
This reverts commit c646c4d403
.
2022-10-20 03:44:12 +00:00
Michael Goulet
c646c4d403
Unify tcx.constness and param env constness checks
2022-10-12 04:04:09 +00:00
Deadbeef
26ac45614b
Rename impl_constness
to constness
...
The current code is a basis for `is_const_fn_raw`, and `impl_constness`
is no longer a valid name, which is previously used for determining the
constness of impls, and not items in general.
2022-06-15 20:54:43 +10:00
Jacob Pratt
a9dd4cfa6b
Add and use stability helper methods
...
This avoids an ambiguity (when reading) where `.level.is_stable()` is
not immediately clear whether it is general stability or const
stability.
2022-05-19 12:21:45 +00:00
Oli Scherer
0a6b69106e
Add a query for checking whether a function is an intrinsic.
2022-05-16 07:07:44 +00:00
Vadim Petrochenkov
5b5964f569
rustc: Panic by default in DefIdTree::parent
...
Only crate root def-ids don't have a parent, and in majority of cases the argument of `DefIdTree::parent` cannot be a crate root.
So we now panic by default in `parent` and introduce a new non-panicing function `opt_parent` for cases where the argument can be a crate root.
Same applies to `local_parent`/`opt_local_parent`.
2022-05-02 01:56:50 +03:00
Camille GILLOT
15b2d1a97c
Merge impl_constness and is_const_fn_raw.
2022-03-31 18:33:46 +02:00
Camille GILLOT
67727aa7c3
Reduce use of local_def_id_to_hir_id.
2022-01-15 21:26:25 +01:00
Matthias Krüger
0a5640b55f
use matches!() macro in more places
2021-11-06 16:13:14 +01:00
Camille GILLOT
6e98688e68
Replace FnLikeNode by FnKind.
2021-10-19 23:31:51 +02:00
Deadbeef
d3f981b144
Move is_const_fn to under TyCtxt
2021-09-15 11:27:34 +00:00
Deadbeef
d9797d23d5
Remove unused query
2021-09-09 05:21:28 +00:00
Camille GILLOT
c5fc2609f0
Rename rustc_mir to rustc_const_eval.
2021-09-07 20:46:26 +02:00