Skip to content

Adding a line break after a Trait in a template argument list breaks emacs-mode indentation #10

@steveklabnik

Description

@steveklabnik

Issue by gsingh93
Friday Aug 22, 2014 at 01:25 GMT

For earlier discussion, see rust-lang/rust#16665

This issue was labelled with: A-infrastructure in the Rust repository


I think this is a somewhat serious bug with emacs-mode, since I can't use the tab key for indentation inside a function block in many cases.

My code ends up with a long list of traits with bounds in the template argument list, and according to the style guide, I can wrap between traits. However, if I wrap between traits, identation is broken for the function. Consider the following example,

pub fn foo<T,
           V>() {
              // Indentation puts me here
}

As you can see, hitting tab inside the function idents too much. I should mention that I aligned the second template argument to match up with the first, as hitting tab there doesn't work either.

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