Validation and other things

This commit is contained in:
Michael Goulet
2024-04-04 12:54:56 -04:00
parent 41cf87b71b
commit 42ba57c013
26 changed files with 418 additions and 19 deletions

View File

@@ -1409,13 +1409,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
bounds,
fn_kind,
itctx,
precise_capturing.as_deref(),
precise_capturing.as_deref().map(|(args, _)| args.as_slice()),
),
ImplTraitContext::Universal => {
assert!(
precise_capturing.is_none(),
"TODO: precise captures not supported on universals!"
);
if let Some(&(_, span)) = precise_capturing.as_deref() {
self.tcx.dcx().emit_err(errors::NoPreciseCapturesOnApit { span });
};
let span = t.span;
// HACK: pprust breaks strings with newlines when the type