Skip to content

Commit 1519c0a

Browse files
varkorAvi-D-coder
authored andcommitted
Fix typo in diagnostic
1 parent 109d416 commit 1519c0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::Generics {
11551155
param.span,
11561156
&format!(
11571157
"defaults for type parameters are only allowed in \
1158-
`struct`, `enum`, `type`, or `trait` definitions."
1158+
`struct`, `enum`, `type`, or `trait` definitions"
11591159
),
11601160
);
11611161
}

src/test/ui/feature-gates/feature-gate-default_type_parameter_fallback.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions.
1+
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
22
--> $DIR/feature-gate-default_type_parameter_fallback.rs:3:8
33
|
44
LL | fn avg<T=i32>(_: T) {}
@@ -8,7 +8,7 @@ LL | fn avg<T=i32>(_: T) {}
88
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
1010

11-
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions.
11+
error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
1212
--> $DIR/feature-gate-default_type_parameter_fallback.rs:8:6
1313
|
1414
LL | impl<T=i32> S<T> {}

0 commit comments

Comments
 (0)