about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-05-05Rollup merge of #96730 - JohnTitor:unused-lifetimes-tests, r=compiler-errorsMichael Goulet-0/+54
Add a regression test for #64173 and #66152 Closes #64173 Closes #66152 Mixed the code as the root cause seems the same.
2022-05-05Put the 2229 migration errors in alphabetical orderScott McMurray-3/+3
Looks like they were in FxHash order before, so it might just be luck that this used to be consistent across different word lengths.
2022-05-05Auto merge of #96520 - lcnr:general-incoherent-impls, r=petrochenkovbors-0/+226
generalize "incoherent impls" impl for user defined types To allow the move of `trait Error` into core. continues the work from #94963, finishes https://github.com/rust-lang/compiler-team/issues/487 r? `@petrochenkov` cc `@yaahc`
2022-05-06Fix an ICE on #96738Yuki Okushi-0/+14
2022-05-05Allow unused rules in the testsuite where the lint triggersest31-3/+14
2022-05-05Add testsest31-43/+195
Also rename the test files for the unused_macros lint to avoid confusion. The test files now follow a <lint_name><-maybe-decl>.rs scheme.
2022-05-05Auto merge of #96734 - matthiaskrgr:rollup-hng33tb, r=matthiaskrgrbors-64/+163
Rollup of 7 pull requests Successful merges: - #95359 (Update `int_roundings` methods from feedback) - #95843 (Improve Rc::new_cyclic and Arc::new_cyclic documentation) - #96507 (Suggest calling `Self::associated_function()`) - #96635 (Use "strict" mode in JS scripts) - #96673 (Report that opaque types are not allowed in impls even in the presence of other errors) - #96682 (Show invisible delimeters (within comments) when pretty printing.) - #96714 (interpret/validity: debug-check ScalarPair layout information) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-05 make `compare_generic_param_kinds` errors consistentEllen-48/+94
2022-05-05Rollup merge of #96682 - nnethercote:show-invisible-delims, r=petrochenkovMatthias Krüger-59/+86
Show invisible delimeters (within comments) when pretty printing. Because invisible syntax is really hard to work with! r? `@petrochenkov`
2022-05-05Rollup merge of #96673 - oli-obk:tait_impl_diagnostic, r=petrochenkovMatthias Krüger-5/+10
Report that opaque types are not allowed in impls even in the presence of other errors fixes #96569 before this PR those useful errors were hidden because either `unused parameter` or `only traits defined in the current crate can be implemented for arbitrary types` got emitted first.
2022-05-05Rollup merge of #96507 - TaKO8Ki:suggest-calling-associated-function, r=lcnrMatthias Krüger-0/+67
Suggest calling `Self::associated_function()` closes #96453
2022-05-05update error messages and explicitly mention them in testslcnr-32/+52
2022-05-05Auto merge of #91779 - ridwanabdillahi:natvis, r=michaelwoeristerbors-0/+42
Add a new Rust attribute to support embedding debugger visualizers Implemented [this RFC](https://github.com/rust-lang/rfcs/pull/3191) to add support for embedding debugger visualizers into a PDB. Added a new attribute `#[debugger_visualizer]` and updated the `CrateMetadata` to store debugger visualizers for crate dependencies. RFC: https://github.com/rust-lang/rfcs/pull/3191
2022-05-05exit out of `compare_number_of_generics` earlyEllen-31/+18
2022-05-05 handle mismatched generic parameter kindsEllen-0/+104
2022-05-05Add a regression test for #64173 and #66152Yuki Okushi-0/+54
2022-05-05Add known bug casesOli Scherer-0/+79
2022-05-05forbid empty impls for types with incoherent implslcnr-0/+206
2022-05-05Add regression testsOli Scherer-0/+24
2022-05-05suggest calling `Self::associated_function()`Takayuki Maeda-0/+67
do not suggest when trait_ref is some Update compiler/rustc_resolve/src/late/diagnostics.rs Co-authored-by: lcnr <rust@lcnr.de> use helper struct add a test for functions with some params refactor debug log
2022-05-05Auto merge of #96720 - JohnTitor:rollup-9jaaekr, r=JohnTitorbors-72/+499
Rollup of 7 pull requests Successful merges: - #96603 (Enable full revision in const generics ui tests) - #96616 (Relax memory ordering used in `min_stack`) - #96619 (Relax memory ordering used in SameMutexCheck) - #96628 (Stabilize `bool::then_some`) - #96658 (Move callback to the () => {} syntax.) - #96677 (Add more tests for label-break-value) - #96697 (Enable tracing for all queries) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-05-05Rollup merge of #96677 - jyn514:label-break-value-tests, r=petrochenkovYuki Okushi-1/+208
Add more tests for label-break-value Helps with https://github.com/rust-lang/rust/issues/48594. The tests are adapted from https://github.com/rust-lang/rust/issues/48594#issuecomment-421625182.
2022-05-05Rollup merge of #96603 - Alexendoo:const-generics-tests, r=Mark-SimulacrumYuki Okushi-71/+291
Enable full revision in const generics ui tests The ICEs no longer occur since https://github.com/rust-lang/rust/pull/95776 so the revisions can be reenabled Also adds some regression tests for issues that no longer ICE because of it closes #77357 closes #78180 closes #83993
2022-05-05Auto merge of #96593 - jackh726:issue-93262, r=compiler-errorsbors-1/+56
Revert "Prefer projection candidates instead of param_env candidates for Sized predicates" Fixes #93262 Reopens #89352 This was a hack that seemed to have no negative side-effects at the time. Given that the latter has a workaround and likely less common than the former, it makes sense to revert this change. r? `@compiler-errors`
2022-05-04Auto merge of #96546 - nnethercote:overhaul-MacArgs, r=petrochenkovbors-21/+21
Overhaul `MacArgs` Motivation: - Clarify some code that I found hard to understand. - Eliminate one use of three places where `TokenKind::Interpolated` values are created. r? `@petrochenkov`
2022-05-05Overhaul `MacArgs::Eq`.Nicholas Nethercote-21/+21
The value in `MacArgs::Eq` is currently represented as a `Token`. Because of `TokenKind::Interpolated`, `Token` can be either a token or an arbitrary AST fragment. In practice, a `MacArgs::Eq` starts out as a literal or macro call AST fragment, and then is later lowered to a literal token. But this is very non-obvious. `Token` is a much more general type than what is needed. This commit restricts things, by introducing a new type `MacArgsEqKind` that is either an AST expression (pre-lowering) or an AST literal (post-lowering). The downside is that the code is a bit more verbose in a few places. The benefit is that makes it much clearer what the possibilities are (though also shorter in some other places). Also, it removes one use of `TokenKind::Interpolated`, taking us a step closer to removing that variant, which will let us make `Token` impl `Copy` and remove many "handle Interpolated" code paths in the parser. Things to note: - Error messages have improved. Messages like this: ``` unexpected token: `"bug" + "found"` ``` now say "unexpected expression", which makes more sense. Although arbitrary expressions can exist within tokens thanks to `TokenKind::Interpolated`, that's not obvious to anyone who doesn't know compiler internals. - In `parse_mac_args_common`, we no longer need to collect tokens for the value expression.
2022-05-04Exit before fetching bounds on associated items.Camille GILLOT-0/+16
2022-05-04Only keep predicates on `Self` when checking `dyn TraitAlias`.Camille GILLOT-11/+20
2022-05-04Auto merge of #94775 - oli-obk:operand_order, r=davidtwcobors-0/+31
Fix constants not getting dropped if part of a diverging expression fixes https://github.com/rust-lang/rust/issues/90762 cc `@RalfJung`
2022-05-04Generate an intermediate temporary for `Drop` constants.Oli Scherer-4/+9
To limit the fallout from this, don't do this for the last (or only) operand in an rvalue.
2022-05-04Rollup merge of #96686 - JohnTitor:impl-trait-tests, r=oli-obkYuki Okushi-0/+123
Add some TAIT-related tests Closes #53398 Closes #58662 Closes #89952 Closes #94429 r? `@oli-obk` as you're familiar with it
2022-05-04Rollup merge of #96679 - ricked-twice:issue-96223-fix, r=jackh726Yuki Okushi-0/+80
Quick fix for #96223. This PR is a quick fix regarding #96223. As mentioned in the issue, others modification could be added to not elide types with bound vars from suggestions. Special thanks to ``@jackh726`` for mentoring and ``@Manishearth`` for minimal test case. r? ``@jackh726``
2022-05-04Add regression testOli Scherer-0/+26
2022-05-04Revert #92191 Prefer projection candidates instead of param_env candidates ↵Jack Huey-1/+56
for Sized predicates
2022-05-04Auto merge of #96353 - estebank:issue-95413, r=compiler-errorsbors-0/+114
When suggesting to import an item, also suggest changing the path if appropriate When we don't find an item we search all of them for an appropriate import and suggest `use`ing it. This is sometimes done for expressions that have paths with more than one segment. We now also suggest changing that path to work with the `use`. Fix #95413
2022-05-04Add some TAIT-related testsYuki Okushi-0/+123
2022-05-04Show invisible delimeters (within comments) when pretty printing.Nicholas Nethercote-59/+86
2022-05-03Auto merge of #95380 - compiler-errors:unit-destructure-assign, r=nikomatsakisbors-0/+34
Fix unit struct/enum variant in destructuring assignment See https://github.com/rust-lang/rfcs/blob/master/text/2909-destructuring-assignment.md#guide-level-explanation, "including **unit** and tuple structs" Fixes #94319
2022-05-03Taking review hints into account.ricked-twice-8/+7
2022-05-03Quick fix for #96223.ricked-twice-0/+81
2022-05-03Add more tests for label-break-valueJoshua Nelson-1/+208
2022-05-03Add support for a new attribute `#[debugger_visualizer]` to support ↵ridwanabdillahi-0/+42
embedding debugger visualizers into a generated PDB. Cleanup `DebuggerVisualizerFile` type and other minor cleanup of queries. Merge the queries for debugger visualizers into a single query. Revert move of `resolve_path` to `rustc_builtin_macros`. Update dependencies in Cargo.toml for `rustc_passes`. Respond to PR comments. Load visualizer files into opaque bytes `Vec<u8>`. Debugger visualizers for dynamically linked crates should not be embedded in the current crate. Update the unstable book with the new feature. Add the tracking issue for the debugger_visualizer feature. Respond to PR comments and minor cleanups.
2022-05-03Allow inline consts to reference generic paramsGary Guo-5/+83
2022-05-03Report that opaque types are not allowed in impls even in the presence of ↵Oli Scherer-5/+10
other errors
2022-05-03Add regression testOli Scherer-0/+43
2022-05-03Rollup merge of #96646 - estebank:issue-96638, r=jackh726Yuki Okushi-0/+28
Mitigate impact of subtle invalid call suggestion logic There's some subtle interaction between inferred expressions being passed as an argument to fn calls with fewer than expected arguments. To avoid the ICE, I'm changing indexing operations with `.get(idx)`, but the underlying logic still needs to be audited as it was written with the assumption that `final_arg_types` and `provided_args` have the right length. Address #96638.
2022-05-03Rollup merge of #96629 - ↵Yuki Okushi-12/+34
ken-matsui:fix-invalid-keyword-order-for-function-declarations, r=davidtwco Fix invalid keyword order for function declarations Closes: https://github.com/rust-lang/rust/issues/94879
2022-05-03Rollup merge of #96614 - JohnTitor:test-92305, r=oli-obkYuki Okushi-0/+47
Add a regression test for #92305 Closes #92305 r? ``@oli-obk`` as per https://github.com/rust-lang/rust/issues/92305#issuecomment-1114043188
2022-05-03Rollup merge of #96589 - Badel2:source-callsite, r=michaelwoeristerYuki Okushi-0/+37
Use source callsite in check_argument_types suggestion This makes the "remove extra arguement" suggestion valid when the function argument is a macro. Additionally, this may fix #96225, but the only way I can reproduce that issue is using the playground, so we will need to wait until after this is merged to ensure it's fixed.
2022-05-03Tweak wordingEsteban Kuber-28/+28