Commit 8e711417 authored by Robin Freyler's avatar Robin Freyler

[lang2/macro] add test for unknown ink! method marker

parent 15d2066c
Pipeline #56549 failed with stages
in 1 minute and 32 seconds
......@@ -43,4 +43,5 @@ fn compile_tests() {
t.compile_fail("tests/ui/fail/17-conflicting-ink-markers.rs");
t.compile_fail("tests/ui/fail/18-conflicting-ink-markers-2.rs");
t.compile_fail("tests/ui/fail/19-unknown-struct-ink-marker.rs");
t.compile_fail("tests/ui/fail/20-unknown-method-marker.rs");
}
#![feature(proc_macro_hygiene)]
use ink_lang2 as ink;
#[ink::contract(version = "0.1.0")]
mod noop {
#[ink(storage)]
struct Noop {}
impl Noop {
#[ink(constructor)]
fn new(&mut self) {}
#[ink(message)]
fn noop(&self) {}
#[ink(unknown_marker)]
fn has_unknown_marker(&self) {}
#[ink(unknown_marker_2)]
fn has_unknown_marker_too(&mut self) {}
}
}
fn main() {}
error: unknown ink! marker
--> $DIR/20-unknown-method-marker.rs:17:14
|
17 | #[ink(unknown_marker)]
| ^^^^^^^^^^^^^^^^
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment