Commit 216a79d0 authored by Hero Bird's avatar Hero Bird Committed by GitHub

ink! 2.0: Improve Diagnostics follow-up (#228)

* [lang2/macro] improve diagnostics for missing a #[ink(storage)] struct

* [lang2/macro] add UI test for missing #[ink(storage)] struct

* [lang2/macro] add test for multiple #[ink(storage)] structs

* [lang2/macro] add ui test for storage-impl conflict

* [lang2/macro] implement check that ink! impls are on #[ink(storage)] structs

* [lang2/macro] fix some success tests

* [lang2/macro] add expected output for failure UI test 16

* [lang2/macro] add conflicting ink! marker test

The conflict here is the additional #[ink(event)] marker

* [lang2/macro] utils: add filter_map_ink_attributes

* [lang2/macro] structs now dispatch on whichever ink! marker was provided first

* [lang2/macro] add failure UI test for #[ink(event)] provided with another #[ink(storage)]

* [lang2/macro] improve diagnostics for unsupported ink! markers on structs

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

* [lang2/macro] improve diagnostics for multiple #[ink(storage)] structs

* [lang2/macro] adjust test case for multiple #[ink(storage)] structs

* [lang2/macro] improve error message for unknown method ink! markers

The error diagnostics can be further improved by showing all occurences of unknown ink! markers in an impl block.

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

* [lang2/macro] fix minor typo in tests
Co-Authored-By: Michael Müller's avatarMichael Müller <mich@elmueller.net>

* [lang2/macro] fix typo in test
Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>

* [lang2/macro] fix typo in test
Co-Authored-By: Andrew Jones's avatarAndrew Jones <ascjones@gmail.com>
parent 4613943a
Pipeline #56560 failed with stages
in 23 seconds