mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
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
@ -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