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