diff options
| author | kadmin <julianknodt@gmail.com> | 2021-02-16 19:03:22 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2021-02-16 19:04:03 +0000 |
| commit | f52029553fa97153eb7f3fc724523cc1a61dfaba (patch) | |
| tree | 88f331f0caad849a201c5c1198cb6e3594c027b8 | |
| parent | b97951b50f81862ccd997d48b20f50d05cd5157e (diff) | |
| download | rust-f52029553fa97153eb7f3fc724523cc1a61dfaba.tar.gz rust-f52029553fa97153eb7f3fc724523cc1a61dfaba.zip | |
Remove ordering hint
| -rw-r--r-- | compiler/rustc_typeck/src/astconv/generics.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/const-generics/diagnostics.stderr | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_typeck/src/astconv/generics.rs b/compiler/rustc_typeck/src/astconv/generics.rs index b421adbf9ea..0ea0ccaceab 100644 --- a/compiler/rustc_typeck/src/astconv/generics.rs +++ b/compiler/rustc_typeck/src/astconv/generics.rs @@ -70,7 +70,9 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { add_braces_suggestion(arg, &mut err); err.set_primary_message( "unresolved item provided when a constant was expected", - ); + ) + .emit(); + return; } Res::Def(DefKind::TyParam, src_def_id) => { if let Some(param_local_id) = param.def_id.as_local() { diff --git a/src/test/ui/const-generics/diagnostics.stderr b/src/test/ui/const-generics/diagnostics.stderr index 33f5337eb80..7d038ff955d 100644 --- a/src/test/ui/const-generics/diagnostics.stderr +++ b/src/test/ui/const-generics/diagnostics.stderr @@ -41,8 +41,6 @@ error[E0747]: unresolved item provided when a constant was expected LL | impl<const N: u8> Foo for C<N, T> {} | ^ | - = note: type arguments must be provided before constant arguments - = help: reorder the arguments: consts: `<C, N>` help: if this generic argument was intended as a const parameter, surround it with braces | LL | impl<const N: u8> Foo for C<N, { T }> {} |
