about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-12-27Fix some totally useless suggestionsMichael Goulet-12/+2
2022-12-27Dont clobber `as ..` rename in import suggestionMichael Goulet-2/+43
2022-12-27Note alternative import candidates in nested use treeMichael Goulet-4/+38
2022-12-27Suppress suggestions for nested use treeMichael Goulet-0/+23
2022-12-26Auto merge of #106149 - notriddle:notriddle/src-sidebar-toggle-pos, ↵bors-10/+4
r=GuillaumeGomez rustdoc: clean up src sidebar toggle position CSS This PR makes the `464px` version of `#src-sidebar-toggle` the same as the `700px` version, with the button lower on the page so that it doesn't cover up the search form, and removes the left margin to make space for it. ## Before ![image](https://user-images.githubusercontent.com/1593513/209507474-0463e4b2-0bd4-497b-958c-ec4fdbb524fb.png) ## After ![image](https://user-images.githubusercontent.com/1593513/209507499-a32c1728-d4c9-46d9-821d-ba6f8d4d94d4.png)
2022-12-26Auto merge of #103828 - cassaundra:fix-format-args-span2, r=cjgillotbors-0/+28
Fix incorrect span when using byte-escaped rbrace Fix #103826, a format args span issue introduced in #102214. The current solution for tracking skipped characters made it so that certain situations were ambiguous enough that the original span couldn't be worked out later. This PR improves on the original solution by keeping track of groups of skipped characters using a map, and fixes the previous bug. See an example of this ambiguity in the [previous PR's discussion](https://github.com/rust-lang/rust/pull/102214#issuecomment-1258711015).
2022-12-26Auto merge of #105605 - inquisitivecrystal:attr-validation, r=cjgillotbors-0/+39
Don't perform invalid checks in `codegen_attrs` The attributes `#[track_caller]` and `#[cmse_nonsecure_entry]` are only valid on functions. When validating one of these attributes, codegen_attrs previously called `fn_sig`, [which can only be used on functions](https://github.com/rust-lang/rust/pull/105201), on the item the attribute was attached to, assuming that the item was a function without checking. This led to [ICEs in situations where the attribute was incorrectly used on non-functions](https://github.com/rust-lang/rust/issues/105594). With this change, we skip calling `fn_sig` if the item the attribute is attached to must be a function but isn't, because `check_attr` will reject such cases without codegen_attrs's intervention. As a side note, some of the attributes in codegen_attrs are only valid on functions, but that property isn't actually checked. I'm planning to fix that in a follow up PR since it's a behavior change that will need to be validated rather than an obvious bugfix. Thankfully, all the attributes like that I've found so far are unstable. Fixes #105594. r? `@cjgillot`
2022-12-25rustdoc: clean up src sidebar toggle position CSSMichael Howell-10/+4
This PR makes the `464px` version of `#src-sidebar-toggle` the same as the `700px` version, with the button lower on the page so that it doesn't cover up the search form, and removes the left margin to make space for it.
2022-12-25Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgrbors-74/+87
Rollup of 4 pull requests Successful merges: - #105375 (Fix an outdated comment mentioning parameter that doesn't exist anymore) - #105955 (Remove wrapper functions for some unstable options) - #106137 (fix more clippy::style findings) - #106140 (Migrate links-color.goml to functions) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-25Rollup merge of #106140 - GuillaumeGomez:migrate-links-color, r=notriddleMatthias Krüger-74/+87
Migrate links-color.goml to functions r? `@notriddle`
2022-12-25Auto merge of #105997 - RalfJung:immediate-abort, r=eholkbors-26/+46
abort immediately on bad mem::zeroed/uninit Now that we have non-unwinding panics, let's use them for these assertions. This re-establishes the property that `mem::uninitialized` and `mem::zeroed` will never unwind -- the earlier approach of causing panics here sometimes led to hard-to-debug segfaults when the surrounding code was not able to cope with the unexpected unwinding. Cc `@bjorn3` I did not touch cranelift but I assume it needs a similar patch. However it has a `codegen_panic` abstraction that I did not want to touch since I didn't know how else it is used.
2022-12-25Migrate links-color.goml to functionsGuillaume Gomez-74/+87
2022-12-25Auto merge of #106121 - RalfJung:miri, r=RalfJungbors-608/+1526
update Miri Noteworthy PRs: - https://github.com/rust-lang/miri/pull/2357 - https://github.com/rust-lang/miri/pull/2646 - https://github.com/rust-lang/miri/pull/2718 - https://github.com/rust-lang/miri/pull/2721 - https://github.com/rust-lang/miri/pull/2725
2022-12-25fix codegen testRalf Jung-8/+8
2022-12-25Auto merge of #105701 - RedDocMD:bug-105634, r=cjgillotbors-0/+8
Allow .. to be parsed as let initializer .. and ..= are valid expressions, however when used in a let statement it is not parsed. Fixes #105634
2022-12-25enable some warnings that rustc bootstrap enablesRalf Jung-4/+4
2022-12-25use cargo-install to install josh-proxyRalf Jung-4/+4
2022-12-25Auto merge of #106132 - kadiwa4:typos, r=compiler-errorsbors-4/+4
Fix some typos
2022-12-25fix some typosKaDiWa-4/+4
2022-12-24Auto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddlebors-22/+51
Migrate toggle-line-inner background to CSS variable r? `@notriddle`
2022-12-24Auto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJungbors-0/+413
Stop promoting all the things fixes #91009 r? `@RalfJung`
2022-12-24fix warningsRalf Jung-3/+3
2022-12-24Merge from rustcRalf Jung-1535/+5909
2022-12-24Preparing for merge from rustcRalf Jung-1/+1
2022-12-24Auto merge of #2646 - saethlin:data-race-spans, r=RalfJungbors-273/+555
Data race spans Fixes https://github.com/rust-lang/miri/issues/2205 This adds output to data race errors very similar to the spans we emit for Stacked Borrows errors. For example, from our test suite: ``` help: The Atomic Load on thread `<unnamed>` is here --> tests/fail/data_race/atomic_read_na_write_race1.rs:23:13 | 23 | ... (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write o... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: The Write on thread `<unnamed>` is here --> tests/fail/data_race/atomic_read_na_write_race1.rs:19:13 | 19 | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^``` ``` Because of https://github.com/rust-lang/miri/pull/2647 this comes without a perf regression, according to our benchmarks.
2022-12-24Rollup merge of #106109 - notriddle:notriddle/source-lines, r=GuillaumeGomezMatthias Krüger-39/+54
rustdoc: make line number CSS for doc comment and scraped the same ![image](https://user-images.githubusercontent.com/1593513/209423540-2657bb43-e6d7-4af3-9cb3-c790a8dd8cd9.png) Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling Preview: http://notriddle.com/notriddle-rustdoc-demos/source-lines/test_dingus/fn.test.html
2022-12-24Rollup merge of #106100 - scottmcm:derived-less-than-test, r=compiler-errorsMatthias Krüger-0/+49
Codegen test for derived `<` on trivial newtype [TEST ONLY] I originally wrote this for #106065, but the libcore changes there aren't necessarily a win. So I pulled out this test to be its own PR since it's important (see https://github.com/rust-lang/rust/pull/105840#discussion_r1056030324) and well-intentioned changes to core or the derive could accidentally break it without that being obvious (other than by massive unexplained perf changes).
2022-12-24Rollup merge of #106078 - nikic:filecheck-context, r=Mark-SimulacrumMatthias Krüger-0/+2
Provide more context on FileCheck failures FileCheck provides 5 lines of context by default. This is often insufficient to analyze failures that happen in CI. Increase the amount of context to 100 lines.
2022-12-24Rollup merge of #105872 - chenyukang:yukang/fix-105494-remove-method-call, ↵Matthias Krüger-0/+76
r=eholk Suggest remove last method call when type coerce with expected type Fixes #105494
2022-12-24Rollup merge of #105465 - jyn514:docs, r=Mark-SimulacrumMatthias Krüger-12/+3
Improve top-level docs See a detailed explanation in the commit messages. This is a companion PR to https://github.com/rust-lang/rustc-dev-guide/pull/1528. * Link to other resources instead of inlining their information * Remove ancient and outdated reference to `config.mk` * Suggest `profile = "user"` in the README * Add detail about dependencies from the dev-guide * Link to CONTRIBUTING.md instead of rustc-dev-guide in the main readme * Link to `std-dev-guide` in CONTRIBUTING.md
2022-12-24ignore some targetsRalf Jung-0/+2
2022-12-24Extend GUI test for toggle-line backgroundGuillaume Gomez-4/+40
2022-12-24Migrate toggle-line-inner background to CSS variableGuillaume Gomez-18/+11
2022-12-23rustdoc: make line number CSS for doc comment and scraped the sameMichael Howell-39/+54
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling
2022-12-24Auto merge of #105893 - Ayush1325:remote-test-server-improve, r=Mark-Simulacrumbors-12/+8
Use u32 methods instead of manual shifting Switch to `to_le_bytes()` and `from_le_bytes()` instead of manual shifting This was suggested [`here`](https://github.com/rust-lang/rust/pull/105145#discussion_r1051418964) Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2022-12-24Auto merge of #106103 - matthiaskrgr:rollup-8xe9ddz, r=matthiaskrgrbors-69/+114
Rollup of 7 pull requests Successful merges: - #105970 (docs/test: add UI test and long-form error docs for E0462) - #105975 (rustc: Remove needless lifetimes) - #106069 (rustdoc: use a more evocative name for CSS/JS `#titles`) - #106084 (fix vec::IntoIter::drop on high-alignment ZST) - #106091 (Use correct CSS pseudo-element selector) - #106093 (rustdoc: remove no-op CSS from `.docblock-short`) - #106102 (Fix `triagebot.toml`) Failed merges: - #106028 (docs/test: add UI test and long-form error docs for `E0461`) r? `@ghost` `@rustbot` modify labels: rollup
2022-12-23Remove ancient and outdated references to `config.mk`Joshua Nelson-12/+3
2022-12-24Rollup merge of #106093 - notriddle:notriddle/docblock-short-overflow, ↵Matthias Krüger-2/+0
r=GuillaumeGomez rustdoc: remove no-op CSS from `.docblock-short` The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead. These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
2022-12-24Rollup merge of #106091 - GuillaumeGomez:correct-css-pseudo-element, r=notriddleMatthias Krüger-6/+6
Use correct CSS pseudo-element selector Pseudo-element should use "::" to not be confused with pseudo selectors (nice explanation here: https://css-tricks.com/to-double-colon-or-not-do-double-colon/). r? ``@notriddle``
2022-12-24Rollup merge of #106084 - RalfJung:into-iter, r=thomccMatthias Krüger-7/+26
fix vec::IntoIter::drop on high-alignment ZST This fixes a soundness bug: IntoIter would call `drop_in_place` on an insufficiently aligned pointer. So if a ZST with alignment greater 1 had drop glue, that would be called with an unaligned reference. Since https://github.com/rust-lang/rust/pull/103957, Miri checks alignment even if the type does not have drop glue, which is how this bug was found. r? ``@thomcc``
2022-12-24Rollup merge of #106069 - notriddle:notriddle/search-tabs, r=GuillaumeGomezMatthias Krüger-52/+52
rustdoc: use a more evocative name for CSS/JS `#titles` This renames the ID, which is only used in search results, to `#search-tabs`. Also changes the `.count` to a span, so it doesn't need its display mode to be overridden.
2022-12-24Rollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomezMatthias Krüger-2/+30
docs/test: add UI test and long-form error docs for E0462 Another UI test/ docs combo. r? ``@GuillaumeGomez``
2022-12-23Codegen test for derived `<` on trivial newtype [TEST ONLY]Scott McMurray-0/+49
2022-12-23Auto merge of #106088 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000 - fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478) - Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503) - Don't scrape examples from library targets by default (rust-lang/cargo#11499) - Stabilize terminal-width (rust-lang/cargo#11494) - Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501) - Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477) - Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473) r? `@ghost`
2022-12-23rustdoc: remove no-op CSS from `.docblock-short`Michael Howell-2/+0
The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead. These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.
2022-12-23Mention and number the components of a race in the order the interpreter ↵Ben Kimock-113/+113
sees them
2022-12-23Use correct CSS pseudo-element selectorGuillaume Gomez-6/+6
2022-12-23Update cargoWeihang Lo-0/+0
7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000 - fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478) - Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503) - Don't scrape examples from library targets by default (rust-lang/cargo#11499) - Stabilize terminal-width (rust-lang/cargo#11494) - Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501) - Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477) - Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)
2022-12-23Rollup merge of #106055 - compiler-errors:too-many-calls, r=estebanknils-0/+95
Check arg expressions properly on error in `confirm_builtin_call` Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: https://github.com/rust-lang/rust/pull/105973#issuecomment-1363152232 Fixes #106030 Fixes #105244
2022-12-23Rollup merge of #106048 - fee1-dead-contrib:tidy-ci-continuation, r=jyn514nils-2/+45
Run `tidy` in its own job in PR CI This duplicates mingw-check into two jobs where one job runs `tidy` only while the other job does not. The tidy job will not cancel other jobs on failure.