about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-10-17Rollup merge of #103162 - notriddle:notriddle/crate-search, r=GuillaumeGomezMatthias Krüger-4/+0
rustdoc: remove redundant CSS `#crate-search { border-radius }` This is the same border-radius that's always set on that ID: https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
2022-10-17Rollup merge of #103161 - ↵Matthias Krüger-12/+8
notriddle:notriddle/copy-path-settings-help-button, r=GuillaumeGomez rustdoc: remove redundant CSS on `#copy-path` The border and background were removed in 5d004c1e2020eaa9bc336f09b6b0475c0eef4d78, but not all the CSS was.
2022-10-17Rollup merge of #103160 - notriddle:notriddle/js-mobile-scroll, r=GuillaumeGomezMatthias Krüger-41/+28
rustdoc: factor JS mobile scroll lock into its own function https://github.com/rust-lang/rust/pull/98775#issuecomment-1172728308
2022-10-17Rollup merge of #103152 - GuillaumeGomez:named-arguments, r=notriddleMatthias Krüger-28/+28
Use named arguments to make GUI test more clear As you suggested `@notriddle.` The result looks like this. r? `@notriddle`
2022-10-17rustdoc: remove redundant CSS `#crate-search { border-radius }`Michael Howell-4/+0
This is the same border-radius that's always set on that ID: https://github.com/rust-lang/rust/blob/a9d1cafa878ecc04a4aa7aaa7df0414a29a2bd0b/src/librustdoc/html/static/css/rustdoc.css#L825-L836
2022-10-17rustdoc: remove redundant CSS on `#copy-path`Michael Howell-12/+8
The border and background were removed in 5d004c1e2020eaa9bc336f09b6b0475c0eef4d78, but not all the CSS was.
2022-10-17rustdoc: factor JS mobile scroll lock into its own functionMichael Howell-41/+28
https://github.com/rust-lang/rust/pull/98775#issuecomment-1172728308
2022-10-17Use named arguments to make test clearerGuillaume Gomez-27/+27
2022-10-17Update browser-ui-test version to 0.12.6Guillaume Gomez-1/+1
2022-10-17Rollup merge of #103091 - notriddle:notriddle/sidebar-title, r=GuillaumeGomezMatthias Krüger-30/+24
rustdoc: remove unused HTML class `sidebar-title` Since 6a5f8b1aef1417d7dc85b5d0a229d2db1930eb7c, this class is no longer styled.
2022-10-17Rollup merge of #102945 - compiler-errors:placeholder-region-outlives, r=lcnrMatthias Krüger-0/+61
Do not register placeholder `RegionOutlives` obligations when `considering_regions` is false **NOTE:** I'm kinda just putting this up for discussion. I'm not certain this is correct...? This was introduced in [`608625d`](https://github.com/rust-lang/rust/commit/608625dae95cde00e4570eb6c2d63b2244bbf34c#diff-6e54b18681342ec725d75591dbf384ad08cd73df29db00485fe51b4e90f76ff7R361). Interestingly, we only check `data.has_placeholders()` for `RegionOutlives`, and not for `TypeOutlives`... why? For the record, that different treatment between `RegionOutlives` and `TypeOutlives` is why the fix "The compiling succeeds when all `'a : 'b` are replaced with `&'a () : 'b`" in #100689 _"works"_, but it seems like an implementation detail considering this. Also, why do we care about placeholder regions being registered if `considering_regions` is false? It doesn't seem to affect any UI tests, for example. r? `@lcnr` Fixes #102899 Fixes #100689
2022-10-17Rollup merge of #102454 - chenyukang:fix-102396-missing-parentheses, r=lcnrMatthias Krüger-10/+267
Suggest parentheses for possible range method calling Fixes #102396
2022-10-17Auto merge of #9637 - Alexendoo:unused-format-specs, r=xFrednetbors-0/+25
Add `unused_format_specs` lint Currently catches two cases: An empty precision specifier: ```rust // the same as {} println!("{:.}", x); ``` And using formatting specs on `format_args!()`: ```rust // prints `x.`, not `x .` println("{:5}.", format_args!("x")); ``` changelog: new lint: [`unused_format_specs`]
2022-10-17Add `unused_format_specs` lintAlex Macleod-0/+25
2022-10-17Rollup merge of #103129 - notriddle:notriddle/sub-logo-container, ↵Matthias Krüger-16/+8
r=GuillaumeGomez rustdoc: remove unused `.sub-logo-container` DOM on non-source pages
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-17Make diagnostic for unsatisfied Termination bounds more preciseLeón Orell Valerian Liehr-3/+63
2022-10-17macros: allow subdiagnostic-kind-less variantsDavid Wood-50/+43
Sometimes it is convenient to return a subdiagnostic enum where one or more of the variants don't add anything to the diagnostic. Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17macros: support doc comments in diag derivesDavid Wood-0/+30
Documentation comments shouldn't affect the diagnostic derive in any way, but explicit support has to be added for ignoring the `doc` attribute. Signed-off-by: David Wood <david.wood@huawei.com>
2022-10-17`order_dependent_trait_objects` to `ReportNow`lcnr-0/+112
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-16rustdoc: clean up `.sub-logo-container` CSSMichael Howell-13/+3
* Since it's used exclusively on source pages, no need to explicitly select. * No need to hide it when the sidebar is open, since it fills the whole page.
2022-10-16rustdoc: remove unused `.sub-logo-container` DOM on non-source pagesMichael Howell-3/+5
2022-10-17trivial fix for comments feedbackyukang-10/+10
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-16Don't consider `Let` exprs terminating scopesNathan Whitaker-6/+18
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-17Add tests for autoderef on block tailbogon-right-0/+149
2022-10-16Support DirEntry metadata calls in miriAlex Saveau-0/+8
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
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-16fix caching check in CIRalf Jung-2/+2
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-16remove redundant Send impls for referencesRalf Jung-1/+1
also move them next to the trait they are implementing
2022-10-16fix a doctestTennyZhuang-6/+6
Signed-off-by: TennyZhuang <zty0826@gmail.com>
2022-10-16Point to shadowed name when it exists.Camille GILLOT-4/+11
2022-10-16Account for hygiene when suggesting typos.Camille GILLOT-14/+22
2022-10-16Add new lint `partial_pub_fields`TennyZhuang-0/+28
Signed-off-by: TennyZhuang <zty0826@gmail.com>
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