Commit 8451cf37 authored by Robin Freyler's avatar Robin Freyler

[lang2/macro] add test for unknown struct ink! markers

parent d5c95b21
Pipeline #56491 failed with stages
in 26 seconds
......@@ -42,4 +42,5 @@ fn compile_tests() {
t.compile_fail("tests/ui/fail/16-storage-impl-ident-conflict.rs");
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");
}
#![feature(proc_macro_hygiene)]
use ink_lang2 as ink;
#[ink::contract(version = "0.1.0")]
mod noop {
#[ink(storage)]
struct Noop {}
#[ink(unknown_or_unsupported)]
struct HasUnknownMarker {}
impl Noop {
#[ink(constructor)]
fn new(&mut self) {}
#[ink(message)]
fn noop(&self) {}
}
}
fn main() {}
error: encountered unsupported ink! markers for struct
--> $DIR/19-unknown-struct-ink-marker.rs:10:5
|
10 | / #[ink(unknown_or_unsupported)]
11 | | struct HasUnknownMarker {}
| |______________________________^
error: unsupported ink! marker for struct
--> $DIR/19-unknown-struct-ink-marker.rs:10:10
|
10 | #[ink(unknown_or_unsupported)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
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