about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-10-20Rollup merge of #103297 - catandcoder:master, r=JohnTitorMatthias Krüger-1/+1
fix typo
2022-10-20Rollup merge of #103296 - GuillaumeGomez:collapse-expand-shortcuts, r=notriddleMatthias Krüger-29/+48
+/- shortcut now only expand/collapse, not both Fixes https://github.com/rust-lang/rust/issues/102772. r? ```@notriddle```
2022-10-20Rollup merge of #103281 - thomcc:long-overdue, r=jyn514Matthias Krüger-3/+3
Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output This is essentially a documentation-only change (although it does touch code in an irrelevant way).
2022-10-20Rollup merge of #103221 - TaKO8Ki:fix-103202, r=oli-obkMatthias Krüger-0/+16
Fix `SelfVisitor::is_self_ty` ICE Fixes #103202
2022-10-20Auto merge of #103290 - matthiaskrgr:rollup-ngozai3, r=matthiaskrgrbors-27/+173
Rollup of 6 pull requests Successful merges: - #103197 (Stabilize proc_macro::Span::source_text) - #103251 (Fix item declaration highlighting) - #103262 (Adjusting test to needs-unwind, with linking issue) - #103268 (rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`) - #103272 (Remove extra spaces in docs) - #103276 (Erase regions before checking for `Default` in uninitialized binding error) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-20Auto merge of #103185 - chenyukang:yukang/fix-span-next-point, r=davidtwcobors-2/+1
Fix the bug of next_point in source_map There is a bug in `next_point`, the new span won't move to next position when be called in the first time. For this reason, our current code is working like this: 1. When we really want to move to the next position, we called two times of `next_point` 2. Some code which use `next_point` actually done the same thing with `shrink_to_hi` This fix make sure when `next_point` is called, span will move with the width at least 1, and also work correctly in the scenario of multiple bytes. Ref: https://github.com/rust-lang/rust/pull/103140#discussion_r997710998 r? `@davidtwco`
2022-10-20fix typocui fliter-1/+1
2022-10-20Add GUI tests for collapse/expand actionsGuillaume Gomez-0/+18
2022-10-20+/- shortcut now only expand/collapse, not bothGuillaume Gomez-29/+30
2022-10-20Rollup merge of #103276 - compiler-errors:default-on-uninit-ice, r=TaKO8KiMatthias Krüger-0/+54
Erase regions before checking for `Default` in uninitialized binding error Fixes #103250
2022-10-20Rollup merge of #103268 - notriddle:notriddle/nav-sub-font-size, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }` This rule originated as a `font-size: 16px`, when body had `font-size: 13px` set in 4fd061c426902b0904c65e64a3780b21f9ab3afb. It remained even when body's font size was bumped up to 16px, 4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was carried forward when it was converted to 1rem in cc18120425a5c571a968d850c75cc935a8321136.
2022-10-20Rollup merge of #103262 - andrewpollack:switch-needs-unwind, r=tmandryMatthias Krüger-1/+1
Adjusting test to needs-unwind, with linking issue Test requires `needs-unwind` (see linked issue #103261)
2022-10-20Rollup merge of #103251 - GuillaumeGomez:item-decl-highlighting, r=notriddleMatthias Krüger-25/+118
Fix item declaration highlighting Fixes https://github.com/rust-lang/rust/issues/103050. As mentioned in the issue, https://github.com/rust-lang/rust/pull/102924 introduced this regression. This PR partially reverts it and adds a regression test. r? `@notriddle`
2022-10-20Auto merge of #103220 - compiler-errors:deny-infers, r=lcnrbors-22/+22
Deny hashing ty/re/ct inference variables cc `@cjgillot` and https://github.com/rust-lang/rust/pull/102695#issuecomment-1275706528 r? `@lcnr` best reviewed one commit at a time, mostly because the second commit that fixes `ClosureOutlivesRequirement` is mostly noise because of losing its `<'tcx>` lifetime parameter.
2022-10-19Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input ↵Thom Chiovoloni-3/+3
vs output
2022-10-20Auto merge of #103205 - spastorino:fix-rpits-lifetime-remapping, r=cjgillotbors-0/+23
Do anonymous lifetimes remapping correctly for nested rpits Closes #103141 r? `@cjgillot` `@nikomatsakis` This fixes a stable to stable regression that in my opinion is `P-critical` so, we probably want to backport it all the way up to stable.
2022-10-20Adjusting test to needs-unwind, with linking issueAndrew Pollack-1/+1
2022-10-20Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726bors-25/+65
Require lifetime bounds for opaque types in order to allow hidden types to capture said lifetimes fixes #96996 cc `@aliemjay`
2022-10-19Erase regions before checking for default in uninitialized binding errorMichael Goulet-0/+54
2022-10-19rustdoc: remove no-op CSS `nav.sub { font-size: 1rem }`Michael Howell-1/+0
This rule originated as a `font-size: 16px`, when body had `font-size: 13px` set in 4fd061c426902b0904c65e64a3780b21f9ab3afb. It remained even when body's font size was bumped up to 16px, 4d5f4ff5e9297dcad21612f9dd20ae4598b5b7e2, making the rule a no-op, and was carried forward when it was converted to 1rem in cc18120425a5c571a968d850c75cc935a8321136.
2022-10-19Do anonymous lifetimes remapping correctly for nested rpitsSantiago Pastorino-0/+23
2022-10-19Rollup merge of #103258 - SUPERCILEX:miri, r=RalfJungMatthias Krüger-11/+17
Make miri read_dir test a little more robust r? `@RalfJung`
2022-10-19Rollup merge of #103257 - notriddle:notriddle/setting-line, r=GuillaumeGomezMatthias Krüger-19/+19
rustdoc: move `setting-line` color CSS to settings.css
2022-10-19Rollup merge of #103246 - ferrocene:pa-rust-analyzer-hosts, r=Mark-SimulacrumMatthias Krüger-2/+2
Mark `rust-analyzer` as a host-only tool All tools meant to be shipped with host toolchains only should be marked as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS = false` incorrectly. This meant that bootstrap attempted to build rust-analyzer for cross-compilation-only targets, causing errors because libstd is not present on some of them. It will still be possible to cross-compile rust-analyzer by passing a different `--host` flag to `./x`, like you can cross-compile other tools. The problem can be reproduced by running: ``` ./x build src/tools/rust-analyzer --target x86_64-unknown-linux-gnu,aarch64-unknown-none ```
2022-10-19Rollup merge of #103239 - m-ou-se:unstable-abi-fn-impl-check, r=lcnrMatthias Krüger-5/+27
Allow #[unstable] impls for fn() with unstable abi. This allows `#[unstable]` trait impls for `extern "unwind-C" fn()`, based on the fact that that abi and therefore that type is unstable. See https://github.com/rust-lang/rust/pull/101263#issuecomment-1283099947
2022-10-19Rollup merge of #103237 - GuillaumeGomez:codeblock-tooltip-cleanup, r=notriddleMatthias Krüger-93/+77
Clean up codeblock-tooltip rustdoc-gui test r? ``@notriddle``
2022-10-19Rollup merge of #103223 - compiler-errors:deref-sugg-slow, r=wesleywiserMatthias Krüger-0/+213
Use already checked RHS ty for LHS deref suggestions There's no reason to do the `check_lhs_assignable` and RHS `check_expr_with_hint` in that order, so invert them and use the typeck results to avoid exponential blowup on error. Fixes #103219
2022-10-19Rollup merge of #103211 - notriddle:notriddle/dot-location, r=GuillaumeGomezMatthias Krüger-38/+39
rustdoc: remove class name `location` from sidebar sibling nav Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-location/std/vec/struct.Vec.html This change tweaks the CSS to apply most of its styles to `.sidebar h2`, cleaning up a few redundant rules from `.mobile-topbar .location` and restoring useful navigation aids in mobile mode. ## Before ![location-before](https://user-images.githubusercontent.com/1593513/196521014-d8730830-c3a2-4ed7-9266-05454cd31e05.png) ## After ![location-after](https://user-images.githubusercontent.com/1593513/196521020-75ec1fa5-b3dc-4c5d-97b6-afccb5fbe00a.png)
2022-10-19Add regression test for item-decl highlightingGuillaume Gomez-5/+98
2022-10-19Make miri read_dir test a little more robustAlex Saveau-11/+17
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
2022-10-19Make ClosureOutlivesRequirement not rely on an unresolved typeMichael Goulet-22/+22
2022-10-19rustdoc: move `setting-line` color CSS to settings.cssMichael Howell-19/+19
2022-10-19Fix regression in item-decl highlightingGuillaume Gomez-20/+20
2022-10-19Add testcase for next_point, fix more trivial issues in ↵yukang-2/+1
find_width_of_character_at_span
2022-10-19mark rust-analyzer as a host-only toolPietro Albini-2/+2
All tools meant to be shipped with host toolchains only should be marked as `ONLY_HOSTS = true`, but rust-analyzer was marked as `ONLY_HOSTS = false` incorrectly. This meant that bootstrap attempted to build rust-analyzer for cross-compilation-only targets, causing errors because libstd is not present on some of them. It will still be possible to cross-compile rust-analyzer by passing a different --host flag to ./x, like you can cross-compile other tools.
2022-10-19Allow #[unstable] impl for fn() -> UnstableType.Mara Bos-0/+3
(But not fn() -> !, which is stable.)
2022-10-19Add test for #[unstable] impl for fn() -> !.Mara Bos-1/+13
2022-10-19Auto merge of #103228 - Dylan-DPC:rollup-31yiauw, r=Dylan-DPCbors-44/+135
Rollup of 6 pull requests Successful merges: - #102863 (Standardize "use parentheses to call" suggestions between typeck and trait selection) - #103034 (Let expressions on RHS shouldn't be terminating scopes) - #103127 (Make transpose const and inline) - #103153 (Allow `Vec::leak` when using `no_global_oom_handling`) - #103182 (Clean up query descriptions) - #103216 (Consider patterns in fn params in an `Elided(Infer)` lifetime rib.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-19Add test.Mara Bos-4/+11
2022-10-19Clean up codeblock-tooltip rustdoc-gui testGuillaume Gomez-92/+76
2022-10-19Update browser-ui-test version to 0.12.7Guillaume Gomez-1/+1
2022-10-19Rollup merge of #103216 - cjgillot:issue-103210, r=jackh726Dylan DPC-0/+11
Consider patterns in fn params in an `Elided(Infer)` lifetime rib. Fixes https://github.com/rust-lang/rust/issues/103210
2022-10-19Rollup merge of #103182 - Nilstrieb:query-desc-cleanup, r=oli-obkDylan DPC-12/+12
Clean up query descriptions Use the same tense everywhere and prefer display over debug, as these descriptions are user facing.
2022-10-19Rollup merge of #103034 - nathanwhit:let-chains-rhs-temporaries, r=wesleywiserDylan DPC-6/+18
Let expressions on RHS shouldn't be terminating scopes Fixes #100276. Before this PR, we were unconditionally marking the RHS of short-circuiting binary expressions as a terminating scope. In the case of a let chain where the `let` expression was on the RHS, this meant that temporaries within the `let` expr would only live until the end of the expression. Since this only affected the RHS, this led to surprising behavior ([example](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d1b0a5d1f01882f9c89c2194a75eb19f)). After this PR, we only mark the RHS as a terminating scope if it is not a `let` expression.
2022-10-19Rollup merge of #102863 - compiler-errors:call-suggestion-on-unimplemented, ↵Dylan DPC-26/+94
r=nagisa Standardize "use parentheses to call" suggestions between typeck and trait selection 1. Suggest calling constructors, since they're basically `FnDef`s but they have a different def kind and hir representation, so we were leaving them out. 2. Standardize the call suggestions between trait fulfillment errors and type mismatch. In the type mismatch suggestion, we suggest `/* Ty */` as the placeholder for an arg, and not the parameter's name, which is less helpful. 3. Use `predicate_must_hold_modulo_regions` instead of matching on `EvaluationResult` -- this might cause some suggestions to be filtered out, but we really shouldn't be suggesting a call if it "may" hold, only when it "must" hold. 4. Borrow some logic from `extract_callable_info` to generalize this suggestion to fn pointers, type parameters, and opaque types. Fixes #102852
2022-10-19Auto merge of #103180 - ferrocene:pa-qemu-user-mode, r=Mark-Simulacrumbors-4/+18
Handle core dumps output in QEMU user mode In addition to the whole-system emulation/virtualization, QEMU also supports user-mode emulation, where the emulation happens as a normal process inside the parent system. This allows running most tests by simply spawning remote-test-server inside user-mode emulation. Unfortunately, QEMU always writes its own message in addition to the system one when a core dump happens, which breaks a few tests which match on the exact output of the system. This PR changes those tests to strip the (possible) QEMU output before checking if the output is expected.
2022-10-19Auto merge of #103225 - matthiaskrgr:rollup-1zkv87y, r=matthiaskrgrbors-5/+56
Rollup of 4 pull requests Successful merges: - #103166 (Optimize `slice_iter.copied().next_chunk()`) - #103176 (Fix `TyKind::is_simple_path`) - #103178 (Partially fix `src/test/run-make/coverage-reports` when cross-compiling) - #103198 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-19Rollup merge of #103198 - weihanglo:update-cargo, r=ehussMatthias Krüger-0/+0
Update cargo 6 commits in b332991a57c9d055f1864de1eed93e2178d49440..3ff044334f0567ce1481c78603aeee7211b91623 2022-10-13 22:05:28 +0000 to 2022-10-17 20:25:00 +0000 - Some tiny refactors around `ops::cargo_compile` (rust-lang/cargo#11243) - Polish docs for module `build_context` (rust-lang/cargo#11241) - Remove sparse+ prefix for index.crates.io (rust-lang/cargo#11247) - docs(add): Add missing flags to reference (rust-lang/cargo#11240) - Document `cargo remove` (rust-lang/cargo#11227) - fix: Update help headings to match clap (rust-lang/cargo#11239)
2022-10-19Rollup merge of #103178 - ferrocene:pa-coverage-reports-tests, r=Mark-SimulacrumMatthias Krüger-2/+7
Partially fix `src/test/run-make/coverage-reports` when cross-compiling The test does not work on cross-compiled targets because the --target flag was not passed to rustc inside the test. This commit fixes that by adding the flag to the invocations. Note that the test still fails on cross-compiled targets using remote-test, as remote-test is not capable (yet) of sending back to the host system the `*.profraw` file generated by the instrumentation. Because of that, this is only a partial fix, and the test has been ignored on cross-compilation.
2022-10-19Rollup merge of #103176 - nnethercote:fix-TyKind-is_simple_path, r=spastorinoMatthias Krüger-3/+49
Fix `TyKind::is_simple_path` Fixes #103157. r? `@spastorino`