# Macro synom::not [−] [src]

    macro_rules! not {
        ($i:expr, $submac:ident!( $($args:tt)* )) => { ... };
    }

Parses successfully if the given parser fails to parse. Does not consume any of the input.

- Syntax: `not!(THING)`
- Output: `()`

    extern crate syn;
    #[macro_use] extern crate synom;
    use synom::IResult;

    // Parses a shebang line like `#!/bin/bash` and returns the part after `#!`.
    // Note that a line starting with `#![` is an inner attribute, not a
    // shebang.
    named!(shebang -> &str, preceded!(
        tuple!(tag!("#!"), not!(tag!("["))),
        take_until!("\n")
    ));

    fn main() {
        let bin_bash = "#!/bin/bash\n";
        let parsed = shebang(bin_bash).expect("shebang");
        assert_eq!(parsed, "/bin/bash");

        let inner_attr = "#![feature(specialization)]\n";
        let err = shebang(inner_attr);
        assert_eq!(err, IResult::Error);
    }

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)