Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
I
ink
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
parity
ink
Commits
ffc87a38
Unverified
Commit
ffc87a38
authored
Nov 11, 2019
by
Robin Freyler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[lang2/macro] improve diagnostics for multiple #[ink(storage)] structs
parent
8451cf37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lang2/macro/src/ir/into_hir.rs
lang2/macro/src/ir/into_hir.rs
+9
-6
No files found.
lang2/macro/src/ir/into_hir.rs
View file @
ffc87a38
...
...
@@ -686,13 +686,16 @@ fn split_items(
Err
(
storages
.iter
()
.map
(|
storage
|
{
format_err!
(
storage
.ident
,
"
{} conflicting storage struct found"
,
n
)
format_err!
(
storage
.ident
,
"
conflicting storage struct"
)
})
.fold1
(|
mut
err1
,
err2
|
{
err1
.combine
(
err2
);
err1
})
.expect
(
"there must be at least 2 conflicting storages; qed"
))
.fold
(
format_err_span!
(
Span
::
call_site
(),
"encountered {} conflicting storage structs"
,
n
),
|
mut
err1
,
err2
|
{
err1
.combine
(
err2
);
err1
}
)
)
}
}
?
;
let
(
events
,
impl_blocks
):
(
Vec
<
ir
::
ItemEvent
>
,
Vec
<
ir
::
ItemImpl
>
)
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment