about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-12-15Point at method chains on `E0271` errorsEsteban Küber-0/+19
2022-12-15rustdoc: simplify CSS for codeblock tooltipsMichael Howell-3/+3
Instead of making its parts `display: none` and then changing it on hover, just make the pseudo-element itself on hover.
2022-12-15Suggest `#[derive(Clone)]`Esteban Küber-1/+38
2022-12-15Suggest constraining type parameter with `Clone`Esteban Küber-0/+41
Fix #34896.
2022-12-15Auto merge of #104616 - RalfJung:ctfe-alignment, r=oli-obk,RalfJungbors-220/+271
always check alignment during CTFE We originally disabled alignment checks because they got in the way -- there are some things we do with the interpreter during CTFE which does not correspond to actually running user-written code, but is purely administrative, and we didn't want alignment checks there, so we just disabled them entirely. But with `-Zextra-const-ub-checks` we anyway had to figure out how to disable those alignment checks while doing checks in regular code. So now it is easy to enable CTFE alignment checking by default. Let's see what the perf consequences of that are. r? `@oli-obk`
2022-12-15Reuse the ctfe error emitting logic for the future incompat lintOli Scherer-36/+32
2022-12-15Always report alignment failures in future incompat summariesOli Scherer-0/+36
2022-12-15Make alignment checks a future incompat lintOli Scherer-18/+22
2022-12-15adjust testsRalf Jung-267/+248
2022-12-15always check alignment during CTFERalf Jung-40/+74
2022-12-15fix tidy and add rpitit testDeadbeef-2/+23
2022-12-15Auto merge of #105746 - matthiaskrgr:rollup-sz3grbv, r=matthiaskrgrbors-154/+292
Rollup of 11 pull requests Successful merges: - #104592 (Ensure async trait impls are async (or otherwise return an opaque type)) - #105623 (Fix `-Z print-type-sizes` for generators with discriminant field ordered first) - #105627 (Auto traits in `dyn Trait + Auto` are suggestable) - #105633 (Make `report_projection_error` more `Term` agnostic) - #105683 (Various cleanups to dest prop) - #105692 (Add regression test for #104678) - #105707 (rustdoc: remove unnecessary CSS `kbd { cursor: default }`) - #105715 (Do not mention long types in E0599 label) - #105722 (more clippy::complexity fixes) - #105724 (rustdoc: remove no-op CSS `.scrape-example .src-line-numbers { margin: 0 }`) - #105730 (rustdoc: remove no-op CSS `.item-info:before { color }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-15Rollup merge of #105715 - estebank:unsatisfied-bounds-label, r=compiler-errorsMatthias Krüger-4/+4
Do not mention long types in E0599 label The type is already mentioned in the main message and the list of unmet bounds.
2022-12-15Rollup merge of #105707 - notriddle:notriddle/kbd-cursor, ↵Matthias Krüger-1/+0
r=jhpratt,GuillaumeGomez rustdoc: remove unnecessary CSS `kbd { cursor: default }` Added along with theme picker changes in https://github.com/rust-lang/rust/pull/47686/files#diff-7dc22a0530802d77c2f2ec9e834024a5657b6eab4055520fca46edc99a544413R1144, but no reason seems to have been given at the time for why this particular rule was added. Removing this rule results in `<kbd>` elements getting an I-bar, while the rule causes them to use the "default" arrow, but since selecting the text in these elements works fine, the I-bar is not misleading.
2022-12-15Rollup merge of #105692 - JohnTitor:issue-104678, r=compiler-errorsMatthias Krüger-0/+31
Add regression test for #104678 Closes #104678 r? `````@compiler-errors````` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-15Rollup merge of #105633 - compiler-errors:term-agnostic, r=oli-obkMatthias Krüger-2/+65
Make `report_projection_error` more `Term` agnostic Fixes #105632
2022-12-15Rollup merge of #105627 - compiler-errors:dyn-auto-suggestable, r=davidtwcoMatthias Krüger-0/+27
Auto traits in `dyn Trait + Auto` are suggestable Not sure why I had made the `IsSuggestableVisitor` have that rule to not consider `dyn Trait + Auto` to be suggestable. It's possible that this was done because of the fact that we don't print the right parentheses for `&(dyn Trait + Auto)`, but that's a problem with printing these types in general that we probably have tracked somewhere else...
2022-12-15Rollup merge of #105623 - compiler-errors:generator-type-size-fix, r=NilstriebMatthias Krüger-122/+66
Fix `-Z print-type-sizes` for generators with discriminant field ordered first Fixes #105589 Fixes #105591
2022-12-15Rollup merge of #104592 - ComputerDruid:async_check, r=compiler-errorsMatthias Krüger-25/+99
Ensure async trait impls are async (or otherwise return an opaque type) As a workaround for the full `#[refine]` semantics not being implemented yet, forbit returning a concrete future type like `Box<dyn Future>` or a manually implemented Future. `-> impl Future` is still permitted; while that can also cause accidental refinement, that's behind a different feature gate (`return_position_impl_trait_in_trait`) and that problem exists regardless of whether the trait method is async, so will have to be solved more generally. Fixes https://github.com/rust-lang/rust/issues/102745
2022-12-15Allow `impl ~const Trait` opaque typesDeadbeef-51/+36
2022-12-15Auto merge of #105285 - compiler-errors:conflicting-param-env-2, r=estebankbors-13/+84
Highlight conflicting param-env candidates, again Un-reverts #98794 (i.e. reverts #99290). The previous time I attempted to land this PR, it was because of an incremental issue (#99233). The repro instructions in the issue is no longer manifest the ICE -- I think it's because this ambiguity code was refactored (I think by `@lcnr)` to no longer store the ambiguities in the fulfillment error, but instead recompute them on the fly. The main motivation for trying to re-land this is that it fixes #105131 by highlighting the root-cause of the issue, which is conflicting param-env candidates: ``` error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>` | note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found --> $DIR/conflicting-bounds.rs:3:1 | LL | pub trait Gen<'source> { | ^^^^^^^^^^^^^^^^^^^^^^ ... LL | Self: for<'s> Gen<'s, Output = T>; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0283`. ``` Fixes #105131. Fixes (again) #98786
2022-12-15Add regression test for #55976Yuki Okushi-0/+13
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-14Tweak output for bare `dyn Trait` in argumentsEsteban Küber-15/+65
Fix #35825.
2022-12-15Auto merge of #104765 - chenyukang:yukang-fix-104639-lifetime-check, r=oli-obkbors-0/+10
Find the right lower bound region in the scenario of partial order relations Fixes #104639
2022-12-14Ensure async trait impls are async (or otherwise return an opaque type)Dan Johnson-25/+99
As a workaround for the full `#[refine]` semantics not being implemented yet, forbit returning a concrete future type like `Box<dyn Future>` or a manually implemented Future. `-> impl Future` is still permitted; while that can also cause accidental refinement, that's behind a different feature gate (`return_position_impl_trait_in_trait`) and that problem exists regardless of whether the trait method is async, so will have to be solved more generally. Fixes #102745
2022-12-14bless rustdoc test for unstable optionsRémy Rakic-0/+1
2022-12-14Do not mention long types in E0599 labelEsteban Küber-4/+4
The type is already mentioned in the main message and the list of unmet bounds.
2022-12-14Auto merge of #105703 - matthiaskrgr:rollup-tfpeam2, r=matthiaskrgrbors-1/+97
Rollup of 7 pull requests Successful merges: - #105399 (Use more LFS functions.) - #105578 (Fix transmutes between pointers in different address spaces (e.g. fn ptrs on AVR)) - #105598 (explain mem::forget(env_lock) in fork/exec) - #105624 (Fix unsoundness in bootstrap cache code) - #105630 (Add a test for #92481) - #105684 (Improve rustdoc markdown variable naming) - #105697 (Remove fee1-dead from reviewers) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-14Add testMichael Goulet-0/+25
2022-12-14Highlight conflicting param-env candidates, againMichael Goulet-13/+59
2022-12-14Auto traits in dyn are suggestableMichael Goulet-0/+27
2022-12-14Added PlayStation Vita supportAndrés Martínez-1/+1
2022-12-14Make report_projection_error more term agnosticMichael Goulet-2/+65
2022-12-14drive-by: Fix path spansMichael Goulet-6/+6
2022-12-14Use impl's def id when calculating type to specify UFCSMichael Goulet-0/+63
2022-12-14bail in collect_trait_impl_trait_tys if signatures reference errorsMichael Goulet-0/+42
2022-12-14rustdoc: remove unnecessary CSS `kbd { cursor: default }`Michael Howell-1/+0
Added along with theme picker changes in e78f1392b79779fa184f9a63e7be04ac7074a1c2, but no reason seems to have been given at the time for why this particular rule was added. Removing this rule results in `<kbd>` elements getting an I-bar, while the rule causes them to use the "default" arrow, but since selecting the text in these elements works fine, the I-bar is not misleading.
2022-12-14Don't bug if we're trying to cast dyn* to a nother typeMichael Goulet-0/+20
2022-12-14Make print_type_sizes test not use feature(start)Michael Goulet-128/+36
2022-12-14Consider discriminant fields that are ordered before variant fieldsMichael Goulet-0/+36
2022-12-14Rollup merge of #105630 - albertlarsan68:test-92481, r=TaKO8KiMatthias Krüger-0/+74
Add a test for #92481 The test was copied ad-hoc from #92481, but I can't get the test to pass, because of needing to get twice the same error on the last line of the source. Closes #92481
2022-12-14Rollup merge of #105578 - erikdesjardins:addrspacecast, r=bjorn3Matthias Krüger-1/+23
Fix transmutes between pointers in different address spaces (e.g. fn ptrs on AVR) Currently, this causes a verifier error (https://godbolt.org/z/YYohed4bj), since it uses `bitcast`, which can't convert between address spaces. Uncovered due to https://github.com/rust-lang/rust/pull/105545#discussion_r1045269309 r? `@bjorn3`
2022-12-14Auto merge of #105233 - mejrs:always_eager, r=estebankbors-18/+34
Always evaluate vecs of subdiagnostics eagerly See https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20lists!/near/310186705 for context
2022-12-14Allow .. to be parsed as let initializerDeep Majumder-0/+8
.. and ..= are valid expressions, however when used in a let statement it is not parsed.
2022-12-14Auto merge of #105690 - matthiaskrgr:rollup-khtq97k, r=matthiaskrgrbors-0/+26
Rollup of 6 pull requests Successful merges: - #105642 (Minor grammar nit.) - #105658 (Remove ..X from RELEASES.md) - #105663 (Adjust log line in `fuchsia-test-runner.py`) - #105664 (rustdoc: apply `pre-wrap` CSS to code-wrapped links) - #105665 (rustdoc: simplify popover CSS) - #105676 (rustdoc: add CSS margin between `impl` docblock and its items) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-14Bless testAlbert Larsan-4/+2
2022-12-14skip if val has ecaping bound varsouz-a-0/+14
2022-12-14Add a test for #92481Albert Larsan-0/+76
2022-12-14Add regression test for #104678Yuki Okushi-0/+31
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-14Rollup merge of #105676 - notriddle:notriddle/impl-docblock, r=GuillaumeGomezMatthias Krüger-0/+17
rustdoc: add CSS margin between `impl` docblock and its items ## Before ![image](https://user-images.githubusercontent.com/1593513/207471025-c27c298b-4d48-461b-918b-a965b09db4f1.png) ## After ![image](https://user-images.githubusercontent.com/1593513/207471759-1bbabf71-0932-441c-b044-ad0e392ba552.png)