Just totally fully deny late-bound consts

This commit is contained in:
Michael Goulet 2024-07-20 17:58:05 -04:00
parent 2e6fc42541
commit 3862095bd2
18 changed files with 110 additions and 30 deletions

View file

@ -2094,11 +2094,7 @@ pub fn deny_non_region_late_bound(
format!("late-bound {what} parameter not allowed on {where_}"),
);
let guar = if tcx.features().non_lifetime_binders && first {
diag.emit()
} else {
diag.delay_as_bug()
};
let guar = diag.emit_unless(!tcx.features().non_lifetime_binders || !first);
first = false;
*arg = ResolvedArg::Error(guar);