about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-12-28Rollup merge of #106201 - estebank:verbose-transparent, r=compiler-errorsfee1-dead-0/+21
Emit fewer errors on invalid `#[repr(transparent)]` on `enum` Fix #68420.
2022-12-28Rollup merge of #105484 - nbdd0121:upcast, r=compiler-errorsfee1-dead-0/+93
Implement allow-by-default `multiple_supertrait_upcastable` lint The lint detects when an object-safe trait has multiple supertraits. Enabled in libcore and liballoc as they are low-level enough that many embedded programs will use them. r? `@nikomatsakis`
2022-12-28Rollup merge of #105347 - estebank:single-line-match, r=compiler-errorsfee1-dead-0/+15
Account for `match` expr in single line When encountering `match Some(42) { Some(x) => x, None => "" };`, output ``` error[E0308]: `match` arms have incompatible types --> f53.rs:2:52 | 2 | let _ = match Some(42) { Some(x) => x, None => "" }; | -------------- - ^^ expected integer, found `&str` | | | | | this is found to be of type `{integer}` | `match` arms have incompatible types ```
2022-12-28Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errorsfee1-dead-1/+1
Fix `unused_must_use` warning for `Box::from_raw`
2022-12-27Emit fewer errors on invalid `#[repr(transparent)]` on `enum`Esteban Küber-0/+21
Fix #68420.
2022-12-27Account for `match` expr in single lineEsteban Küber-0/+15
When encountering `match Some(42) { Some(x) => x, None => "" };`, output ``` error[E0308]: `match` arms have incompatible types --> f53.rs:2:52 | 2 | let _ = match Some(42) { Some(x) => x, None => "" }; | -------------- - ^^ expected integer, found `&str` | | | | | this is found to be of type `{integer}` | `match` arms have incompatible types ```
2022-12-27Auto merge of #106193 - compiler-errors:rollup-0l54wka, r=compiler-errorsbors-8/+524
Rollup of 9 pull requests Successful merges: - #103718 (More inference-friendly API for lazy) - #105765 (Detect likely `.` -> `..` typo in method calls) - #105852 (Suggest rewriting a malformed hex literal if we expect a float) - #105965 (Provide local extern function arg names) - #106064 (Partially fix `explicit_outlives_requirements` lint in macros) - #106179 (Fix a formatting error in Iterator::for_each docs) - #106181 (Fix doc comment parsing description in book) - #106187 (Update the documentation of `Vec` to use `extend(array)` instead of `extend(array.iter().copied())`) - #106189 (Fix UnsafeCell Documentation Spelling Error) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-27Rollup merge of #106064 - lukas-code:outlives-macro, r=cjgillotMichael Goulet-8/+350
Partially fix `explicit_outlives_requirements` lint in macros Show the suggestion if and only if the bounds are from the same source context. fixes https://github.com/rust-lang/rust/issues/106044 fixes https://github.com/rust-lang/rust/issues/106063
2022-12-27Rollup merge of #105965 - compiler-errors:issue-105896, r=cjgillotMichael Goulet-0/+35
Provide local extern function arg names Fixes #105896
2022-12-27Rollup merge of #105852 - compiler-errors:hex-float-lit, r=cjgillotMichael Goulet-0/+61
Suggest rewriting a malformed hex literal if we expect a float Fixes #104706
2022-12-27Rollup merge of #105765 - estebank:range-typo, r=compiler-errorsMichael Goulet-0/+78
Detect likely `.` -> `..` typo in method calls Fix #65015.
2022-12-27Make resolve suggestion more genericEsteban Küber-1/+1
2022-12-27Auto merge of #97176 - kraktus:cmd_debug, r=the8472bors-21/+0
More verbose `Debug` implementation of `std::process:Command` Mainly based on commit: https://github.com/zackmdavis/rust/commit/ccc019aabfdd550944c049625e66c92c815ea1d0 from https://github.com/zackmdavis close https://github.com/rust-lang/rust/issues/42200
2022-12-27review comments: make suggestion more accurateEsteban Küber-20/+31
2022-12-27Provide local extern function arg namesMichael Goulet-0/+35
2022-12-27Suggest rewriting a malformed hex literal if we expect a floatMichael Goulet-0/+61
2022-12-27Rollup merge of #106066 - JohnTitor:rm-bindings-after-at-fixme, ↵Matthias Krüger-23/+75
r=compiler-errors Always suggest as `MachineApplicable` in `recover_intersection_pat` This resolves one FIXME in `recover_intersection_pat` by always applying `MachineApplicable` when suggesting, as `bindings_after_at` is now stable. This also separates a test to apply `// run-rustfix`. Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-27Rollup merge of #105994 - JohnTitor:issue-99647, r=compiler-errorsMatthias Krüger-0/+15
Add regression test for #99647 Closes #99647 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-27Rollup merge of #105817 - chenyukang:yukang/fix-105788-sugg-for-auto-trait, ↵Matthias Krüger-14/+5
r=TaKO8Ki Remove unreasonable help message for auto trait Fixes #105788
2022-12-27Auto merge of #106177 - matthiaskrgr:rollup-oe7z8ix, r=matthiaskrgrbors-0/+100
Rollup of 4 pull requests Successful merges: - #105515 (Account for macros in const generics) - #106146 (Readme: update section on how to run `x.py`) - #106150 (Detect when method call on LHS might be shadowed) - #106174 (Remove unused empty CSS rules in ayu theme) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-27More verbose `Debug` implementation of `std::process:Command`kraktus-21/+0
based on commit: https://github.com/zackmdavis/rust/commit/ccc019aabfdd550944c049625e66c92c815ea1d0 from https://github.com/zackmdavis close https://github.com/rust-lang/rust/issues/42200 Add env variables and cwd to the shell-like debug output. Also use the alternate syntax to display a more verbose display, while not showing internal fields and hiding fields when they have their default value.
2022-12-27Rollup merge of #106150 - estebank:issue-39232, r=compiler-errorsMatthias Krüger-0/+94
Detect when method call on LHS might be shadowed Address #39232.
2022-12-27Rollup merge of #105515 - estebank:issue-104141, r=oli-obkMatthias Krüger-0/+6
Account for macros in const generics Fix #104141.
2022-12-27Auto merge of #106095 - estebank:pin-mut-reborrow, r=compiler-errorsbors-13/+146
Suggest `Pin::as_mut` when encountering borrow error Fix #65409 for `Pin<&mut T>`.
2022-12-27fix #105788, Remove unreasonable help message for auto traityukang-14/+5
2022-12-26Detect likely `.` -> `..` typo in method callsEsteban Küber-0/+67
Fix #65015.
2022-12-26Auto merge of #103020 - lyming2007:issue-102598-fix, r=jackh726bors-0/+51
error parsing lifetime following by Sized and message + between them Fixes #102598
2022-12-26Fix suggestion when there are arguments in the methodEsteban Küber-0/+48
2022-12-26Tweak wordingEsteban Küber-2/+5
2022-12-26Detect when method call on LHS might be shadowedEsteban Küber-0/+43
Address #39232.
2022-12-27Rollup merge of #106153 - GuillaumeGomez:search-tabs-headers, r=notriddlefee1-dead-0/+76
Fix missing renaming for #titles into #search-tabs We forgot to update this selector in the themes in https://github.com/rust-lang/rust/pull/106069. r? `@notriddle`
2022-12-26address review comments + better testsLukas Markeffsky-43/+322
2022-12-26Add GUI test for search tab headersGuillaume Gomez-0/+76
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-25Remove redundant clone suggestionEsteban Küber-24/+0
2022-12-25Create new inference contextEsteban Küber-1/+61
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-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-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-4/+40
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-24Rollup merge of #106109 - notriddle:notriddle/source-lines, r=GuillaumeGomezMatthias Krüger-14/+44
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 #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