Comments (8)
I confirm that problem, however the bug is not in this crate nor in rusticata-macros
.
This is caused by nom
defining a dbg
macro and rust deciding to use it even without a use
statement.
As a workaround, it's possible to use ::std::dbg!()
instead of dbg!()
until it is fixed.
I forwarded your issue to nom (rust-bakery/nom#1022) with an example, so closing this one.
from der-parser.
@chifflier the issue is that #[macro_use] extern crate nom;
is neccessary in user code in the first place. You have to reexport macros you intend to use from other crates in your own macros.
from der-parser.
Or, you have to show in your examples that this is needed. It appears there are no files in tests/
that use the macros so that's why you wouldn't have seen this.
from der-parser.
Oh, maybe I didn't get the issue right then (reopening). I'll check if re-exporting macros works.
That said, there is code in tests using macros, see https://github.com/rusticata/der-parser/blob/master/tests/constructed.rs (but it imports everything).
from der-parser.
@abonander 3f896e2 should fix the problem by allowing to use der-parser
macros without importing nom
nor rusticata-macros
. I'm running more tests, but if it works correctly, it could justify a new release.
Note I had to add new result types to hide nom::IResult
from der-parser.
Result types (and removal of now unneeded imports) have been generalized in d24fdcc and 0b6e713
der-parser
macros can now be used without importing other crates.
Thanks for the suggestion of re-exporting macros, it helped solving the problem.
from der-parser.
Forgot to say: der-parser
3.0.1 has been published
from der-parser.
Thanks!
from der-parser.
Related Issues (20)
- BerObject struct changes HOT 3
- Parsing empty sequences fail HOT 1
- It would be good if .as_u64() could parse BitStrings into numbers, too HOT 1
- Running into build errors on debian stretch
- fails to build on Debian 10 HOT 22
- der-parser 6.0 roadmap HOT 2
- handle context-specific tag incorrect HOT 9
- RUSTSEC-2020-0095: difference is unmaintained HOT 1
- [Question] In `BerObjectContent::BitString` what is the first elem of the pair? HOT 2
- Concatenate a relative OID onto a base OID HOT 3
- oid! macro assumes der_parser is in the current namespace HOT 4
- BerObject::as_pretty() drops tag class when printing Unknown contents
- Objects with private tags are parsed like universal tags
- Decoding ASN.1 signed integers always produces unsigned result HOT 8
- `BerObject::as_pretty()` prints universal tag names for non-universal classes HOT 5
- Enhancement: Re-export `rusticata-macros`
- `BerObjectHeader.structured` should be a `bool` HOT 1
- Inconsistent naming of parser functions
- How do I convert an `asn1_rs::Any` to a `BerObject`? HOT 4
- issues building with nightly due to proc-macro2 version usage?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from der-parser.