about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-10-17Rollup merge of #102962 - flba-eb:remote_test_server_help, r=pietroalbiniMatthias Krüger-3/+22
remote-test-server: Show command line arguments The user of remote-test-server should get at least some minimal command line help as this is often started manually. r? `@pietroalbini`
2022-10-17Auto merge of #103116 - TaKO8Ki:fix-103053, r=lcnrbors-0/+32
Fix `own_substs` ICE Fixes #103053
2022-10-17Auto merge of #103096 - petrochenkov:indresdoc, r=cjgillotbors-0/+12
resolve: Shadow erroneous glob imports with erroneous single imports If such shadowing doesn't happen we end up in a weird state that may cause ICEs. (In non-erroneous cases single imports always shadow glob imports too.) Fixes https://github.com/rust-lang/rust/issues/100047 Fixes https://github.com/rust-lang/rust/issues/100241
2022-10-16Auto merge of #103125 - matthiaskrgr:rollup-82xttcl, r=matthiaskrgrbors-30/+81
Rollup of 5 pull requests Successful merges: - #103087 (Documentation BTreeMap::append's behavior for already existing keys) - #103089 (Mark derived StructuralEq as automatically derived.) - #103102 (Clarify the possible return values of `len_utf16`) - #103109 (PhantomData: inline a macro that is used only once) - #103120 (rustdoc: Do not expect `doc(primitive)` modules to always exist) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-16Rollup merge of #103120 - petrochenkov:docice, r=GuillaumeGomezMatthias Krüger-6/+22
rustdoc: Do not expect `doc(primitive)` modules to always exist The second commit fixes one more ICE by processing impls in crates loaded through the "load all `--extern`s" hack. Fixes https://github.com/rust-lang/rust/issues/96288 Fixes https://github.com/rust-lang/rust/issues/103028
2022-10-16Rollup merge of #103089 - cjgillot:automatic-structural-eq, r=oli-obkMatthias Krüger-24/+59
Mark derived StructuralEq as automatically derived. Fixes https://github.com/rust-lang/rust/issues/69952 Drive-by: use correct spans for generic params.
2022-10-16Auto merge of #102026 - Bryanskiy:resolve_update, r=petrochenkovbors-45/+46
Populate effective visibilities in 'rustc_resolve' Next part of RFC https://github.com/rust-lang/rust/issues/48054. previous: https://github.com/rust-lang/rust/pull/101713 `@rustbot` author r? `@petrochenkov`
2022-10-16Populate effective visibilities in 'rustc_resolve'Bryanskiy-45/+46
2022-10-16rustdoc: Process extern impls in all loaded cratesVadim Petrochenkov-1/+2
including those loaded through hacks.
2022-10-16rustdoc: Do not expect `doc(primitive)` modules to always existVadim Petrochenkov-5/+20
2022-10-16Rollup merge of #103115 - GuillaumeGomez:clean-up-anchors-gui-test, r=notriddleMatthias Krüger-148/+101
Clean up anchors.goml rustdoc GUI test r? ``@notriddle``
2022-10-16Rollup merge of #103060 - notriddle:notridddle/help-page, r=GuillaumeGomezMatthias Krüger-50/+173
rustdoc: make the help button a link to a page This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page. Preview: http://notriddle.com/notriddle-rustdoc-demos/help-page/std/index.html
2022-10-16Rollup merge of #102857 - saethlin:derived-enum-hash-test, r=Mark-SimulacrumMatthias Krüger-0/+20
Add a regression test for #39137 The problem in the issue has been fixed in the meantime, so since this adds a regression test I think this closes https://github.com/rust-lang/rust/issues/39137
2022-10-16fix `own_substs` ICETakayuki Maeda-0/+32
2022-10-16Clean up anchors.goml rustdoc GUI testGuillaume Gomez-147/+100
2022-10-16Update browser-ui-test version to 0.12.5Guillaume Gomez-1/+1
2022-10-16Auto merge of #102334 - compiler-errors:rpitit-substs-issue, r=cjgillotbors-0/+33
Fix subst issues with return-position `impl Trait` in trait 1. Fix an issue where we were rebase impl substs onto trait method substs, instead of trait substs 2. Fix an issue where early-bound regions aren't being mapped correctly for RPITIT hidden types Fixes #102301 Fixes #102310 Fixes #102334 Fixes #102918
2022-10-16Auto merge of #102080 - yanchen4791:issue-99824-fix, r=cjgillotbors-8/+18
Fix missing explanation of where the borrowed reference is used when the same borrow occurs multiple times due to loop iterations Fix #99824. Problem of the issue: If a borrow occurs in a loop, the borrowed reference could be invalidated at the same place at next iteration of the loop. When this happens, the point where the borrow occurs is the same as the intervening point that might invalidate the reference in the loop. This causes a problem for the current code finding the point where the resulting reference is used, so that the explanation of the cause will be missing. As the second point of "explain all errors in terms of three points" (see [leveraging intuition framing errors in terms of points"](https://rust-lang.github.io/rfcs/2094-nll.html#leveraging-intuition-framing-errors-in-terms-of-points), this explanation is very helpful for user to understand the error. In the current implementation, the searching region for finding the location where the borrowed reference is used is limited to between the place where the borrow occurs and the place where the reference is invalidated. If those two places happen to be the same, which indicates that the borrow and invalidation occur at the same place in a loop, the search will fail. One solution to the problem is when these two places are the same, find the terminator of the loop, and then use the location of the loop terminator instead of the location of the borrow for the region to find the place where the borrowed reference is used.
2022-10-15rustdoc: make help button a no-op when on help pageMichael Howell-0/+15
2022-10-16Rollup merge of #103088 - GuillaumeGomez:fix-settings-page, r=notriddleYuki Okushi-3/+12
Fix settings page Thanks to https://github.com/rust-lang/rust/pull/103060, I discovered that the settings page was badly rendered. This PR fixes it. Before: ![Screenshot from 2022-10-15 16-02-41](https://user-images.githubusercontent.com/3050060/195990668-42e0b16b-3146-4864-b822-6f6a80fb77a5.png) After: ![Screenshot from 2022-10-15 16-02-31](https://user-images.githubusercontent.com/3050060/195990664-20f967df-8989-4336-bca9-be52baab8e81.png) r? ```@notriddle```
2022-10-16Rollup merge of #103080 - ohno418:fix-hir-pretty-print-lifetimes, r=cjgillotYuki Okushi-0/+36
pretty: fix to print some lifetimes on HIR pretty-print HIR pretty-printer doesn't seem to print some lifetimes in types. This PR fixes that. Closes https://github.com/rust-lang/rust/issues/85089
2022-10-16resolve: Shadow erroneous glob imports with erroneous single importsVadim Petrochenkov-0/+12
2022-10-15rustdoc: add test cases for links inside the help popoverMichael Howell-4/+24
2022-10-15rustdoc: fix Ctrl-Click on help and settings linksMichael Howell-1/+8
2022-10-15rustdoc: make the help button a link to a pageMichael Howell-47/+128
This allows you to open the help section in a new browser tab, which is a pretty reasonable thing to want for a documentation page.
2022-10-15Add testMichael Goulet-0/+15
2022-10-15Fix subst issues with RPITITMichael Goulet-0/+18
2022-10-15Mark derived StructuralEq as automatically derived.Camille GILLOT-24/+59
2022-10-15pretty: fix to print some lifetimes on HIR pretty-printYutaro Ohno-0/+36
2022-10-15Add more GUI tests for settings pageGuillaume Gomez-2/+9
2022-10-15Fix display of settings pageGuillaume Gomez-1/+3
2022-10-15Auto merge of #103083 - Dylan-DPC:rollup-97cvwdv, r=Dylan-DPCbors-0/+279
Rollup of 6 pull requests Successful merges: - #102773 (Use semaphores for thread parking on Apple platforms) - #102884 (resolve: Some cleanup, asserts and tests for lifetime ribs) - #102954 (Add missing checks for `doc(cfg_hide(...))`) - #102998 (Drop temporaries created in a condition, even if it's a let chain) - #103003 (Fix `suggest_floating_point_literal` ICE) - #103041 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-15Rollup merge of #103041 - weihanglo:update-cargo, r=ehussDylan DPC-0/+0
Update cargo 12 commits in b8f30cb23c4e5f20854a4f683325782b7cff9837..b332991a57c9d055f1864de1eed93e2178d49440 2022-10-10 19:16:06 +0000 to 2022-10-13 22:05:28 +0000 - Differentiate the warning when an alias (built-in or user-defined) shadows an external subcommand (rust-lang/cargo#11170) - chore: Update tests for latest clap (rust-lang/cargo#11235) - feat(publish): Support 'publish.timeout' config behind '-Zpublish-timeout' (rust-lang/cargo#11230) - Add missing edition (rust-lang/cargo#11231) - doc(profiles): add module level doc (rust-lang/cargo#11219) - refactor(publish): Clarify which SourceId is being used (rust-lang/cargo#11216) - Add new SourceKind::SparseRegistry to differentiate sparse registries (rust-lang/cargo#11209) - Fix deadlock when build scripts are waiting for input on stdin (rust-lang/cargo#11205) - refactor: New variant `FeaturesFor::ArtifactDep` (rust-lang/cargo#11184) - Fix rustdoc warning about unclosed HTML tag (rust-lang/cargo#11221) - refactor(tests): Prepare for wait-for-publish test changes (rust-lang/cargo#11210) - Add configuration option for controlling crates.io protocol (rust-lang/cargo#11215)
2022-10-15Rollup merge of #103003 - TaKO8Ki:fix-102989, r=compiler-errorsDylan DPC-0/+75
Fix `suggest_floating_point_literal` ICE Fixes #102989
2022-10-15Rollup merge of #102998 - nathanwhit:let-chains-drop-order, r=eholkDylan DPC-0/+64
Drop temporaries created in a condition, even if it's a let chain Fixes #100513. During the lowering from AST to HIR we wrap expressions acting as conditions in a `DropTemps` expression so that any temporaries created in the condition are dropped after the condition is executed. Effectively this means we transform ```rust if Some(1).is_some() { .. } ``` into (roughly) ```rust if { let _t = Some(1).is_some(); _t } { .. } ``` so that if we create any temporaries, they're lifted into the new scope surrounding the condition, so for example something along the lines of ```rust if { let temp = Some(1); let _t = temp.is_some(); _t }. ``` Before this PR, if the condition contained any let expressions we would not introduce that new scope, instead leaving the condition alone. This meant that in a let-chain like ```rust if get_drop("first").is_some() && let None = get_drop("last") { println!("second"); } else { .. } ``` the temporary created for `get_drop("first")` would be lifted into the _surrounding block_, which caused it to be dropped after the execution of the entire `if` expression. After this PR, we wrap everything but the `let` expression in terminating scopes. The upside to this solution is that it's minimally invasive, but the downside is that in the worst case, an expression with `let` exprs interspersed like ```rust if get_drop("first").is_some() && let Some(_a) = get_drop("fifth") && get_drop("second").is_some() && let Some(_b) = get_drop("fourth") { .. } ``` gets _multiple_ new scopes, roughly ```rust if { let _t = get_drop("first").is_some(); _t } && let Some(_a) = get_drop("fifth") && { let _t = get_drop("second").is_some(); _t } && let Some(_b) = get_drop("fourth") { .. } ``` so instead of all of the temporaries being dropped at the end of the entire condition, they will be dropped right after they're evaluated (before the subsequent `let` expr). So while I'd say the drop behavior around let-chains is _less_ surprising after this PR, it still might not exactly match what people might expect. For tests, I've just extended the drop order tests added in #100526. I'm not sure if that's the best way to go about it, though, so suggestions are welcome.
2022-10-15Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=ManishearthDylan DPC-0/+51
Add missing checks for `doc(cfg_hide(...))` Part of #43781. The `doc(cfg_hide(...))` attribute can only be used at the crate level and takes a list of attributes as argument. r? ```@Manishearth```
2022-10-15Rollup merge of #102884 - petrochenkov:liferib, r=cjgillotDylan DPC-0/+89
resolve: Some cleanup, asserts and tests for lifetime ribs Follow up to https://github.com/rust-lang/rust/pull/98279 and friends. r? ``@cjgillot``
2022-10-15Auto merge of #101832 - compiler-errors:dyn-star-plus, r=eholkbors-17/+98
Make `dyn*` casts into a coercion, allow `dyn*` upcasting I know that `dyn*` is likely not going to be a feature exposed to surface Rust, but this makes it slightly more ergonomic to write tests for these types anyways. ... and this was just fun to implement anyways. 1. Make `dyn*` into a coercion instead of a cast 2. Enable `dyn*` upcasting since we basically get it for free 3. Simplify some of the cast checking code since we're using the coercion path now r? `@eholk` but feel free to reassign cc `@nikomatsakis` and `@tmandry` who might care about making `dyn*` casts into a coercion
2022-10-15Auto merge of #99292 - Aaron1011:stability-use-tree, r=cjgillotbors-3/+38
Correctly handle path stability for 'use tree' items PR #95956 started checking the stability of path segments. However, this was not applied to 'use tree' items (e.g. 'use some::path::{ItemOne, ItemTwo}') due to the way that we desugar these items in HIR lowering. This PR modifies 'use tree' lowering to preserve resolution information, which is needed by stability checking.
2022-10-14Rollup merge of #103067 - Nilstrieb:tidy-likes-the-alphabet, r=jackh726Matthias Krüger-7/+8
More alphabetical sorting Sort and enforce a few more things. The biggest change here is sorting all target features.
2022-10-14Rollup merge of #103054 - GuillaumeGomez:cleanup-rust-logo-test, r=notriddleMatthias Krüger-70/+26
Clean up rust-logo rustdoc GUI test r? `@notriddle`
2022-10-14Rollup merge of #103047 - GuillaumeGomez:update-browser-ui-test, r=notriddleMatthias Krüger-1/+1
Update browser-ui-test version to fix some flaky tests Part of #93784. It should fix the new spurious failure found in https://github.com/rust-lang/rust/pull/102744. r? ``@notriddle``
2022-10-14Rollup merge of #103039 - RalfJung:checktools, r=Dylan-DPCMatthias Krüger-1/+3
checktools: fix comments This bothers me each time I see it, time to fix it. ;) r? ```@Mark-Simulacrum```
2022-10-14Rollup merge of #102092 - kxxt:patch-1, r=joshtriplettMatthias Krüger-2/+8
refactor: use grep -E/-F instead of fgrep/egrep `egrep` and `fgrep` are obsolescent now. This PR updates all `egrep` and `fgrep` commands to `grep -E` and `grep -F`. Running egrep/fgrep command with grep v3.8 will output the following warning to stderr: ``` egrep: warning: egrep is obsolescent; using grep -E ``` - https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep - https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html
2022-10-14Also run alphabetical check in src and librarynils-6/+6
2022-10-14Add some tidy-alphabeticalnils-1/+2
2022-10-15remove no_core featureTakayuki Maeda-28/+12
2022-10-14Auto merge of #102783 - RalfJung:tls, r=thomccbors-2/+2
sync thread_local key conditions exactly with what the macro uses This makes the `cfg` in `mod.rs` syntactically the same as those in `local.rs`. I don't think this should actually change anything, but seems better to be consistent? I looked into this due to https://github.com/rust-lang/rust/issues/102549, but this PR would make it *less* likely that `__OsLocalKeyInner` is going to get provided, so this cannot help with that issue. r? `@thomcc`
2022-10-14Clean up rust-logo rustdoc GUI testGuillaume Gomez-70/+26
2022-10-14Rollup merge of #103031 - est31:match_guard_irrefutable_let, r=oli-obkDylan DPC-14/+23
Suppress irrefutable let patterns lint for prefixes in match guards In match guards, irrefutable prefixes might use the bindings created by the match pattern. Ideally, we check for this, but we can do the next best thing and just not lint for irrefutable prefixes in match guards. Fixes #98361