• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Geal / nom / 1767
81%

Build:
DEFAULT BRANCH: master
Ran 24 Dec 2018 05:21PM UTC
Jobs 1
Files 32
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1767

push

travis-ci

Geal
use local_inner_macros annotation to support rust 2018

since macro import is now done through `use nom::the_macro`
instead of `#[macro_use]`, macros using other internal macros
result in the compiler complaining about missing imports.
One of the solutions would be to use them through
`$crate::internal_macro`, but it does not work for the comon case of
`call!`:

A lot of nom parsers use this pattern:

```
macro_rules! my_parser (
  ($i:expr, $submac:ident!( $($args:tt)* )) => ({
    //stuff
  });
  ($i:expr, $f:expr) => (
    my_parser!($i, call!($f))
  )
);
```

if I replace `call!` with `$crate::call!` rustc complains about infinite
recursion because `$crate::call!($f)` is an expression. `$f` has to be
an expr, because it could be a variable name, or a closure that’s
written right there. And I cannot adapt `$submac:ident!` to take a path
instead, because somehow module path matching does not accept a `!`
right after.

The other solution uses `#[macro_export(local_inner_macros)]`
( https://rust-lang-nursery.github.io/edition-guide/rust-2018/macros/macro-changes.html?highlight=macros#macros-using-local_inner_macros)
to indicate some macros use other macros from the same crate, but it requires
local wrappers to libstd's macros (mainly for the `dbg` and `dbg_dmp`
combinators

3791 of 4327 relevant lines covered (87.61%)

0.88 hits per line

Jobs
ID Job ID Ran Files Coverage
7 1767.7 (FEATURES='--no-default-features') 24 Dec 2018 05:21PM UTC 0
87.61
Travis Job 1767.7
Source Files on build 1767
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1767
  • e3fa8e71 on github
  • Prev Build on master (#1766)
  • Next Build on master (#1768)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc