If we end the `scoped` call with a semicolon, the `JoinGuard` will be
dropped and not returned from the `map`. The thread will start up and
we immediately block, making for a very expensive sequential loop.
The docs currently define `array_expr`s as:
array_expr : '[' \"mut\" ? vec_elems? ']' ;
array_elems : [expr [',' expr]*] | [expr ',' \"..\" expr] ;
`vec_elems` is not defined anywhere else so it is probably a typo for `array_elems`.
Building on #22076, I've added some tests for stable methods in f32 and f64 that didn't have any before.
Please let me know if there are any improvements I can make, and I am happy to make them! 📬
Building on #22076, I've added some tests for stable methods in f32 and f64 that didn't have any before.
Please let me know if there are any improvements I can make, and I am happy to make them! 📬
* "let mut text" was previously of &String type. Now it is of &str type.
* Update the slicing syntax. Both &text[] and text.slice_from() evaluate
to a &str.
* We were passing a u32 to expr_usize. Call expr_u32 instead.
r? @steveklabnik
Fixes#23166
Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:
#[bench]
fn foo(b: &mut test::Bencher) {}
This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.
* "let met text" was previously of &String type. Now it is of &str type.
* Update the slicing syntax. Both &text[] and text.slice_from() evaluate
to a &str.
* We were passing a u32 to expr_usize. Call expr_u32 instead.
This is a hack, but I don't think we can do much better as long as `derive` is running at the syntax expansion phase.
If the `custom_derive` feature gate is enabled, this works with user-defined traits and syntax extensions. Without the gate, you can't use e.g. `#[derive_Clone]` directly, so this does not change the stable language.
To make this effective, we now check gated attributes both before and after macro expansion. This uncovered a number of tests that were missing feature gates.
This PR also cleans up the deriving code somewhat, and forbids some previously-meaningless attribute syntax. For this reason it's technically a
[breaking-change]
r? @sfackler
We require the *deferred* loading, not just an opportunistic asynchronous loading. (Yes, that was my oversight, as I only checked it locally...) I think `<script defer>` is safe to use, according to <http://caniuse.com/#feat=script-defer>.
We require the *deferred* loading, not just an opportunistic
asynchronous loading. I think `<script defer>` is safe to use,
according to <http://caniuse.com/#feat=script-defer>.