Add 'Static' type and improve type substitution codegen to accept it (#886)

* Add Static type which defers to Encode/Decode and impls EncodeAsType/DecodeAsType

* rename to static_type and impl Deref/Mut

* Improve type substitution in codegen so that concrete types can be swapped in

* A couple of comment tweaks and no need for a macro export

* Extend type substitution logic to work recursively on destination type

* cargo fmt

* Fix a couple of comments

* update ui test outpuot

* Add docs and missing_docs lint

* Add test for replacing multiple of Ident

* Update codegen/src/error.rs

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* update copyright year and fix ui test

* simplify another error

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
James Wilson
2023-03-31 16:56:19 +01:00
committed by GitHub
parent 42bcddeecb
commit a2b8dde5e6
132 changed files with 5810 additions and 5442 deletions
@@ -1,4 +1,4 @@
error: The substitute path must be a global absolute path; try prefixing with `::` or `crate`
error: Type substitution error: `substitute_type(with = <path>)` must be a path prefixed with 'crate::' or '::'
--> src/incorrect/substitute_path_not_absolute.rs:5:16
|
5 | with = "sp_runtime::Perbill"