Skip to content

Added documentation of backslash ending string literals. #22748

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Feb 28, 2015

Conversation

jxcl
Copy link
Contributor

@jxcl jxcl commented Feb 24, 2015

r? @steveklabnik

Closes #22698

I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.

@jxcl jxcl force-pushed the string-backslash branch 2 times, most recently from 368762a to b8a0657 Compare February 24, 2015 19:14
bar";
```

`a` is equivalent to `b`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this line, could you add an assert_eq!(a,b) to the code above? It makes it more implicit, and besides will get tested by our doctests.

@Manishearth
Copy link
Member

❤️ , this is one of the things about multiline strings that confused me initially.

A small nit and you should be good to go!

@steveklabnik
Copy link
Member

@bors: r+ f618e2e rollup

@steveklabnik
Copy link
Member

@jxcl hey thanks! In the future, after you push new commits, please leave a comment, because GitHub doesn't notify me otherwise. Thanks for this patch!

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Feb 26, 2015
r? @steveklabnik 

Closes rust-lang#22698

I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 27, 2015
 r? @steveklabnik

Closes rust-lang#22698

I wasn't sure that this was appropriate for the book, but I've added this to the reference. I also noticed that one of the U+ symbols in the character literals section was missing the graves.
@bors bors merged commit f618e2e into rust-lang:master Feb 28, 2015
@jxcl jxcl deleted the string-backslash branch February 28, 2015 20:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

End-of-line backslash in string literal should be documented
4 participants