Add Span
to TraitBoundModifier
This commit is contained in:
parent
b06258cde4
commit
16040a1628
20 changed files with 76 additions and 78 deletions
|
@ -1203,7 +1203,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
(BoundKind::TraitObject, TraitBoundModifier::Maybe) => {
|
||||
self.err_handler().emit_err(errors::OptionalTraitObject { span: poly.span });
|
||||
}
|
||||
(_, TraitBoundModifier::MaybeConst)
|
||||
(_, &TraitBoundModifier::MaybeConst(span))
|
||||
if let Some(reason) = &self.disallow_tilde_const =>
|
||||
{
|
||||
let reason = match reason {
|
||||
|
@ -1224,8 +1224,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
|
|||
}
|
||||
DisallowTildeConstContext::Item => errors::TildeConstReason::Item,
|
||||
};
|
||||
self.err_handler()
|
||||
.emit_err(errors::TildeConstDisallowed { span: bound.span(), reason });
|
||||
self.err_handler().emit_err(errors::TildeConstDisallowed { span, reason });
|
||||
}
|
||||
(_, TraitBoundModifier::MaybeConstMaybe) => {
|
||||
self.err_handler().emit_err(errors::OptionalConstExclusive {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue