1
Fork 0

Add tests for lint on type dependent on consts

This commit is contained in:
kadmin 2022-05-17 05:50:16 +00:00
parent c1d65eaa45
commit edae6edd32
5 changed files with 114 additions and 0 deletions

View file

@ -108,6 +108,9 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
}
let future_compat_lint = || {
if tcx.features().generic_const_exprs {
return;
}
if let Some(local_def_id) = uv.def.did.as_local() {
infcx.tcx.struct_span_lint_hir(
lint::builtin::CONST_EVALUATABLE_UNCHECKED,