Use less verbose syntax for error annotations

Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
This commit is contained in:
Michael Howell 2021-09-28 10:57:34 -07:00 committed by GitHub
parent d8e9db0dcf
commit 8a7c1306b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,10 +7,10 @@ struct Bar;
const T: usize = 42;
impl Foo<N = const 3> for Bar {
//~^ERROR expected lifetime, type, or constant, found keyword `const`
//~^^ERROR cannot constrain an associated constant to a value
//~^^^ERROR this trait takes 1 generic argument but 0 generic arguments
//~^^^^ERROR associated type bindings are not allowed here
//~^ ERROR expected lifetime, type, or constant, found keyword `const`
//~| ERROR cannot constrain an associated constant to a value
//~| ERROR this trait takes 1 generic argument but 0 generic arguments
//~| ERROR associated type bindings are not allowed here
fn do_x(&self) -> [u8; 3] {
[0u8; 3]
}