Files
pezkuwi-subxt/substrate/primitives/api/test/tests/ui/no_default_implementation.stderr
T
Bastian Köcher f450a6d74c Make decl_runtime_apis! fail on methods with default implementation (#7371)
* Make `decl_runtime_apis!` fail on methods with default implementation

Runtime api functions are not allowed to have default implementations.
This fixes this by throwing an error when we detect such a function.

* Update primitives/api/proc-macro/src/decl_runtime_apis.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/api/test/tests/ui/no_default_implementation.stderr

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-10-21 21:50:07 +00:00

9 lines
266 B
Plaintext

error: A runtime API function cannot have a default implementation!
--> $DIR/no_default_implementation.rs:3:13
|
3 | fn test() {
| ___________________^
4 | | println!("Hey, I'm a default implementation!");
5 | | }
| |_________^