-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 8 pull requests #128673
Rollup of 8 pull requests #128673
Commits on Jul 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 468f935 - Browse repository at this point
Copy the full SHA 468f935View commit details
Commits on Aug 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c2523c9 - Browse repository at this point
Copy the full SHA c2523c9View commit details -
Remove unnecessary constants from flt2dec dragon
The "dragon" `flt2dec` algorithm uses multi-precision multiplication by (sometimes large) powers of 10. It has precomputed some values to help with these calculations. BUT: * There is no need to store powers of 10 and 2 * powers of 10: it is trivial to compute the second from the first. * We can save a chunk of memory by storing powers of 5 instead of powers of 10 for the large powers (and just shifting by 2 as appropriate). * This also slightly speeds up the routines (by ~1-3%) since the intermediate products are smaller and the shift is cheap. In this PR, we remove the unnecessary constants and do the necessary adjustments. Relevant benchmarks before (on my Threadripper 3970X, x86_64-unknown-linux-gnu): ``` num::flt2dec::bench_big_shortest 137.92/iter +/- 2.24 num::flt2dec::strategy::dragon::bench_big_exact_12 2135.28/iter +/- 38.90 num::flt2dec::strategy::dragon::bench_big_exact_3 904.95/iter +/- 10.58 num::flt2dec::strategy::dragon::bench_big_exact_inf 47230.33/iter +/- 320.84 num::flt2dec::strategy::dragon::bench_big_shortest 3915.05/iter +/- 51.37 ``` and after: ``` num::flt2dec::bench_big_shortest 137.40/iter +/- 2.03 num::flt2dec::strategy::dragon::bench_big_exact_12 2101.10/iter +/- 25.63 num::flt2dec::strategy::dragon::bench_big_exact_3 873.86/iter +/- 4.20 num::flt2dec::strategy::dragon::bench_big_exact_inf 47468.19/iter +/- 374.45 num::flt2dec::strategy::dragon::bench_big_shortest 3877.01/iter +/- 45.74 ```
Configuration menu - View commit details
-
Copy full SHA for 36a8059 - Browse repository at this point
Copy the full SHA 36a8059View commit details -
Configuration menu - View commit details
-
Copy full SHA for f28d157 - Browse repository at this point
Copy the full SHA f28d157View commit details -
Configuration menu - View commit details
-
Copy full SHA for b94a9c1 - Browse repository at this point
Copy the full SHA b94a9c1View commit details
Commits on Aug 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f9d7e4c - Browse repository at this point
Copy the full SHA f9d7e4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 249afea - Browse repository at this point
Copy the full SHA 249afeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69de294 - Browse repository at this point
Copy the full SHA 69de294View commit details -
rustdoc: Rename
SelfTy
toReceiverTy
`SelfTy` makes it sound like it is literally the `Self` type, whereas in fact it may be `&Self` or other types. Plus, I want to use the name `SelfTy` for a new variant of `clean::Type`. Having both causes resolution conflicts or at least confusion.
Configuration menu - View commit details
-
Copy full SHA for 249d686 - Browse repository at this point
Copy the full SHA 249d686View commit details -
rustdoc: Create
SelfTy
to replaceGeneric(kw::SelfUpper)
Rustdoc often has to special-case `Self` because it is, well, a special type of generic parameter (although it also behaves as an alias in concrete impls). Instead of spreading this special-casing throughout the code base, create a new variant of the `clean::Type` enum that is for `Self` types. This is a refactoring that has almost no impact on rustdoc's behavior, except that `&Self`, `(Self,)`, `&[Self]`, and other similar occurrences of `Self` no longer link to the wrapping type (reference primitive, tuple primitive, etc.) as regular generics do. I felt this made more sense since users would expect `Self` to link to the containing trait or aliased type (though those are usually expanded), not the primitive that is wrapping it. For an example of the change, see the docs for `std::alloc::Allocator::by_ref`.
Configuration menu - View commit details
-
Copy full SHA for 664b3ff - Browse repository at this point
Copy the full SHA 664b3ffView commit details -
rustdoc: Stop treating
Self
as a generic in search indexWe already have special-cased code to handle inlining `Self` as the type or trait it refers to, and this was just causing glitches like the search `A -> B` yielding blanket `Into` impls.
Configuration menu - View commit details
-
Copy full SHA for 4e348fa - Browse repository at this point
Copy the full SHA 4e348faView commit details -
Use
match
instead of sequence ofif let
sThis is much more readable and idiomatic, and also may help performance since `match`es usually use switches while `if`s may not. I also fixed an incorrect comment.
Configuration menu - View commit details
-
Copy full SHA for e452e3d - Browse repository at this point
Copy the full SHA e452e3dView commit details -
rustdoc: Delete
ReceiverTy
(formerly known asSelfTy
)It was barely used, and the places that used it are actually clearer without it since they were often undoing some of its work. This also avoids an unnecessary clone of the receiver type and removes a layer of logical indirection in the code.
Configuration menu - View commit details
-
Copy full SHA for b4f77df - Browse repository at this point
Copy the full SHA b4f77dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for dac7f20 - Browse repository at this point
Copy the full SHA dac7f20View commit details -
Correct the const stabilization of
<[T]>::last_chunk
`<[T]>::first_chunk` became const stable in 1.77, but `<[T]>::last_chunk` was left out. This was fixed in 3488679, which reached stable in 1.80, making `<[T]>::last_chunk` const stable as of that version, but it is documented as being const stable as 1.77. While this is what should have happened, the documentation should reflect what actually did happen.
Configuration menu - View commit details
-
Copy full SHA for 70ab51f - Browse repository at this point
Copy the full SHA 70ab51fView commit details
Commits on Aug 5, 2024
-
Rollup merge of rust-lang#128026 - devnexen:available_parallelism_vxw…
…orks, r=Mark-Simulacrum std::thread: available_parallelism implementation for vxWorks proposal.
Configuration menu - View commit details
-
Copy full SHA for 02c3837 - Browse repository at this point
Copy the full SHA 02c3837View commit details -
Rollup merge of rust-lang#128471 - camelid:rustdoc-self, r=notriddle
rustdoc: Fix handling of `Self` type in search index and refactor its representation ### Summary - Add enum variant `clean::Type::SelfTy` and use it instead of `clean::Type::Generic(kw::SelfUpper)`. - Stop treating `Self` as a generic in the search index. - Remove struct formerly known as `clean::SelfTy` (constructed as representation of function receiver type). We're better off without it. ### Before ![image](https://github.com/user-attachments/assets/d257bdd8-3a62-4c71-84a5-9c950f2e4f00) ### After ![image](https://github.com/user-attachments/assets/8f6d3f22-92c1-41e3-9ab8-a881b66816c0) r? ```@notriddle``` cc rust-lang#127589 (comment)
Configuration menu - View commit details
-
Copy full SHA for 4adefa4 - Browse repository at this point
Copy the full SHA 4adefa4View commit details -
Rollup merge of rust-lang#128607 - ChrisDenton:visibility, r=jieyouxu
Use `object` in `run-make/symbols-visibility` This is another case where we can simply use a rust library instead of wrangling nm. try-job: x86_64-msvc try-job: i686-msvc try-job: test-various
Configuration menu - View commit details
-
Copy full SHA for f231973 - Browse repository at this point
Copy the full SHA f231973View commit details -
Rollup merge of rust-lang#128609 - swenson:smaller-faster-dragon, r=A…
…manieu Remove unnecessary constants from flt2dec dragon The "dragon" `flt2dec` algorithm uses multi-precision multiplication by (sometimes large) powers of 10. It has precomputed some values to help with these calculations. BUT: * There is no need to store powers of 10 and 2 * powers of 10: it is trivial to compute the second from the first. * We can save a chunk of memory by storing powers of 5 instead of powers of 10 for the large powers (and just shifting as appropriate). * This also slightly speeds up the routines (by ~1-3%) since the intermediate products are smaller and the shift is cheap. In this PR, we remove the unnecessary constants and do the necessary adjustments. Relevant benchmarks before (on my Threadripper 3970X, x86_64-unknown-linux-gnu): ``` num::flt2dec::bench_big_shortest 137.92/iter +/- 2.24 num::flt2dec::strategy::dragon::bench_big_exact_12 2135.28/iter +/- 38.90 num::flt2dec::strategy::dragon::bench_big_exact_3 904.95/iter +/- 10.58 num::flt2dec::strategy::dragon::bench_big_exact_inf 47230.33/iter +/- 320.84 num::flt2dec::strategy::dragon::bench_big_shortest 3915.05/iter +/- 51.37 ``` and after: ``` num::flt2dec::bench_big_shortest 137.40/iter +/- 2.03 num::flt2dec::strategy::dragon::bench_big_exact_12 2101.10/iter +/- 25.63 num::flt2dec::strategy::dragon::bench_big_exact_3 873.86/iter +/- 4.20 num::flt2dec::strategy::dragon::bench_big_exact_inf 47468.19/iter +/- 374.45 num::flt2dec::strategy::dragon::bench_big_shortest 3877.01/iter +/- 45.74 ```
Configuration menu - View commit details
-
Copy full SHA for 1e951b7 - Browse repository at this point
Copy the full SHA 1e951b7View commit details -
Rollup merge of rust-lang#128611 - ChrisDenton:cygpath, r=jieyouxu
run-make: Remove cygpath Remove cygpath from run-make-support.
Configuration menu - View commit details
-
Copy full SHA for baa00e5 - Browse repository at this point
Copy the full SHA baa00e5View commit details -
Rollup merge of rust-lang#128619 - glandium:last_chunk, r=scottmcm
Correct the const stabilization of `<[T]>::last_chunk` `<[T]>::first_chunk` became const stable in 1.77, but `<[T]>::last_chunk` was left out. This was fixed in 3488679, which reached stable in 1.80, making `<[T]>::last_chunk` const stable as of that version, but it is documented as being const stable as 1.77. While this is what should have happened, the documentation should reflect what actually did happen.
Configuration menu - View commit details
-
Copy full SHA for 74df517 - Browse repository at this point
Copy the full SHA 74df517View commit details -
Rollup merge of rust-lang#128630 - bvanjoi:resolve-comment, r=petroch…
…enkov docs(resolve): more explain about `target` r? ```````@petrochenkov```````
Configuration menu - View commit details
-
Copy full SHA for 227944d - Browse repository at this point
Copy the full SHA 227944dView commit details -
Rollup merge of rust-lang#128660 - matthiaskrgr:niceice, r=compiler-e…
…rrors tests: more crashes r? ``@jieyouxu``
Configuration menu - View commit details
-
Copy full SHA for 5fa740f - Browse repository at this point
Copy the full SHA 5fa740fView commit details