Improve error message on where clause on pallet error (#7821)

* improve error message on where clause on pallet error

* Revert "improve error message on where clause on pallet error"

This reverts commit 5a3cc38976813fccef3357833553ce30f5b988ea.

* Revert "Revert "improve error message on where clause on pallet error""

This reverts commit e3b3fca6bc4fa89816f80dbcb82dc4536a9b2549.
This commit is contained in:
Guillaume Thiolliere
2021-01-05 10:51:46 +01:00
committed by GitHub
parent 031b4ddabb
commit ccce3405f4
4 changed files with 31 additions and 1 deletions
@@ -53,7 +53,7 @@ impl ErrorDef {
instances.push(helper::check_type_def_gen_no_bounds(&item.generics, item.ident.span())?);
if item.generics.where_clause.is_some() {
let msg = "Invalid pallet::error, unexpected where clause";
let msg = "Invalid pallet::error, where clause is not allowed on pallet error item";
return Err(syn::Error::new(item.generics.where_clause.as_ref().unwrap().span(), msg));
}