mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-12 12:06:47 +00:00
Update error message for E0109
This commit is contained in:
parent
a0b4e67648
commit
c89e27824f
@ -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() {
|
||||
|
@ -9,6 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
type X = u32<i32>; //~ ERROR E0109
|
||||
//~| NOTE type parameter not allowed
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user