-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 9 pull requests #49615
Rollup of 9 pull requests #49615
Commits on Mar 30, 2018
-
Configuration menu - View commit details
-
Copy full SHA for adaaeea - Browse repository at this point
Copy the full SHA adaaeeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0eeb29 - Browse repository at this point
Copy the full SHA d0eeb29View commit details
Commits on Mar 31, 2018
-
Add #[must_use] to a few standard library methods
Chosen to start a precedent of using it on ones that are potentially-expensive and where using it for side effects is particularly discouraged. Discuss :)
Configuration menu - View commit details
-
Copy full SHA for fb7deda - Browse repository at this point
Copy the full SHA fb7dedaView commit details
Commits on Apr 1, 2018
-
avoid IdxSets containing garbage above the universe length
This makes sure that all bits in each IdxSet between the universe length and the end of the word are all zero instead of being in an indeterminate state. This fixes a crash with RUST_LOG=rustc_mir, and is probably a good idea anyway.
Configuration menu - View commit details
-
Copy full SHA for 8f9ec1c - Browse repository at this point
Copy the full SHA 8f9ec1cView commit details
Commits on Apr 2, 2018
-
Add vec![ptr::null{,_mut}(); n] optimization, like vec![0; n]
vec![0; n], via implementations of SpecFromElem, has an optimization that uses with_capacity_zeroed instead of with_capacity, which will use calloc instead of malloc, and avoid an extra memset. This adds the same optimization for vec![ptr::null(); n] and vec![ptr::null_mut(); n], assuming their bit value is 0 (which is true on all currently supported platforms). This does so by adding an intermediate trait IsZero, which looks very much like nonzero::Zeroable, but that one is on the way out, and doesn't apply to pointers anyways. Adding such a trait allows to avoid repeating the logic using with_capacity_zeroed or with_capacity, or making the macro more complex to support generics.
Configuration menu - View commit details
-
Copy full SHA for cc939ac - Browse repository at this point
Copy the full SHA cc939acView commit details -
Add vec!['\0'; n] optimization, like vec![0; n]
Similarly to vec![ptr::null{,_mut}(); n] in previous change, this adds the optimization for vec!['\0'; n].
Configuration menu - View commit details
-
Copy full SHA for 0df837f - Browse repository at this point
Copy the full SHA 0df837fView commit details -
Refactor inner function into closure.
So we can cut some params by using stuff from the environment.
Configuration menu - View commit details
-
Copy full SHA for fb5b5f5 - Browse repository at this point
Copy the full SHA fb5b5f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for be25e78 - Browse repository at this point
Copy the full SHA be25e78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6511ef3 - Browse repository at this point
Copy the full SHA 6511ef3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a2a0f21 - Browse repository at this point
Copy the full SHA a2a0f21View commit details
Commits on Apr 3, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 58217ed - Browse repository at this point
Copy the full SHA 58217edView commit details -
Fix "since" version for getpid feature.
It was stabilized right before the beta branch was cut for 1.26.0. See rust-lang#49523 (comment)
Configuration menu - View commit details
-
Copy full SHA for 9ab5788 - Browse repository at this point
Copy the full SHA 9ab5788View commit details -
Rollup merge of rust-lang#49419 - leodasvacas:small-typeck-refactorin…
…gs, r=nikomatsakis Small typeck refactorings Some code improvements I noticed while reading the code.
Configuration menu - View commit details
-
Copy full SHA for a77b131 - Browse repository at this point
Copy the full SHA a77b131View commit details -
Rollup merge of rust-lang#49496 - glandium:master, r=sfackler
Add more vec![... ; n] optimizations vec![0; n], via implementations of SpecFromElem, has an optimization that uses with_capacity_zeroed instead of with_capacity, which will use calloc instead of malloc, and avoid an extra memset. This PR adds the same optimization for ptr::null, ptr::null_mut, and None, when their in-memory representation is zeroes.
Configuration menu - View commit details
-
Copy full SHA for 6c9b016 - Browse repository at this point
Copy the full SHA 6c9b016View commit details -
Rollup merge of rust-lang#49512 - GuillaumeGomez:intra-links-fields, …
…r=QuietMisdreavus Add support for variant and types fields for intra links Part of rust-lang#43466. r? @QuietMisdreavus
Configuration menu - View commit details
-
Copy full SHA for c091d07 - Browse repository at this point
Copy the full SHA c091d07View commit details -
Rollup merge of rust-lang#49516 - GuillaumeGomez:add-union-field-miss…
…ing-anchor, r=QuietMisdreavus Add missing anchor for union type fields r? @QuietMisdreavus
Configuration menu - View commit details
-
Copy full SHA for bf80935 - Browse repository at this point
Copy the full SHA bf80935View commit details -
Rollup merge of rust-lang#49533 - scottmcm:more-must-use, r=nikomatsakis
Add #[must_use] to a few standard library methods Chosen to start a precedent of using it on ones that are potentially-expensive and where using it for side effects is particularly discouraged. Discuss :) ```rust warning: unused return value of `std::iter::Iterator::collect` which must be used: if you really need to exhaust the iterator, consider `.for_each(drop)` instead --> $DIR/fn_must_use_stdlib.rs:19:5 | LL | "1 2 3".split_whitespace().collect::<Vec<_>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused return value of `std::borrow::ToOwned::to_owned` which must be used: cloning is often expensive and is not expected to have side effects --> $DIR/fn_must_use_stdlib.rs:21:5 | LL | "hello".to_owned(); | ^^^^^^^^^^^^^^^^^^^ warning: unused return value of `std::clone::Clone::clone` which must be used: cloning is often expensive and is not expected to have side effects --> $DIR/fn_must_use_stdlib.rs:23:5 | LL | String::from("world").clone(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` cc rust-lang#48926
Configuration menu - View commit details
-
Copy full SHA for 911cda8 - Browse repository at this point
Copy the full SHA 911cda8View commit details -
Rollup merge of rust-lang#49570 - arielb1:bounded-universe, r=nikomat…
…sakis avoid IdxSets containing garbage above the universe length This makes sure that all bits in each IdxSet between the universe length and the end of the word are all zero instead of being in an indeterminate state. This fixes a crash with RUST_LOG=rustc_mir, and is probably a good idea anyway. r? @nikomatsakis - I think you are responsible for this code area now?
Configuration menu - View commit details
-
Copy full SHA for cb36b2c - Browse repository at this point
Copy the full SHA cb36b2cView commit details -
Rollup merge of rust-lang#49599 - rolfvandekrol:feature/no_ru, r=frew…
…sxcv Fix typo In `libstd/io/buffered.rs` one example was marked as `no_ru` instead of `no_run`. I assume this is a typo.
Configuration menu - View commit details
-
Copy full SHA for 78e0254 - Browse repository at this point
Copy the full SHA 78e0254View commit details -
Rollup merge of rust-lang#49609 - abonander:attr-macro-stmt-expr, r=p…
…etrochenkov run-pass/attr-stmt-expr: expand test cases Follow-up to rust-lang#49124 (comment) r? @petrochenkov
Configuration menu - View commit details
-
Copy full SHA for 0878e0f - Browse repository at this point
Copy the full SHA 0878e0fView commit details -
Rollup merge of rust-lang#49612 - tmccombs:stabilize-getpid, r=kennytm
Fix "since" version for getpid feature. It was stabilized right before the beta branch was cut for 1.26.0. See rust-lang#49523 (comment) This will need to be backported to beta (1.26.0)
Configuration menu - View commit details
-
Copy full SHA for 6af59e8 - Browse repository at this point
Copy the full SHA 6af59e8View commit details