Update error message for E0109

This commit is contained in:
Chris Stankus 2016-08-03 18:00:52 -05:00
parent a0b4e67648
commit c89e27824f
2 changed files with 5 additions and 2 deletions

View File

@ -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() {

View File

@ -9,6 +9,7 @@
// except according to those terms.
type X = u32<i32>; //~ ERROR E0109
//~| NOTE type parameter not allowed
fn main() {
}