Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gsingh93 opened this issue Aug 22, 2014 · 4 comments

Comments

@gsingh93
Copy link
Contributor

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.

@steveklabnik
Copy link
Member

Does this still happen today?

@gsingh93
Copy link
Contributor Author

Indentation now looks like this:

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

@pnkfelix
Copy link
Member

part of #8793

@steveklabnik
Copy link
Member

Moved to rust-lang/rust-mode#10

bors added a commit to rust-lang-ci/rust that referenced this issue Mar 3, 2024
…r=Veykril

Prioritise rustup sysroots over system ones

`get_path_for_executable` will now first check `$CARGO_HOME` before falling back to searching `$PATH`.

`rustup` is the recommended way to manage rust toolchains, therefore should be picked before the system toolchain.

Closes rust-lang#16661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants