-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 16 pull requests #74191
Rollup of 16 pull requests #74191
Commits on Jun 12, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 049f6ea - Browse repository at this point
Copy the full SHA 049f6eaView commit details
Commits on Jul 5, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8a2e376 - Browse repository at this point
Copy the full SHA 8a2e376View commit details -
Configuration menu - View commit details
-
Copy full SHA for f25811e - Browse repository at this point
Copy the full SHA f25811eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f07100a - Browse repository at this point
Copy the full SHA f07100aView commit details
Commits on Jul 6, 2020
-
Use relative path for local links to primitives in libcore
Else, links to `char::foo` would point into `/path/to/src/libcore/std/primitive.char.html#method.foo`. Split out from rust-lang#73804.
Configuration menu - View commit details
-
Copy full SHA for 81fbfc4 - Browse repository at this point
Copy the full SHA 81fbfc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cef103 - Browse repository at this point
Copy the full SHA 6cef103View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee3a0f8 - Browse repository at this point
Copy the full SHA ee3a0f8View commit details -
Hide
&mut self
methods from Deref in sidebarIf there are no `DerefMut` impl for the type.
Configuration menu - View commit details
-
Copy full SHA for e0b69f2 - Browse repository at this point
Copy the full SHA e0b69f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5702e02 - Browse repository at this point
Copy the full SHA 5702e02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97867bb - Browse repository at this point
Copy the full SHA 97867bbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 368aa6f - Browse repository at this point
Copy the full SHA 368aa6fView commit details
Commits on Jul 7, 2020
-
Two new rustdoc tests for intra links
They both produce less-than-desirable output (links going to docs.rust-lang.org), but I haven't figured out yet how to assert about them properly.
Configuration menu - View commit details
-
Copy full SHA for 33a5d00 - Browse repository at this point
Copy the full SHA 33a5d00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 165aecb - Browse repository at this point
Copy the full SHA 165aecbView commit details -
Assert current behavior for links
For the two of these tests that have a local `char` to link to, this behavior isn't what's expected, but is what's happening presently.
Configuration menu - View commit details
-
Copy full SHA for 865b930 - Browse repository at this point
Copy the full SHA 865b930View commit details -
Configuration menu - View commit details
-
Copy full SHA for f258d98 - Browse repository at this point
Copy the full SHA f258d98View commit details -
Configuration menu - View commit details
-
Copy full SHA for b50c13c - Browse repository at this point
Copy the full SHA b50c13cView commit details -
Revert "Add guard to check for local
core
crate"This reverts commit ee3a0f8.
Configuration menu - View commit details
-
Copy full SHA for 8d267db - Browse repository at this point
Copy the full SHA 8d267dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd07774 - Browse repository at this point
Copy the full SHA dd07774View commit details
Commits on Jul 8, 2020
-
Liballoc use vec instead of vector
Keep congruency with other parts, full word vector is rarely used.
Configuration menu - View commit details
-
Copy full SHA for 7bc85e2 - Browse repository at this point
Copy the full SHA 7bc85e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c63fba - Browse repository at this point
Copy the full SHA 3c63fbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9366458 - Browse repository at this point
Copy the full SHA 9366458View commit details -
Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.
Configuration menu - View commit details
-
Copy full SHA for 1e567c1 - Browse repository at this point
Copy the full SHA 1e567c1View commit details -
Avoid running test on Windows platforms
There don't seem to be any other compiletests that are 1) building a standalone "no_core" create and then 2) trying to link against it. There seems to be a platform-specific limitation in doing so: ``` 2020-07-08T16:07:42.9419409Z = note: Creating library D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.lib and object D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.exp 2020-07-08T16:07:42.9419810Z LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 2020-07-08T16:07:42.9420032Z D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll : fatal error LNK1120: 1 unresolved externals ``` Possibly this could be resolved by adding a `__DllMainCRTStartup` or `__DllMainCRTStartup@12` symbol in an architecture- and platform-specific way.
Configuration menu - View commit details
-
Copy full SHA for 56b6b44 - Browse repository at this point
Copy the full SHA 56b6b44View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca22091 - Browse repository at this point
Copy the full SHA ca22091View commit details
Commits on Jul 9, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 35fae73 - Browse repository at this point
Copy the full SHA 35fae73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09f51d4 - Browse repository at this point
Copy the full SHA 09f51d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 271e2a9 - Browse repository at this point
Copy the full SHA 271e2a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08d3a74 - Browse repository at this point
Copy the full SHA 08d3a74View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc6ee8f - Browse repository at this point
Copy the full SHA fc6ee8fView commit details -
Tweak
::
->:
typo heuristic and reduce verbosityDo not trigger on correct type ascription expressions with trailing operators and _do_ trigger on likely path typos where a turbofish is used. On likely path typos, remove note explaining type ascription.
Configuration menu - View commit details
-
Copy full SHA for e771a4f - Browse repository at this point
Copy the full SHA e771a4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 36a229b - Browse repository at this point
Copy the full SHA 36a229bView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe351e9 - Browse repository at this point
Copy the full SHA fe351e9View commit details -
Rollup merge of rust-lang#70835 - yoshuawuyts:int-log2, r=dtolnay
Add Integer::checked_{log,log2,log10} This implements `{log,log2,log10}` methods for all integer types. The implementation was provided by @substack for use in the stdlib. _Note: I'm not big on math, so this PR is a best effort written with limited knowledge. It's likely I'll be getting things wrong, but happy to learn and correct. Please bare with me._ ## Motivation Calculating the logarithm of a number is a generally useful operation. Currently the stdlib only provides implementations for floats, which means that if we want to calculate the logarithm for an integer we have to cast it to a float and then back to an int. > would be nice if there was an integer log2 instead of having to either use the f32 version or leading_zeros() which i have to verify the results of every time to be sure _— [@substack, 2020-03-08](https://twitter.com/substack/status/1236445105197727744)_ At higher numbers converting from an integer to a float we also risk overflows. This means that Rust currently only provides log operations for a limited set of integers. The process of doing log operations by converting between floats and integers is also prone to rounding errors. In the following example we're trying to calculate `base10` for an integer. We might try and calculate the `base2` for the values, and attempt [a base swap](https://www.rapidtables.com/math/algebra/Logarithm.html#log-rules) to arrive at `base10`. However because we're performing intermediate rounding we arrive at the wrong result: ```rust // log10(900) = ~2.95 = 2 dbg!(900f32.log10() as u64); // log base change rule: logb(x) = logc(x) / logc(b) // log2(900) / log2(10) = 9/3 = 3 dbg!((900f32.log2() as u64) / (10f32.log2() as u64)); ``` _[playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6bd6c68b3539e400f9ca4fdc6fc2eed0)_ This is somewhat nuanced as a lot of the time it'll work well, but in real world code this could lead to some hard to track bugs. By providing correct log implementations directly on integers we can help prevent errors around this. ## Implementation notes I checked whether LLVM intrinsics existed before implementing this, and none exist yet. ~~Also I couldn't really find a better way to write the `ilog` function. One option would be to make it a private method on the number, but I didn't see any precedent for that. I also didn't know where to best place the tests, so I added them to the bottom of the file. Even though they might seem like quite a lot they take no time to execute.~~ ## References - [Log rules](https://www.rapidtables.com/math/algebra/Logarithm.html#log-rules) - [Rounding error playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6bd6c68b3539e400f9ca4fdc6fc2eed0) - [substack's tweet asking about integer log2 in the stdlib](https://twitter.com/substack/status/1236445105197727744) - [Integer Logarithm, A. Jaffer 2008](https://people.csail.mit.edu/jaffer/III/ilog.pdf)
Configuration menu - View commit details
-
Copy full SHA for 9c7a750 - Browse repository at this point
Copy the full SHA 9c7a750View commit details -
Rollup merge of rust-lang#73292 - poliorcetics:fix-link-in-partialeq,…
… r=Dylan-DPC Fixing broken link for the Eq trait Fixes rust-lang#73233.
Configuration menu - View commit details
-
Copy full SHA for 806cfce - Browse repository at this point
Copy the full SHA 806cfceView commit details -
Rollup merge of rust-lang#73791 - Manishearth:parens-intra-doc, r=Gui…
…llaumeGomez,jyn514 Allow for parentheses after macro intra-doc-links None
Configuration menu - View commit details
-
Copy full SHA for c191cd1 - Browse repository at this point
Copy the full SHA c191cd1View commit details -
Rollup merge of rust-lang#74070 - eddyb:forall-tcx-providers, r=nikom…
…atsakis Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>. In order to work around normalization-under-HRTB (for `provide!` in `rustc_metadata`), we ended up with this: ```rust struct Providers<'tcx> { type_of: fn(TyCtxt<'tcx>, DefId) -> Ty<'tcx>, // ... } ``` But what I initially wanted to do, IIRC, was this: ```rust struct Providers { type_of: for<'tcx> fn(TyCtxt<'tcx>, DefId) -> Ty<'tcx>, // ... } ``` This PR moves to the latter, for the simple reason that only the latter allows keeping a `Providers` value, or a subset of its `fn` pointer fields, around in a `static` or `thread_local!`, which can be really useful for custom drivers that override queries. (@jyn514 and I came across a concrete usecase of that in `rustdoc`) The `provide!` macro in `rustc_metadata` is fixed by making the query key/value types available as type aliases under `ty::query::query_{keys,values}`, not just associated types (this is the first commit). r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for da25c24 - Browse repository at this point
Copy the full SHA da25c24View commit details -
Rollup merge of rust-lang#74077 - sethp:docs/fix-intra-doc-primitive-…
…link, r=jyn514 Use relative path for local links to primitives Else, links to `char::foo` would point into `/path/to/src/libcore/std/primitive.char.html#method.foo`. Split out from rust-lang#73804.
Configuration menu - View commit details
-
Copy full SHA for d07bb64 - Browse repository at this point
Copy the full SHA d07bb64View commit details -
Rollup merge of rust-lang#74107 - nbdd0121:rustdoc, r=GuillaumeGomez
Hide `&mut self` methods from Deref in sidebar if there are no `DerefMut` impl for the type. This partially addresses rust-lang#74083.
Configuration menu - View commit details
-
Copy full SHA for 69e30b5 - Browse repository at this point
Copy the full SHA 69e30b5View commit details -
Rollup merge of rust-lang#74109 - nbdd0121:issue-74082, r=petrochenkov
Only allow `repr(i128/u128)` on enum Fixes rust-lang#74082
Configuration menu - View commit details
-
Copy full SHA for 60213e1 - Browse repository at this point
Copy the full SHA 60213e1View commit details -
Rollup merge of rust-lang#74125 - ayazhafiz:i/74050, r=matthewjasper
Correctly mark the ending span of a match arm Closes rust-lang#74050 r? @matthewjasper
Configuration menu - View commit details
-
Copy full SHA for 8ec755c - Browse repository at this point
Copy the full SHA 8ec755cView commit details -
Rollup merge of rust-lang#74135 - ehuss:update-books, r=ehuss
Update books ## book 3 commits in 4e7c00bece1544d409312ec93467beb62b5bd0cb..84a31397b34f9d405df44f2899ff17a4828dba18 2020-06-19 09:39:12 -0400 to 2020-07-04 10:50:18 -0500 - Update Windows install instructions (rust-lang/book#2389) - Update ch01-02-hello-world.md (rust-lang/book#2386) - bump mdbook version in github action (rust-lang/book#2380) ## reference 2 commits in 04d5d5d7ba624b6f5016298451f3a63d557f3260..0ea7bc494f1289234d8800bb9185021e0ad946f0 2020-06-16 15:08:05 -0700 to 2020-07-02 15:33:04 -0700 - Fix mis-capitalization of type name. (rust-lang/reference#844) - Fix name of trait for array indexing. (rust-lang/reference#840) ## embedded-book 1 commits in 616962ad0dd80f34d8b802da038d0aed9dd691bb..94d9ea8460bcbbbfef1877b47cb930260b5849a7 2020-06-23 16:03:45 +0000 to 2020-07-05 14:17:40 +0000 - Note on transformation of static variables by attribute exception (rust-embedded/book#251) ## rust-by-example 1 commits in 6f94ccb48da6fa4ed0031290f21411cf789f7d5e..229c6945a26a53a751ffa4f9cb418388c00029d3 2020-06-20 17:51:30 -0300 to 2020-07-06 10:13:15 -0300 - Modify comments (rust-lang/rust-by-example#1359)
Configuration menu - View commit details
-
Copy full SHA for f4d530d - Browse repository at this point
Copy the full SHA f4d530dView commit details -
Rollup merge of rust-lang#74136 - JohnTitor:index-page-link, r=Guilla…
…umeGomez Fix broken link in rustdocdoc The previous link redirects to https://www.rust-lang.org/learn.
Configuration menu - View commit details
-
Copy full SHA for 6e58716 - Browse repository at this point
Copy the full SHA 6e58716View commit details -
Rollup merge of rust-lang#74137 - ehuss:update-cargo, r=ehuss
Update cargo 6 commits in fede83ccf973457de319ba6fa0e36ead454d2e20..4f74d9b2a771c58b7ef4906b2668afd075bc8081 2020-07-02 21:51:34 +0000 to 2020-07-08 17:13:00 +0000 - Disable long_file_names test if not supported on Windows. (rust-lang/cargo#8469) - Add support for deserializing enums in config files (rust-lang/cargo#8454) - Write GNU tar files, supporting long names. (rust-lang/cargo#8453) - Don't overwrite existing `rustdoc` args with --document-private-items (rust-lang/cargo#8449) - Add some help about rustup's +toolchain syntax. (rust-lang/cargo#8455) - Update metadata man page. (rust-lang/cargo#8451)
Configuration menu - View commit details
-
Copy full SHA for 9646357 - Browse repository at this point
Copy the full SHA 9646357View commit details -
Rollup merge of rust-lang#74142 - pickfire:patch-1, r=dtolnay
Liballoc use vec instead of vector Keep congruency with other parts, full word vector is rarely used.
Configuration menu - View commit details
-
Copy full SHA for f6dc620 - Browse repository at this point
Copy the full SHA f6dc620View commit details -
Rollup merge of rust-lang#74146 - RalfJung:miri, r=RalfJung
update miri Fixes rust-lang#74132 Cc @rust-lang/miri r? @ghost
Configuration menu - View commit details
-
Copy full SHA for feaf996 - Browse repository at this point
Copy the full SHA feaf996View commit details -
Rollup merge of rust-lang#74150 - tamird:blocklist, r=nikomatsakis
Avoid "blacklist" Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.
Configuration menu - View commit details
-
Copy full SHA for 71da131 - Browse repository at this point
Copy the full SHA 71da131View commit details -
Rollup merge of rust-lang#74184 - Manishearth:doc-intra-doc, r=Guilla…
…umeGomez Add docs for intra-doc-links Fixes rust-lang#66000 Hmm, for some reason my push closed the previous PR
Configuration menu - View commit details
-
Copy full SHA for 997bf0e - Browse repository at this point
Copy the full SHA 997bf0eView commit details -
Rollup merge of rust-lang#74188 - estebank:tweak-ascription-typo-heur…
…istic, r=petrochenkov Tweak `::` -> `:` typo heuristic and reduce verbosity Do not trigger on correct type ascription expressions with trailing operators and _do_ trigger on likely path typos where a turbofish is used. On likely path typos, remove note explaining type ascription. Clean up indentation. r? @petrochenkov
Configuration menu - View commit details
-
Copy full SHA for 7d81bb4 - Browse repository at this point
Copy the full SHA 7d81bb4View commit details