resolve: Tweak some expected/found wording
This commit is contained in:
@@ -237,7 +237,8 @@ impl<'a> base::Resolver for Resolver<'a> {
|
|||||||
if let Res::Def(..) = res {
|
if let Res::Def(..) = res {
|
||||||
self.session.span_err(
|
self.session.span_err(
|
||||||
span,
|
span,
|
||||||
"expected an inert attribute, found an attribute macro"
|
&format!("expected an inert attribute, found {} {}",
|
||||||
|
res.article(), res.descr()),
|
||||||
);
|
);
|
||||||
return Ok(InvocationRes::Single(self.dummy_ext(kind)));
|
return Ok(InvocationRes::Single(self.dummy_ext(kind)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
fn foo<#[derive(Debug)] T>() {
|
fn foo<#[derive(Debug)] T>() {
|
||||||
//~^ ERROR `derive` may only be applied to structs, enums and unions
|
//~^ ERROR `derive` may only be applied to structs, enums and unions
|
||||||
//~| ERROR expected an inert attribute, found an attribute macro
|
//~| ERROR expected an inert attribute, found a derive macro
|
||||||
match 0 {
|
match 0 {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
//~^ ERROR `derive` may only be applied to structs, enums and unions
|
//~^ ERROR `derive` may only be applied to structs, enums and unions
|
||||||
//~| ERROR expected an inert attribute, found an attribute macro
|
//~| ERROR expected an inert attribute, found a derive macro
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ error: `derive` may only be applied to structs, enums and unions
|
|||||||
LL | fn foo<#[derive(Debug)] T>() {
|
LL | fn foo<#[derive(Debug)] T>() {
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: expected an inert attribute, found an attribute macro
|
error: expected an inert attribute, found a derive macro
|
||||||
--> $DIR/issue-49934-errors.rs:1:17
|
--> $DIR/issue-49934-errors.rs:1:17
|
||||||
|
|
|
|
||||||
LL | fn foo<#[derive(Debug)] T>() {
|
LL | fn foo<#[derive(Debug)] T>() {
|
||||||
@@ -16,7 +16,7 @@ error: `derive` may only be applied to structs, enums and unions
|
|||||||
LL | #[derive(Debug)]
|
LL | #[derive(Debug)]
|
||||||
| ^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: expected an inert attribute, found an attribute macro
|
error: expected an inert attribute, found a derive macro
|
||||||
--> $DIR/issue-49934-errors.rs:5:18
|
--> $DIR/issue-49934-errors.rs:5:18
|
||||||
|
|
|
|
||||||
LL | #[derive(Debug)]
|
LL | #[derive(Debug)]
|
||||||
|
|||||||
Reference in New Issue
Block a user