about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-12-28Allow trait method paths to satisfy const Fn boundsDeadbeef-0/+61
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-27Trim more paths in obligation typesEsteban Küber-7/+7
2022-12-27Emit fewer errors on invalid `#[repr(transparent)]` on `enum`Esteban Küber-0/+21
Fix #68420.
2022-12-27Silence knock-down errors on `[type error]` bindingsEsteban Küber-134/+70
Fix #56036, fix #76589.
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-27Shorten type in noteEsteban Küber-3/+3
2022-12-27rustdoc: combine common sidebar background color CSS rulesMichael Howell-1/+90
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-27More testsMichael Goulet-0/+34
2022-12-27Restore cyclic closure messageMichael Goulet-16/+16
2022-12-27Don't deduce a signature that makes a closure cyclicMichael Goulet-16/+91
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-27Fix ui constant tests for big-endian platformsUlrich Weigand-1130/+1716
A number of tests under ui/const-ptr and ui/consts are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the stderr test files. Fix this by providing a normalize-stderr-test rule that strips out the raw bytes hex dump, so the comparison can be done in an endianness-independent manner. Note that in most cases, this means the tests are now also independent of word size, so the 32bit and 64bit cases can be re-unified. To keep tests that verify the details of those raw bytes dumps, a new test case raw-bytes.rs performs the tests where the hex dumps were stripped out a second time, but only on little- endian platforms. In addition, src/test/ui/const-ptr/forbidden_slices.rs exposes an endian-specific difference in this diagnostic output: constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean depending on which byte of D0 is not a boolean value (0 or 1). Fixed this by choosing a value of D0 that differs from 0 or 1 in all bytes. Fixes part of https://github.com/rust-lang/rust/issues/105383.
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 some totally useless suggestionsMichael Goulet-12/+2
2022-12-27Dont clobber `as ..` rename in import suggestionMichael Goulet-2/+43
2022-12-27Recover `fn` keyword as `Fn` trait in boundsMichael Goulet-74/+90
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-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-26Suggest `impl Iterator` when possible for `_` return typeEsteban Küber-1/+30
Address #106096.
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`