The basic problem is that rust-mode is using a multiline regexp, so it's the same bug#25133.