mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 14:02:22 -05:00
Word wrap for the playground
This commit is contained in:
parent
133892fc4e
commit
08071aae39
4 changed files with 13 additions and 12 deletions
|
@ -58,5 +58,6 @@ fn main() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// When you call a macro, you need to add something special compared to a regular function call. If
|
// When you call a macro, you need to add something special compared to a
|
||||||
// you're stuck, take a look at what's inside `my_macro`.
|
// regular function call. If you're stuck, take a look at what's inside
|
||||||
|
// `my_macro`.
|
||||||
|
|
|
@ -58,8 +58,8 @@ macro_rules! my_macro {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Macros don't quite play by the same rules as the rest of Rust, in terms of what's available
|
// Macros don't quite play by the same rules as the rest of Rust, in terms of
|
||||||
// where.
|
// what's available where.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,5 +68,5 @@ macro_rules! my_macro {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Unlike other things in Rust, the order of "where you define a macro" versus "where you use it"
|
// Unlike other things in Rust, the order of "where you define a macro" versus
|
||||||
// actually matters.
|
// "where you use it" actually matters.
|
||||||
|
|
|
@ -60,8 +60,8 @@ fn main() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// In order to use a macro outside of its module, you need to do something special to the module to
|
// In order to use a macro outside of its module, you need to do something
|
||||||
// lift the macro out into its parent.
|
// special to the module to lift the macro out into its parent.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,5 +70,5 @@ fn main() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The same trick also works on "extern crate" statements for crates that have exported macros, if
|
// The same trick also works on "extern crate" statements for crates that have
|
||||||
// you've seen any of those around.
|
// exported macros, if you've seen any of those around.
|
||||||
|
|
|
@ -72,5 +72,5 @@ fn main() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The way macros are written, it wants to see something between each "macro arm", so it can
|
// The way macros are written, it wants to see something between each
|
||||||
// separate them.
|
// "macro arm", so it can separate them.
|
||||||
|
|
Loading…
Reference in a new issue