These are chat archives for rust-lang/rust

19th
Feb 2018
Ingvar Stepanyan
@RReverser
Feb 19 2018 11:54
@vorner Yes, custom derives are part of "macros 1.1" AFAIK
macros 2.0 is new syntax for macro that play better with scoping, but have really not much documentation unfortunately (RFC was somehow accepted without examples).
(and also will accept old-style body for multibranch variant)
apiraino
@apiraino
Feb 19 2018 17:08
hello, here I am again. I'm curious about the unreachable pattern warning. Here's small snippet to reproduce:
i'm using a create for the matches macro
what does it mean and how can I satisfy the warning?
Aleksey Kladov
@matklad
Feb 19 2018 17:11
It means that the _ is never reached, which is true in this case. So, the way to silence the warning would be to replace the whole matches! invocation with true because that's what it always evaluates to
apiraino
@apiraino
Feb 19 2018 17:13
uhm ... ok got it. Also noticed that if I add another item (e.g. ChoiceThree) to the enum the warning disappears ( because I'm actually creating the _ case)
cool info, thanks!
Fredrik Portström
@portstrom
Feb 19 2018 22:17

I told yesterday about how incremental compilation increases the build time one computer, and I would test again on another computer. Here are the results from the second computer. On that computer, incremental compilation is obviously a lot faster than non-incremental. The numbers are from two subsequent runs after a couple of warm-up runs. Between each run the source change is one integer literal.

incremental

    Finished dev [unoptimized + debuginfo] target(s) in 11.81 secs

real    0m12,274s
user    0m10,310s
sys    0m2,465s
    Finished dev [unoptimized + debuginfo] target(s) in 11.93 secs

real    0m12,355s
user    0m10,404s
sys    0m2,536s

non-incremental

    Finished dev [unoptimized + debuginfo] target(s) in 20.26 secs

real    0m20,720s
user    0m31,755s
sys    0m2,605s
    Finished dev [unoptimized + debuginfo] target(s) in 20.3 secs

real    0m20,418s
user    0m31,840s
sys    0m2,537s