Stream: t-compiler/wg-nll

Topic: polonius-mir-dump-notes


qmx (May 28 2018 at 18:56, on Zulip):

hey @nikomatsakis what does this ALIGN = ALIGN sentence actually means?

qmx (May 28 2018 at 18:57, on Zulip):

I've never seen this "assignment on positional parameter" before :P

nikomatsakis (May 28 2018 at 18:59, on Zulip):

is this from a println! or format! or something?

nikomatsakis (May 28 2018 at 18:59, on Zulip):

oh I remember

nikomatsakis (May 28 2018 at 18:59, on Zulip):

that gives the value for a named format parameter

nikomatsakis (May 28 2018 at 18:59, on Zulip):

e.g., format!("{ALIGN}", ALIGN = 22) would return "22"

nikomatsakis (May 28 2018 at 18:59, on Zulip):

in this case, the value is the constant ALIGN

nikomatsakis (May 28 2018 at 19:00, on Zulip):

I think this is doing padding

nikomatsakis (May 28 2018 at 19:00, on Zulip):

iirc

nikomatsakis (May 28 2018 at 19:00, on Zulip):

e.g., pad to ALIGN characters

nikomatsakis (May 28 2018 at 19:03, on Zulip):

/me -> afk

nikomatsakis (May 28 2018 at 19:04, on Zulip):

@qmx see also the fmt docs

qmx (May 28 2018 at 19:05, on Zulip):

I've got that part, what I never seen before was the assign in parameter position :)
TIL

qmx (May 28 2018 at 19:06, on Zulip):

the more you know :rainbow:

Santiago Pastorino (May 28 2018 at 19:09, on Zulip):

doesn't this happen because it's a macro?

Santiago Pastorino (May 28 2018 at 19:09, on Zulip):

happened to me before that I was surprised by Rust syntax until I saw it was inside of a macro

qmx (May 28 2018 at 19:09, on Zulip):

yep, I was so used to call it that I completely forgot about this very "duh it's a macro" fact

qmx (May 28 2018 at 19:10, on Zulip):

:)

Santiago Pastorino (May 28 2018 at 19:10, on Zulip):

:)

Vytautas Astrauskas (May 28 2018 at 20:12, on Zulip):

@qmx JFYI: There are some guys working on Graphviz visualisation for Polonius (issue #12), which you may want to integrate into the mir dump.

qmx (May 28 2018 at 20:13, on Zulip):

schweet!

Last update: Nov 21 2019 at 13:55UTC