Hello and welcome to another issue of This Week in Rust! It's late this week because bors was having some issues which bounced every pull request, and it's no fun writing about nothing.
What's cooking on master?
61 PRs were merged this week.
Breaking Changes
- The first part of the
box
changes has landed.box
is a keyword, and in an expression is now synonymous with~
(ie, it allocates an owned box). std::vec::raw
has seen some cleanup.- Link meta attributes have been
replaced with a
pkgid
. rustdoc also now requires apkgid
attribute, rather than the deprecated link meta. - Some fairly obscure import syntax has been
changed.
use {foo, bar}
is now permitted, and the olduse foo, bar
is not. Cell
has been removed.RefCell
supersedes it.- Attempting to implement private traits no longer works.
- The coherence
-Z
flag has been removed. - The
self
lifetime is now illegal, like the rest of the keywords. Now, lifetime parameters are truly only identifiers.
Other changes
- A dead code warning has been
implemented. This is pretty
awesome and will do things like warn for test functions that are accidentally
never marked
#[test]
and so are never called. Some bugs in it were also fixed. - The benchmark runner now handles slow benchmarks. Previously, it wouldn't run a benchmark that took more than 1ms. Now, it will!
- The
shootout-fasta
benchmark has been rewritten. It's about 10x faster, and looks nicer. - Stepping through / breaking on function calls no longer goes through the function prelude.
- The vector
move_iter
has been made faster. - A single
#[inline]
has madevec::from_elem
20x faster Buffer
now has an iterator over its lines. The gotcha is that the newlines are included in the yielded strings.- Struct pattern shorthand has been
improved by allowing ref/mut,
like
let Foo { mut x, .. } = some_foo
, rather than the previouslet Foo { x: mut x, .. } = some_foo
. - LTO (link time optimization) has been implemented. Rejoice.
- All landing pads (and thus unwinding!) can now be omitted when doing LTO.
std::io::util
has been added with:LimitReader
that will only readn
bytes from another readerNullWriter
that ignores everything written to itNullReader
that is always EOFZeroReader
which returns all zeroes,MultiWriter
which will replicate a written buffer to many writersChainedReader
which reads readers in order to completionTeeReader
which will write to a Writer while reading- a
copy
function which copies the full contents of a reader into a writer.
- Windows application manifests are now embedded, so we don't get special cased.
- A
--dep-info
flag has been added which is like-MMD
to C compilers. &mut
underneath&
can now be frozen.PortReader
andChanWriter
have been implemented.- Some more random distributions have been implemented.
- We now use LLVM's integrated assembler on Windows.
New contributors
- Cadence Marseille
- Edward Z. Yang
- Erik Price
- Fabrice Desré
- Jan Niklas Hasse
- Richard Diamond
Meeting
The weekly
meeting
discussed enum mod
, using types to drive inference (rather than attributes
like #[no_send]
etc), a formal grammar, unwinding, and some various PRs (all
mentioned above).
This Week in Servo
Servo is a web browser engine written in Rust and is one of the primary test cases for the Rust language.
We landed 29 PRs this week.
Notable additions
- Patrick Walton landed a number of changes to layout to avoid going back to the DOM for properties to make layout's access to the DOM more opaque. He also cleaned up a significant number of regressions and added a huge number of ref tests.
- Keegan McAllister made content tests work in headless mode in #1382.
- Daniel Glazman added namespace info to elements in #1358.
- Daniel Hedlund added support for leading font metrics on Linux #1352.
Meetings
This week's meeting discussed an upcoming Servo workweek in SF on January 20th. We also discussed the Rust version update and some general team frustration at a large number of regressions lately, primarily caused by the need to disable some of our automated testing due to instability (particularly at shutdown). This week of work saw many of those issues fixed.
Announcements, etc
- FAQ Cheatsheet - A cookbook-style cheatsheet of how to do simple things, based on IRC FAQs.
- Building Rust Code - Current Issues
- Building Rust Code - Using Make
- A Rust port of kissdb
- Reddit
discussion
of the
box
change.