about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-01-31Rollup merge of #90277 - pierwill:fix-70258-inference-terms, r=jackh726Matthias Krüger-18/+20
Improve terminology around "after typeck" Closes #70258.
2022-01-31Auto merge of #90891 - nbdd0121:format, r=Mark-Simulacrumbors-78/+104
Create `core::fmt::ArgumentV1` with generics instead of fn pointer Split from (and prerequisite of) #90488, as this seems to have perf implication. `@rustbot` label: +T-libs
2022-01-30Auto merge of #92711 - zredb:issue-90187-fix, r=notriddlebors-49/+51
rustdoc: Remove `def_id_no_primitives` Fixes #90187.
2022-01-30Auto merge of #93482 - ehuss:rollup-qjyppci, r=ehussbors-514/+739
Rollup of 5 pull requests Successful merges: - #92887 (Bootstrap compiler update) - #92908 (Render more readable macro matcher tokens in rustdoc) - #93183 (rustdoc: mobile nav fixes) - #93192 (Add VS 2022 into error message) - #93475 (Add test to ensure that theme is applied correctly when going back in history) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-01-30Rollup merge of #93475 - GuillaumeGomez:theme-in-history, r=jshaEric Huss-0/+25
Add test to ensure that theme is applied correctly when going back in history Fixes #93258. r? `@jsha`
2022-01-30Rollup merge of #93192 - theidexisted:patch-1, r=wesleywiserEric Huss-1/+1
Add VS 2022 into error message
2022-01-30Rollup merge of #93183 - jsha:mobile-nav-fixes, r=GuillaumeGomezEric Huss-4/+26
rustdoc: mobile nav fixes - Make sure the mobile-topbar doesn't overflow its height if the user sets a bigger font. - Make sure the sidebar can be scrolled all the way to the bottom by shortening it to accommodate the mobile-topbar. - Make the item name in the mobile-topbar clickable to go to the top of the page. - Remove excess padding sidebar in mobile mode. Demo https://rustdoc.crud.net/jsha/mobile-nav-fixes/std/string/struct.String.html r? `@GuillaumeGomez`
2022-01-30Rollup merge of #92908 - dtolnay:rustdoc, r=GuillaumeGomezEric Huss-61/+296
Render more readable macro matcher tokens in rustdoc Follow-up to #92334. This PR lifts some of the token rendering logic from https://github.com/dtolnay/prettyplease into rustdoc so that even the matchers for which a source code snippet is not available (because they are macro-generated, or any other reason) follow some baseline good assumptions about where the tokens in the macro matcher are appropriate to space. The below screenshots show an example of the difference using one of the gnarliest macros I could find. Some things to notice: - In the **before**, notice how a couple places break in between `$(....)`↵`*`, which is just about the worst possible place that it could break. - In the **before**, the lines that wrapped are weirdly indented by 1 space of indentation relative to column 0. In the **after**, we use the typical way of block indenting in Rust syntax which is put the open/close delimiters on their own line and indent their contents by 4 spaces relative to the previous line (so 8 spaces relative to column 0, because the matcher itself is indented by 4 relative to the `macro_rules` header). - In the **after**, macro_rules metavariables like `$tokens:tt` are kept together, which is how just about everybody writing Rust today writes them. ## Before ![Screenshot from 2022-01-14 13-05-53](https://user-images.githubusercontent.com/1940490/149585105-1f182b78-751f-421f-a234-9dbc04fa3bbd.png) ## After ![Screenshot from 2022-01-14 13-06-04](https://user-images.githubusercontent.com/1940490/149585118-d4b52ea7-3e67-4b6e-a12b-31dfb8172f86.png) r? `@camelid`
2022-01-30Rollup merge of #92887 - pietroalbini:pa-bootstrap-update, r=Mark-SimulacrumEric Huss-448/+391
Bootstrap compiler update r? ``@Mark-Simulacrum``
2022-01-30Add test to ensure that theme is applied correctly when going back in historyGuillaume Gomez-0/+25
2022-01-30Auto merge of #93468 - matthiaskrgr:rollup-vxullvd, r=matthiaskrgrbors-47/+218
Rollup of 8 pull requests Successful merges: - #93256 (Make `join!` description more accurate) - #93358 (Add note suggesting that predicate may be satisfied, but is not `const`) - #93362 (Do not register infer var for GAT projection in RPIT) - #93391 (rustdoc: remove tooltip from source link) - #93414 (Move unstable is_{arch}_feature_detected! macros to std::arch) - #93441 (rustdoc: load the set of in-scope traits for modules with no docstring) - #93459 (fs: Don't copy d_name from struct dirent) - #93463 (Rename _args -> args in format_args expansion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-01-29rustdoc: small fixes to mobile navigationJacob Hoffman-Andrews-4/+26
- Make sure the mobile-topbar doesn't overflow its height if the user sets a bigger font. - Make sure the sidebar can be scrolled all the way to the bottom by shortening it to accommodate the mobile-topbar. - Make the item name in the mobile-topbar clickable to go to the top of the page. - Remove excess padding sidebar in mobile mode.
2022-01-30Rollup merge of #93463 - dtolnay:_args, r=cjgillotMatthias Krüger-4/+4
Rename _args -> args in format_args expansion As observed in https://github.com/rust-lang/rust/pull/91359#discussion_r786058960, prior to that PR this variable was sometimes never used, such as in the case of: ```rust println!(""); // used to expand to: ::std::io::_print( ::core::fmt::Arguments::new_v1( &["\n"], &match () { _args => [], }, ), ); ``` so the leading underscore in `_args` was used to suppress an unused variable lint. However after #91359 the variable is always used when present, as the unused case would instead expand to: ```rust ::std::io::_print(::core::fmt::Arguments::new_v1(&["\n"], &[])); ```
2022-01-30Rollup merge of #93459 - tavianator:dirent-copy-only-reclen, r=cuviperMatthias Krüger-2/+26
fs: Don't copy d_name from struct dirent The dirent returned from readdir() is only guaranteed to be valid for d_reclen bytes on common platforms. Since we copy the name separately anyway, we can copy everything except d_name into DirEntry::entry. Fixes #93384.
2022-01-30Rollup merge of #93441 - ↵Matthias Krüger-0/+41
notriddle:notriddle/collect-crate-doc-links-very-early, r=petrochenkov rustdoc: load the set of in-scope traits for modules with no docstring Fixes #93428 This fix is a response to a couple of special cases related to the `module_id`, which is eventually used for trait candidates: * The module id is always set to the current crate, when checking `crate::`. Normally, the set of in-scope traits would be set in `load_links_in_attrs`, but if there are no doc comments, then that loop will never run. * the module id is set to the parent module, when resolving a module that is spelled like this: // Notice how we use an outlined doc comment here! // [`Test::my_fn`] mod something { } As with the above problem with `crate::`, we need to make sure the module gets its traits in scope resolved, even if it has no doc comments of its own.
2022-01-30Rollup merge of #93414 - Amanieu:std_arch_detect, r=m-ou-seMatthias Krüger-19/+31
Move unstable is_{arch}_feature_detected! macros to std::arch These macros are unstable, except for `is_x86_feature_detected` which is still exported from the crate root for backwards-compatibility. This should unblock the stabilization of `is_aarch64_feature_detected`. r? ```@m-ou-se```
2022-01-30Rollup merge of #93391 - notriddle:notriddle/remove-srclink-tooltip, ↵Matthias Krüger-2/+2
r=jsha,GuillaumeGomez rustdoc: remove tooltip from source link This made more sense back when it was abbreviated, but now it seems redundant.
2022-01-30Rollup merge of #93362 - compiler-errors:ice-gat-in-rpit, r=oli-obkMatthias Krüger-7/+29
Do not register infer var for GAT projection in RPIT Fixes #93340 Fixes #91603 r? ```@oli-obk```
2022-01-30Rollup merge of #93358 - compiler-errors:is-not-const, r=fee1-deadMatthias Krüger-12/+84
Add note suggesting that predicate may be satisfied, but is not `const` Not sure if we should be printing this in addition to, or perhaps _instead_ of the help message: ``` help: the trait `~const Add` is not implemented for `NonConstAdd` ``` Also added `ParamEnv::is_const` and `PolyTraitPredicate::is_const_if_const` and, in a separate commit, used those in other places instead of `== hir::Constness::Const`, etc. r? ````@fee1-dead````
2022-01-30Rollup merge of #93256 - EFanZh:patch-1, r=joshtriplettMatthias Krüger-1/+1
Make `join!` description more accurate
2022-01-29fs: Add a regression test for #93384Tavian Barnes-0/+16
2022-01-29fs: Don't copy d_name from struct direntTavian Barnes-2/+10
The dirent returned from readdir() is only guaranteed to be valid for d_reclen bytes on common platforms. Since we copy the name separately anyway, we can copy everything except d_name into DirEntry::entry. Fixes #93384.
2022-01-29Rename _args -> args in format_args expansionDavid Tolnay-4/+4
2022-01-29Auto merge of #93457 - matthiaskrgr:rollup-e43ry1l, r=matthiaskrgrbors-30/+437
Rollup of 8 pull requests Successful merges: - #88205 (Add Explanation For Error E0772) - #92274 (Add `intrinsics::const_deallocate`) - #93236 (Make `NonNull::new` `const`) - #93299 (Fix dot separator when there is no source link) - #93410 (kmc-solid: Implement `net::FileDesc::duplicate`) - #93424 (fix nit) - #93431 (remove unused `jemallocator` crate) - #93453 (Add GUI theme change test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-01-29Change index_refutable_slice to use FxIndexMapGary Guo-6/+6
This will prevent unstable order when HirIds are pertubated.
2022-01-29Create `core::fmt::ArgumentV1` with generics instead of fn pointerGary Guo-72/+98
2022-01-29Rollup merge of #93453 - GuillaumeGomez:theme-change-test, r=jshaMatthias Krüger-1/+17
Add GUI theme change test r? `@jsha`
2022-01-29Rollup merge of #93431 - lqd:remove-jemallocator, r=Mark-SimulacrumMatthias Krüger-16/+1
remove unused `jemallocator` crate When it was noticed that the rustc binary wasn't actually using jemalloc via `#[global_allocator]` and that was removed, the dependency remained. Tests pass locally with a `jemalloc = true` build, but I'll trigger a try build to ensure I haven't missed an edge-case somewhere. r? ```@ghost``` until that completes
2022-01-29Rollup merge of #93424 - lcnr:nit, r=spastorinoMatthias Krüger-1/+1
fix nit
2022-01-29Rollup merge of #93410 - solid-rs:feat-kmc-solid-net-dup, r=dtolnayMatthias Krüger-1/+4
kmc-solid: Implement `net::FileDesc::duplicate` This PR implements `std::sys::solid::net::FileDesc::duplicate`, which was accidentally left out when this target was added by #86191.
2022-01-29Rollup merge of #93299 - GuillaumeGomez:dot-separator-no-source, r=jshaMatthias Krüger-3/+27
Fix dot separator when there is no source link Fixes #92973. We did well adding this test since there was a bug: ![Screenshot from 2022-01-25 17-05-48](https://user-images.githubusercontent.com/3050060/151016535-39b45f52-e1e0-4963-ad19-532e24ec4c9b.png) r? `@jsha`
2022-01-29Rollup merge of #93236 - woppopo:const_nonnull_new, r=oli-obkMatthias Krüger-1/+19
Make `NonNull::new` `const` Tracking issue: #93235
2022-01-29Rollup merge of #92274 - woppopo:const_deallocate, r=oli-obkMatthias Krüger-4/+274
Add `intrinsics::const_deallocate` Tracking issue: #79597 Related: #91884 This allows deallocation of a memory allocated by `intrinsics::const_allocate`. At the moment, this can be only used to reduce memory usage, but in the future this may be useful to detect memory leaks (If an allocated memory remains after evaluation, raise an error...?).
2022-01-29Rollup merge of #88205 - danii:e0772, r=GuillaumeGomezMatthias Krüger-3/+94
Add Explanation For Error E0772 I've added an error explanation for the error code E0772. Assists with #61137
2022-01-29Auto merge of #92312 - BGR360:needs-test, r=Mark-Simulacrumbors-0/+118
Add tests for three old ICEs Closes #84044 Closes #91594 Closes #89066
2022-01-29Document about some behaviors of `const_(de)allocate` and add some tests.woppopo-4/+51
2022-01-29Extend theme change GUI testGuillaume Gomez-0/+16
2022-01-29Update browser-ui-test version to 0.5.8Guillaume Gomez-1/+1
2022-01-29Auto merge of #93351 - anp:fuchsia-remove-dir-all, r=tmandrybors-5/+3
Bump libc and fix remove_dir_all on Fuchsia after CVE fix With the previous `is_dir` impl, we would attempt to unlink a directory in the None branch, but Fuchsia supports returning ENOTEMPTY from unlinkat() without the AT_REMOVEDIR flag because we don't currently differentiate unlinking files and directories by default. On the Fuchsia side I've opened https://fxbug.dev/92273 to discuss whether this is the correct behavior, but it doesn't seem like addressing the error code is necessary to make our tests happy. Depends on https://github.com/rust-lang/libc/pull/2654 since we apparently haven't needed to reference DT_UNKNOWN before this.
2022-01-29Auto merge of #93434 - Mark-Simulacrum:apple-various, r=pietroalbinibors-6/+25
Move tier-2 (without host tools) apple targets to separate builder One-off (likely fairly unreliable, but give some idea) measurements: * dist-apple-various (new): 2h10m * dist-x86_64-apple: 2h55m -> 2h36m (cutting roughly 20 minutes)
2022-01-28Add test for old ICE in #89066Ben Reeves-0/+67
2022-01-28Add test for old ICE in #91594Ben Reeves-0/+34
2022-01-28Add test for old ICEBen Reeves-0/+17
The ICE from #84044 no longer occurs.
2022-01-28Auto merge of #93427 - matthiaskrgr:rollup-esd3ixl, r=matthiaskrgrbors-253/+320
Rollup of 10 pull requests Successful merges: - #92611 (Add links to the reference and rust by example for asm! docs and lints) - #93158 (wasi: implement `sock_accept` and enable networking) - #93239 (Add os::unix::net::SocketAddr::from_path) - #93261 (Some unwinding related cg_ssa cleanups) - #93295 (Avoid double panics when using `TempDir` in tests) - #93353 (Unimpl {Add,Sub,Mul,Div,Rem,BitXor,BitOr,BitAnd}<$t> for Saturating<$t>) - #93356 (Edit docs introduction for `std::cmp::PartialOrd`) - #93375 (fix typo `documenation`) - #93399 (rustbuild: Fix compiletest warning when building outside of root.) - #93404 (Fix a typo from #92899) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-01-28Fix remove_dir_all on Fuchsia after CVE fix.Adam Perry-5/+3
With the previous `is_dir` impl, we would attempt to unlink a directory in the None branch, but Fuchsia supports returning ENOTEMPTY from unlinkat() without the AT_REMOVEDIR flag because we don't currently differentiate unlinking files and directories by default. On the Fuchsia side I've opened https://fxbug.dev/92273 to discuss whether this is the correct behavior, but it doesn't seem like addressing the error code is necessary to make our tests happy. Updates std's libc crate to include DT_UNKNOWN for Fuchsia.
2022-01-28Auto merge of #93426 - pnkfelix:issue-91671-backport-llvm-fix, r=nikicbors-0/+0
backport llvm fix for issue 91671. fix #91671
2022-01-28rustdoc: load the set of in-scope traits for modules with no docstringMichael Howell-0/+41
Fixes #93428 This fix is a response to a couple of special cases related to the `module_id`, which is eventually used for trait candidates: * The module id is always set to the current crate, when checking `crate::`. Normally, the set of in-scope traits would be set in `load_links_in_attrs`, but if there are no doc comments, then that loop will never run. * the module id is set to the parent module, when resolving a module that is spelled like this: // Notice how we use an outlined doc comment here! // [`Test::my_fn`] mod something { } As with the above problem with `crate::`, we need to make sure the module gets its traits in scope resolved, even if it has no doc comments of its own.
2022-01-28Move target-only apple targets to separate builderMark Rousskov-6/+25
2022-01-28Add Explanation For Error E0772Daniel Conley-3/+94
2022-01-28remove unused `jemallocator` crateRémy Rakic-16/+1