mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 20:48:01 +00:00
Validate absolute path for substitute_type (#577)
* Remove commented code Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Ensure substitue path is global absolute Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Absolute path for build.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Add ui test that fails to compile Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#[subxt::subxt(runtime_metadata_path = "../../../artifacts/polkadot_metadata.scale")]
|
||||
pub mod node_runtime {
|
||||
#[subxt::subxt(substitute_type = "sp_arithmetic::per_things::Perbill")]
|
||||
use sp_runtime::Perbill;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,5 @@
|
||||
error: The substitute path must be a global absolute path; try prefixing with `::` or `crate`
|
||||
--> src/incorrect/substitute_path_not_absolute.rs:4:9
|
||||
|
|
||||
4 | use sp_runtime::Perbill;
|
||||
| ^^^^^^^^^^
|
||||
Reference in New Issue
Block a user