rust/compiler/rustc_const_eval/src
Dylan DPC c763ebc72f
Rollup merge of #102830 - compiler-errors:constness-parity, r=fee1-dead
Unify `tcx.constness` query and param env constness checks

The checks that we do in the `constness` query seem inconsistent with the checks that we do to determine if an item's param-env is const, so I merged them into the `constness` query and call that from the `param_env` query.

I'm not sure if this totally makes sense -- is there a case where `tcx.param_env()` would return a const param-env for an item whose `tcx.constness()` is `Constness::NotConst`? Because if not, it seems a bit dangerous that these two differ.

Luckily, not many places actually use `tcx.constness()`, and the checks in `tcx.param_env()` seem stricter than the checks in `tcx.constness()` (at least for the types of items we type-check).

Also, due to the way that `tcx.param_env()` is implemented, it _never_ used to return a const param-env for a item coming from a different crate, which also seems dangerous (though also probably not weaponizable currently, because we seldom actually compute the param-env for a non-local item).
2022-10-12 22:13:25 +05:30
..
const_eval Unify tcx.constness and param env constness checks 2022-10-12 04:04:09 +00:00
interpret Use tidy-alphabetical in the compiler 2022-10-12 17:49:10 +05:30
transform Rollup merge of #102675 - ouz-a:mir-technical-debt, r=oli-obk 2022-10-08 14:38:18 +02:00
util change might_permit_raw_init to fully detect LLVM UB, but not more than that 2022-10-05 09:22:50 +02:00
errors.rs UPDATE - rename DiagnosticHandler macro to Diagnostic 2022-09-21 11:39:53 -04:00
lib.rs change might_permit_raw_init to fully detect LLVM UB, but not more than that 2022-10-05 09:22:50 +02:00