Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
ink
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
parity
ink
Commits
55d8c281
Commit
55d8c281
authored
Nov 11, 2019
by
Qinxuan Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parse_from_attr
Signed-off-by:
koushiro
<
koushiro.cqx@gmail.com
>
parent
e0242269
Pipeline
#56514
failed with stages
in 23 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
lang/src/parser.rs
lang/src/parser.rs
+8
-3
No files found.
lang/src/parser.rs
View file @
55d8c281
...
...
@@ -115,9 +115,14 @@ impl ast::ItemEnvTypesMeta {
let
first_segment
=
attr
.path
.segments
.first
()
.expect
(
"paths have at least one segment"
);
let
ident
=
first_segment
.ident
.clone
();
.pairs
()
.next
()
.expect
(
"paths have at least one segment"
)
.into_tuple
();
if
let
Some
(
colon
)
=
first_segment
.1
{
return
Err
(
syn
::
Error
::
new
(
colon
.spans
[
0
],
"expected meta value"
))
}
let
ident
=
first_segment
.0
.ident
.clone
();
let
parser
=
|
input
:
ParseStream
<
'_
>
|
{
let
eq_token
=
input
.parse
()
?
;
let
ty
=
input
.parse
()
?
;
...
...
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