about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2023-01-23Make `output_filenames` a real queryOli Scherer-0/+75
2023-01-23Rollup merge of #107203 - chenyukang:yukang/fix-106496-remove-deref, ↵Dylan DPC-5/+128
r=compiler-errors Suggest remove deref for type mismatch Fixes #106496
2023-01-23Rollup merge of #107108 - sulami:issue-83968-doc-alias-typo-suggestions, ↵Dylan DPC-0/+23
r=compiler-errors Consider doc(alias) when providing typo suggestions This means that ```rust impl Foo { #[doc(alias = "quux")] fn bar(&self) {} } fn main() { (Foo {}).quux(); } ``` will suggest `bar`. This currently uses the "there is a method with a similar name" help text, because the point where we choose and emit a suggestion is different from where we gather the suggestions. Changes have mainly been made to the latter. The selection code will now fall back to aliased candidates, but generally only if there is no candidate that matches based on the existing Levenshtein methodology. Fixes #83968.
2023-01-23Rollup merge of #104926 - spastorino:calculate_diverging_fallback-cleanups, ↵Dylan DPC-8/+1
r=lcnr Move relationships from FulfillmentContext to Inherited r? `@lcnr`
2023-01-23Consider doc(alias) when providing typo suggestionsRobin Schroer-0/+23
This means that ```rust impl Foo { #[doc(alias = "quux")] fn bar(&self) {} } fn main() { (Foo {}).quux(); } ``` will suggest `bar`. This currently uses the "there is a method with a similar name" help text, because the point where we choose and emit a suggestion is different from where we gather the suggestions. Changes have mainly been made to the latter. The selection code will now fall back to aliased candidates, but generally only if there is no candidate that matches based on the existing Levenshtein methodology. Fixes #83968.
2023-01-23Fix #106496, suggest remove deref for type mismatchyukang-5/+128
2023-01-22fn-trait-closure test now pass on new solverSantiago Pastorino-8/+1
2023-01-22Rollup merge of #107152 - GuillaumeGomez:migrate-to-css-var, r=notriddleMatthias Krüger-0/+36
Migrate scraped-examples top and bottom "borders" to CSS variables r? `@notriddle`
2023-01-22Rollup merge of #107111 - chenyukang:yukang/fix-107090-fluent-parameters, ↵Matthias Krüger-0/+204
r=petrochenkov Fix missing arguments issues and copy-paste bug for fluent Fixes #107090
2023-01-22Auto merge of #107185 - compiler-errors:rollup-wkomjma, r=compiler-errorsbors-0/+394
Rollup of 8 pull requests Successful merges: - #103418 (Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report) - #106113 (llvm-wrapper: adapt for LLVM API change) - #106144 (Improve the documentation of `black_box`) - #106578 (Label closure captures/generator locals that make opaque types recursive) - #106749 (Update cc to 1.0.77) - #106935 (Fix `SingleUseLifetime` ICE) - #107015 (Re-enable building rust-analyzer on riscv64) - #107029 (Add new bootstrap members to triagebot.toml) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-21Rollup merge of #106935 - TaKO8Ki:fix-104440, r=cjgillotMichael Goulet-0/+128
Fix `SingleUseLifetime` ICE Fixes #104440 cc: ``@matthiaskrgr``
2023-01-21Rollup merge of #106578 - compiler-errors:recursive-opaque-closure, r=TaKO8KiMichael Goulet-0/+46
Label closure captures/generator locals that make opaque types recursive cc https://github.com/rust-lang/rust/issues/46415#issuecomment-1374665828
2023-01-21Rollup merge of #103418 - Aaron1011:macro-semicolon-future-incompat, r=davidtwcoMichael Goulet-0/+220
Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report See https://github.com/rust-lang/rust/issues/79813 for a discussion of this lint. This has been warn-by-default for over a year, so adding it to the future-incompat report should help to find libraries that haven't yet updated.
2023-01-22Auto merge of #107133 - pnkfelix:revert-pr-84022-for-issue-106337, ↵bors-36/+100
r=Mark-Simulacrum Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error" This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36 aka PR #84022 I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-21Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat reportAaron Hill-0/+220
2023-01-21Auto merge of #105924 - TimNN:ui-remap, r=Mark-Simulacrumbors-53/+49
Remap paths in UI tests by default If you think this needs further discussions / something RFC-like, please let me know the best forum for that. This PR runs UI tests with a remapped "src base" directory by default. Why? Because some UI tests currently depend on the length of the absolute path to the `src/test/ui` directory. Remapping makes the tests independent of the absolute path. The path to the source file (which is absolute on CI) is part of the type name of closures. `rustc` diagnostic output depends on the length of type names (long type names are truncated). So a long absolute path leads to long closure type names, which leads to truncation and changed diagnostics. (I initially tried just disabling type name truncation, but that made some error messages stupid long (thousands of characters, IIRC)). Additional changes: * All boolean `compiletest` directives now support explicit `no-` versions to disable them. * Adapt existing tests when necessary: * Disable remapping for individual tests that fail with it enabled (when there's no obvious alternative fix). * For tests that already check something remapping related switch to the new option unless we gain something significant by keeping the manual remap. Passed Windows CI in https://github.com/rust-lang/rust/actions/runs/3933100590
2023-01-21Extend rustdoc GUI test for scraped examples top and bottom "borders"Guillaume Gomez-0/+36
2023-01-21Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoeristerbors-5/+6
Simplify `derive(Debug)` output for fieldless enums Fixes #106875
2023-01-21Label closure captures/generator locals that make opaque types recursiveMichael Goulet-0/+46
2023-01-20Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnrMichael Goulet-0/+64
Implement some more new solver candidates and fix some bugs First, fix some bugs: 1. `IndexVec::drain_enumerated(a..b)` does not give us an iterator of index keys + items enumerated from `a..b`, but from `0..(b-a)`... That caused a bug. See first commit for the fix. 2. Implement the `_: Trait` ambiguity hack. I put it in assemble, let me know if it should live elsewhere. This is important, since we otherwise consider `_: Sized` to have no solutions, and nothing passes! 3. Swap `Ambiguity` and `Unimplemented` cases for the new solver. Sorry for accidentally swapping them 😄 4. Check GATs' own predicates during projection confirmation. Then implement a few builtin traits: 5. Implement `PointerSized`. Pretty independent. 6. Implement `Fn` family of traits for fnptr, fndef, and closures. Closures are currently broken because `FulfillCtxt::relationships` is intentionally left unimplemented. See comment in the test. r? ```@lcnr```
2023-01-20Rollup merge of #104347 - notriddle:notriddle/import-macro-from-self-fixup, ↵Michael Goulet-0/+104
r=TaKO8Ki diagnostics: suggest changing `s@self::{macro}@::macro` for exported Fixes #99695
2023-01-20Rollup merge of #104154 - ↵Michael Goulet-62/+53
timrobertsdev:deny-by-default-bindings_with_variant_name, r=scottmcm Change `bindings_with_variant_name` to deny-by-default Changed the `bindings_with_variant_name` lint to deny-by-default and fixed up the affected tests. Addresses #103442.
2023-01-20Revert "Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error"Felix S. Klock II-36/+100
This reverts commit 7d82cadd97acc66993b69304c5a1a04ef7d1fa36. I am doing this to buy us some time with respect to issue #106337 w.r.t. the 1.67 release.
2023-01-20diagnostics: add `};` only if `{` was added tooMichael Howell-0/+55
2023-01-20diagnostics: suggest changing `s@self::{macro}@::macro` for exportedMichael Howell-0/+49
Fixes #99695
2023-01-20Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnrbors-25/+70
Check ADT fields for copy implementations considering regions Fixes #88901 r? `@ghost`
2023-01-20Auto merge of #107106 - matthiaskrgr:rollup-g7r1ep0, r=matthiaskrgrbors-76/+177
Rollup of 6 pull requests Successful merges: - #106699 ([drop tracking] Visit break expressions ) - #106738 (Fix known-bug annotations) - #106891 (Tweak "borrow closure argument" suggestion) - #106928 (add raw identifier for keyword in suggestion) - #107065 (Clippy: Make sure to include in beta: Move `unchecked_duration_subtraction` to pedantic) - #107068 (autoderive Subdiagnostic for AddtoExternBlockSuggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-20Change `bindings_with_variant_name` to deny-by-default--global-62/+53
2023-01-20Rollup merge of #106928 - bvanjoi:print-keyword-raw-identifier, r=petrochenkovMatthias Krüger-5/+36
add raw identifier for keyword in suggestion fix https://github.com/rust-lang/rust/issues/106841
2023-01-20Rollup merge of #106891 - estebank:issue-45727, r=petrochenkovMatthias Krüger-39/+101
Tweak "borrow closure argument" suggestion Fix #45727.
2023-01-20Rollup merge of #106738 - compiler-errors:known-bugs-oops, r=jackh726Matthias Krüger-32/+19
Fix known-bug annotations r? ``@Nilstrieb``
2023-01-20Rollup merge of #106699 - eholk:await-chains-drop-tracking, r=wesleywiserMatthias Krüger-0/+21
[drop tracking] Visit break expressions This fixes https://github.com/rust-lang/rust/issues/102383 by remembering to visit the expression in `break expr` when building the drop tracking CFG. Missing this step was causing an off-by-one error which meant after a number of awaits we'd be looking for dropped values at the wrong point in the code. Additionally, this changes the order of traversal for assignment expressions to visit the rhs and then the lhs. This matches what is done elsewhere. Finally, this improves some of the debugging output (for example, the CFG visualizer) to make it easier to figure out these sorts of issues.
2023-01-20Rollup merge of #107076 - megakorre:106419_add_test_case, r=compiler-errorsMatthias Krüger-0/+12
Added const-generic ui test case for issue #106419 This PR adds a test case for #106419 which has been fixed in master by #105292 I also ran the test on f769d34291e489db19d3c972348ddb24b6b32481 (the commit before #105292 was merged) and it did fail there with the following output. ``` --- stderr ------------------------------- error[E0308]: mismatched types --> /home/patrikk/src/rust/src/test/ui/const-generics/issue-106419-struct-with-multiple-const-params.rs:5:10 | LL | #[derive(Clone)] | ^^^^^ | | | expected `A`, found `B` | expected `Bar<A, B>` because of return type | = note: expected struct `Bar<A, _>` found struct `Bar<B, _>` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. ------------------------------------------ ```
2023-01-20Rollup merge of #107067 - tmiasko:custom-mir-storage-statements, r=oli-obkMatthias Krüger-5/+9
Custom MIR: Support storage statements r? `@oli-obk` `@JakobDegen`
2023-01-20Rollup merge of #107058 - clubby789:eqeq-homoglyph, r=wesleywiserMatthias Krüger-1/+15
Recognise double-equals homoglyph Recognise `⩵` as a homoglyph for `==`. The first commit switches `char` to `&str`, as all previous homoglyphs corresponded to a single ASCII character, while the second implements the fix. `@rustbot` label +A-diagnostics +A-parser
2023-01-20Rollup merge of #106973 - oli-obk:tait_ice_closure_in_impl_header, r=lcnrMatthias Krüger-2/+38
Don't treat closures from other crates as local fixes #104817 r? `@lcnr` Specialization can prefer an impl for an opaque type over a blanket impls that also matches. If the blanket impl only applies if an auto-trait applies, we look at the hidden type of the opaque type to see if that implements the auto trait. The hidden type can be a closure or generator, and thus we will end up seeing these types in coherence and have to handle them properly.
2023-01-20Rollup merge of #106783 - WaffleLapkin:break-my-ident, r=wesleywiserMatthias Krüger-0/+39
Recover labels written as identifiers This adds recovery for `break label expr` and `continue label`, as well as a test for `break label`.
2023-01-20Auto merge of #107083 - GuillaumeGomez:revert-104889, r=notriddlebors-77/+7
rustdoc: Revert #104889 Reverts #104889. I don't think I'll be able to finish https://github.com/rust-lang/rust/pull/107000 on time unfortunately so to prevent https://github.com/rust-lang/rust/issues/106373, better to revert it and to make it into the next release. r? `@notriddle`
2023-01-19Fix known-bug, silence ICE stderrMichael Goulet-32/+19
2023-01-19Tweak "borrow closure argument" suggestionEsteban Küber-39/+101
Fix #45727.
2023-01-19Revert "Add regression test for impl blocks in const expr"Guillaume Gomez-43/+0
This reverts commit 9cce0bc583ee2cff88935ce0e08d8ec1eb1239a8.
2023-01-19Revert "Update newly failing UI tests"Guillaume Gomez-34/+7
This reverts commit 9c46173895430c63066731440e00faf0ab2195dd.
2023-01-19Auto merge of #107038 - compiler-errors:dont-wfcheck-non-local-rpit, r=oli-obkbors-0/+26
Don't wf-check non-local RPITs We were using `ty::is_impl_trait_defn(..).is_none()` to check if we need to add WF obligations for an opaque type. This is *supposed* to be checking if the type is a TAIT, since RPITs' wfness is implied by wf checking its parent item, but since `is_impl_trait_defn` returns `None` for non-local RPIT and async futures, we unnecessarily consider wf predicates for an RPIT if it is coming from a foreign crate. Fixes #107036 r? `@oli-obk` but feel free to reassign
2023-01-20add raw identifier for keyword in suggestionbohan-5/+36
2023-01-19trait solver: Implement Fn traits and tuple traitMichael Goulet-0/+28
2023-01-19trait solver: PointerSizedMichael Goulet-0/+36
2023-01-19Special case `derive(Debug)` for fieldless enumsclubby789-5/+6
2023-01-19Add testMichael Goulet-0/+26
2023-01-19Added UI test case for issue #106419Patrik Kårlin-0/+12
2023-01-19Auto merge of #106910 - aliemjay:alias-ty-in-regionck, r=oli-obkbors-0/+18
even more unify Projection/Opaque handling in region outlives code edit: This continues ate the same pace as #106829. New changes are described in https://github.com/rust-lang/rust/pull/106910#issuecomment-1383251254. ~This touches `OutlivesBound`, `Component`, `GenericKind` enums.~ r? `@oli-obk` (because of overlap with #95474)