You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch fixes a bug I found where rust-mode would misindent code
like:
fn each_split_within<'a, F>(ss: &'a str, lim: usize, mut it: F)
-> bool where F: FnMut(&'a str) -> bool {
}
fn test_split_within() {
}
In particular the second "fn" would be indented a level.
On the "fn" line, rust-mode-indent-line was calling
rust-beginning-of-defun, which would go to the previous defun. Fixing
this required moving the definition of rust-top-item-beg-re higher in
the file, before its first use (recent versions of Emacs insist on
this). And, this required removing the "^" from this regexp, which is
ok because the sole use is already adding a "^". Additionally, I moved
the "\\_>" into the regexp, rather than have it added at the point of
use, so that the new use would also benefit.
This patch includes two new test cases.
0 commit comments