Comments (6)
I think the current indentation is correct. I wouldn't expect indentation to ever change the inside of a string literal. (None of the other programming modes that I tried out do it either.)
The Scan error: "Unbalanced parentheses"
error message is still there, as mentioned in the comments of the old issue, is still there though, and shouldn't be. But the end result would be the same.
from rust-mode.
I agree that I'd be surprised if a string literal was indented on the second line. I can also confirm I see the Scan error: "Unbalanced parentheses"
error.
from rust-mode.
I disagree. Most languages don't have backslashes at the end of line which skip all following whitespace. The express purpose of this syntax is to allow you to indent string constants nicely!
from rust-mode.
If you look through rustc you'll see where it's useful and also that indenting single-line strings that are spread across multiple lines so that they line up is what we typically do (although now that emacs doesn't handle it correctly, many of them have gotten messed up over time).
from rust-mode.
Well I'll be--I didn't know that. Sure enough, this:
fn main() {
println!("foo\
bar");
}
prints foobar
. As I write this, I can find no reference to that anywhere in either the reference or the book, so I filed rust-lang/rust#22698.
But now I understand the original issue here.
from rust-mode.
Certainly not how I expected to learn about this feature, either!
from rust-mode.
Related Issues (20)
- rustic-cargo-upgrade doesn't work - no such command: `upgrade` HOT 2
- Please consider easier to type default keybindings for cargo actions
- Indentation messes up in incredibly specific condition. HOT 1
- Installation recipe does not work: Scan error: "Containing expression ends prematurely", 153, 154 HOT 4
- rust-mode deletes my custom main menu entries, in just about any mode HOT 1
- cargo expand fails when invoked from rust-mode of emacs in a project under a workspace HOT 1
- rust-mode only sparsely highlights code in Emacs 29.1 HOT 3
- C-c C-c C-t on a remote (tramp) file invokes cargo test on the local machine
- How to open document for the symbol under the cursor? HOT 1
- New version on NonGNU ELPA
- Integrating `rust-mode` with Built-in Tree-sitter in Emacs 29 HOT 2
- compilation-error-regexp not matching panics HOT 5
- Indentation issue HOT 3
- Native compilation warnings HOT 1
- Disabling automatic brace insertion HOT 3
- Issues running this mode HOT 3
- Cannot setup LSP formatting and treesitter together HOT 5
- Behavior with enum variants, using treesitter HOT 4
- Compiling/Installing error: No such file or directory, treesit HOT 8
- syntax highlight error on Emacs 30 HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-mode.