Rollup merge of #35266 - circuitfox:35247-E0109-update-error-format, r=jonathandturner
E0109 Update error format Fixes #35247 as part of #35233. r? @jonathandturner
This commit is contained in:
commit
9186db86fd
2 changed files with 5 additions and 2 deletions
|
|
@ -24,8 +24,10 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
|||
pub fn prohibit_type_params(self, segments: &[ast::PathSegment]) {
|
||||
for segment in segments {
|
||||
for typ in segment.parameters.types() {
|
||||
span_err!(self.sess, typ.span, E0109,
|
||||
"type parameters are not allowed on this type");
|
||||
struct_span_err!(self.sess, typ.span, E0109,
|
||||
"type parameters are not allowed on this type")
|
||||
.span_label(typ.span, &format!("type parameter not allowed"))
|
||||
.emit();
|
||||
break;
|
||||
}
|
||||
for lifetime in segment.parameters.lifetimes() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue