Skip to content

Macro indentation issue with rust-mode #13937

Description

@gsingh93

I'm using rust-mode in emacs 24.3.

Here is a macro from the Macros guide:

macro_rules! early_return(
    ($inp:expr $sp:ident) => ( // invoke it like `(input_5 SpecialE)`
        match $inp {
            $sp(x) => { return x; }
            _ => {}
        }
    );
)

If I select all and hit tab, this is how it indents it:

macro_rules! try_option_or_fail(
    ($e:expr) => (
        match $e {
            Some(x) => x,
            None => fail!("Expected Some, got None", $e)
        }
        );
    )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions