about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2022-12-01More testsOli Scherer-1/+160
2022-12-01Extend tests to cover runtime promotion cases, tooOli Scherer-6/+106
2022-12-01Rollup merge of #105106 - jhpratt:issue-105101, r=TaKO8KiMatthias Krüger-0/+38
Fix ICE from #105101 Fixes #105101 Rather than comparing idents, compare spans, which should be unique to each variant.
2022-12-01Rollup merge of #105078 - TaKO8Ki:fix-105011, r=nnethercoteMatthias Krüger-0/+11
Fix `expr_to_spanned_string` ICE Fixes #105011
2022-12-01Auto merge of #104861 - nnethercote:attr-cleanups, r=petrochenkovbors-2/+10
Attribute cleanups Best reviewed one commit at a time. r? `@petrochenkov`
2022-11-30Fix ICE from #105101Jacob Pratt-0/+38
2022-11-30Make sure async constructs do not `impl Generator`Arpad Borsos-0/+126
Async lowering turns async functions and blocks into generators internally. Though these special kinds of generators should not `impl Generator` themselves. The other way around, normal generators should not `impl Future`.
2022-11-30Rollup merge of #105081 - weiznich:regression_test_for_104322, r=compiler-errorsMatthias Krüger-0/+80
Add a regression test for #104322 r? ``@compiler-errors``
2022-11-30Rollup merge of #104895 - chenyukang:yukang/fix-104884-serde, r=TaKO8KiMatthias Krüger-0/+91
Avoid Invalid code suggested when encountering unsatisfied trait bounds in derive macro code Fixes #104884
2022-12-01fix #105028, Only suggest removing struct field from destructive binding in ↵yukang-1/+30
shorthand scenario
2022-11-30Reduce the number of unstable features in testsAmanieu d'Antras-70/+34
2022-11-30Close accidental promotion check holeOli Scherer-8/+93
2022-11-30Add a regression test for #104322Georg Semmler-0/+80
2022-11-30Add reproduction testsOli Scherer-0/+69
2022-11-30Rollup merge of #105039 - nnethercote:fix-104769, r=petrochenkovMatthias Krüger-0/+24
Fix an ICE parsing a malformed literal in `concat_bytes!`. Fixes #104769. r? `@petrochenkov`
2022-11-30Rollup merge of #104697 - dingxiangfei2009:fix-euv-control-flow, r=oli-obkMatthias Krüger-0/+46
Restore control flow on error in EUV cc `@Nilstrieb` Fix #104649 Since #98574 refactored a piece of scrutinee memory categorization out as a subroutine, there is a subtle change in handling match arms especially when the categorization process faults and bails. In the correct case, it is not supposed to continue to process the arms any more. This PR restores the original control flow in EUV. I promise to add a compile-fail test to demonstrate that this indeed fixes the issue after coming back from a nap.
2022-11-30report literal errors when `token_lit` has errorsTakayuki Maeda-0/+11
2022-11-30Fix an ICE parsing a malformed literal in `concat_bytes!`.Nicholas Nethercote-0/+24
Fixes #104769.
2022-11-29Rollup merge of #103876 - oli-obk:tait_implications, r=lcnrMatthias Krüger-0/+117
type alias impl trait: add tests showing that hidden type only outlives lifetimes that occur in bounds fixes #103642 https://github.com/rust-lang/rust/pull/102417 only made sure that hidden types cannot outlive lifetimes other than the ones mentioned on bounds, but didn't allow us to actually infer anything from that. cc `@aliemjay`
2022-11-29Make `missing_copy_implementations` more cautiousmejrs-0/+35
2022-11-29fix #104884, Avoid Invalid code suggested when encountering unsatisfied ↵yukang-0/+91
trait bounds in derive macro code
2022-11-29Rollup merge of #105038 - Rageking8:clean-up-pr-104954, r=compiler-errorsMatthias Krüger-3/+2
Clean up pr 104954 UI test filename typo fix and a simple comment rewording. Thanks. CC `@vincenzopalazzo` (you spelled your name wrongly in the FIXME) r? `@estebank`
2022-11-29Rollup merge of #104959 - compiler-errors:revert-104269, r=lcnrMatthias Krüger-68/+0
Revert #104269 (to avoid spurious hang/test failure in CI) Causes hangs/memory overflows in the test suite apparently :cry: Reopens #104225 Fixes #104957 r? ``@lcnr``
2022-11-29clean up pr 104954Rageking8-3/+2
2022-11-29Avoid more unnecessary `MetaItem`/`Attribute` conversions.Nicholas Nethercote-2/+10
In `Expander::expand` the code currently uses `mk_attr_outer` to convert a `MetaItem` to an `Attribute`, and then follows that with `meta_item_list` which converts back. This commit avoids the unnecessary conversions. There was one wrinkle: the existing conversions caused the bogus `<>` on `Default<>` to be removed. With the conversion gone, we get a second error message about the `<>`. This is a rare case, so I think it probably doesn't matter much.
2022-11-28fix rebaseEsteban Küber-14/+14
2022-11-28fix testEsteban Küber-1/+1
2022-11-28Remove unneeded test changeEsteban Küber-3/+2
2022-11-28Further tweak the type shortening logicEsteban Küber-10/+10
2022-11-28Tweak shortening logic to be less trigger happyEsteban Küber-15/+14
2022-11-28Detect long types in E0308 and write them to diskEsteban Küber-12/+182
On type error with long types, print an abridged type and write the full type to disk. Print the widest possible short type while still fitting in the terminal.
2022-11-28Rollup merge of #104956 - mucinoab:issue-104870, r=compiler-errorsMatthias Krüger-0/+41
Avoid ICE if the Clone trait is not found while building error suggestions Fixes #104870 r? `@compiler-errors`
2022-11-28Rollup merge of #104954 - vincenzopalazzo:macros/prinf, r=estebankMatthias Krüger-0/+23
make simple check of prinf function Fixes https://github.com/rust-lang/rust/issues/92898 With this commit we start to make some simple check when the name resolution fails, and we generate some helper messages in case the name is a C name like in the case of the `printf` and suggest the correct rust method. `@rustbot` r? `@pnkfelix` Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-11-28Rollup merge of #104936 - cjgillot:self-rpit-orig-too, r=oli-obkMatthias Krüger-0/+66
Ignore bivariant parameters in test_type_match. https://github.com/rust-lang/rust/pull/103491 made opaque types bivariant with respect of some of their lifetime parameters. Because of this bivariance, some lifetime variables were not unified to anything during borrowck, and were considered as unequal by borrowck type test. This PR makes type test ignore the bivariant parameters in test_type_match. Fixes https://github.com/rust-lang/rust/issues/104815 r? `@oli-obk`
2022-11-28Auto merge of #105008 - Dylan-DPC:rollup-wcd19yu, r=Dylan-DPCbors-79/+57
Rollup of 6 pull requests Successful merges: - #104360 (Stabilize native library modifier `verbatim`) - #104732 (Refactor `ty::ClosureKind` related stuff) - #104795 (Change multiline span ASCII art visual order) - #104890 (small method code cleanup) - #104907 (Remove `SelectionContext::infcx()` in favor of field access) - #104927 (Simplify some binder shifting logic) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-28Auto merge of #102991 - Sp00ph:master, r=scottmcmbors-1/+1
Update VecDeque implementation to use head+len instead of head+tail (See #99805) This changes `alloc::collections::VecDeque`'s internal representation from using head and tail indices to using a head index and a length field. It has a few advantages over the current design: * It allows the buffer to be of length 0, which means the `VecDeque::new` new longer has to allocate and could be changed to a `const fn` * It allows the `VecDeque` to fill the buffer completely, unlike the old implementation, which always had to leave a free space * It removes the restriction for the size to be a power of two, allowing it to properly `shrink_to_fit`, unlike the old `VecDeque` * The above points also combine to allow the `Vec<T> -> VecDeque<T>` conversion to be very cheap and guaranteed O(1). I mention this in the `From<Vec<T>>` impl, but it's not a strong guarantee just yet, as that would likely need some form of API change proposal. All the tests seem to pass for the new `VecDeque`, with some slight adjustments. r? `@scottmcm`
2022-11-28Rollup merge of #104795 - estebank:multiline-spans, r=TaKO8KiDylan DPC-37/+33
Change multiline span ASCII art visual order Tweak the ASCII art for nested multiline spans so that we minimize line overlaps. Partially addresses https://github.com/rust-lang/rust/issues/61017.
2022-11-28Rollup merge of #104360 - petrochenkov:stabverb, r=TaKO8KiDylan DPC-42/+24
Stabilize native library modifier `verbatim` Stabilization report - https://github.com/rust-lang/rust/pull/104360#issuecomment-1312724787. cc https://github.com/rust-lang/rust/issues/81490 Closes https://github.com/rust-lang/rust/issues/99425
2022-11-28Tweak outputEsteban Küber-23/+19
2022-11-28Change multiline span ASCII art visual orderEsteban Küber-50/+50
2022-11-27Avoid ICE if the Clone trait is not found while building error suggestionsBruno A. Muciño-0/+41
2022-11-27Stabilize native library modifier `verbatim`Vadim Petrochenkov-42/+24
2022-11-28inference test for #104649Ding Xiang Fei-0/+46
2022-11-27Auto merge of #104983 - matthiaskrgr:rollup-018sk73, r=matthiaskrgrbors-69/+68
Rollup of 8 pull requests Successful merges: - #95836 (Use `rust_out{exe_suffix}` for doctests) - #104882 (notify lcnr on changes to `ObligationCtxt`) - #104892 (Explain how to get the discriminant out of a `#[repr(T)] enum` with payload) - #104917 (Allow non-org members to label `requires-debug-assertions`) - #104931 (Pretty-print generators with their `generator_kind`) - #104934 (Remove redundant `all` in cfg) - #104944 (Support unit tests for jsondoclint) - #104946 (rustdoc: improve popover focus handling JS) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-27Rollup merge of #104931 - Swatinem:async-pretty, r=eholkMatthias Krüger-69/+68
Pretty-print generators with their `generator_kind` After removing `GenFuture`, I special-cased async generators to pretty-print as `impl Future<Output = X>` mainly to avoid too much diagnostics changes originally. This now reverses that change so that async fn/blocks are pretty-printed as `[$async-type@$source-position]` in various diagnostics, and updates the tests that this touches.
2022-11-27Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errorsbors-72/+234
Separate lifetime ident from lifetime resolution in HIR Drive-by: change how suggested generic args are computed. Fixes https://github.com/rust-lang/rust/issues/103815 I recommend reviewing commit-by-commit.
2022-11-27make simple check of prinf function.Vincenzo Palazzo-0/+23
With this commit we start to make some simple check when the name resolution fails, and we generate some helper message in case the name is a C name like in the case of the `printf` and suggest the correct rust method. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-11-27Auto merge of #103917 - oli-obk:layout_math, r=RalfJung,lcnrbors-20/+115
Various cleanups around scalar layout restrictions Pulled out of https://github.com/rust-lang/rust/pull/103724
2022-11-26Rewrite dest prop.Jakob Degen-8/+9
This fixes a number of correctness issues from the previous version. Additionally, we use a new strategy which has much better performance charactersitics and also finds more opportunities to apply the optimization.
2022-11-26Revert "Do not need to account for overflow in predicate_can_apply"Michael Goulet-27/+0
This reverts commit cbe932801892da06688b53638622be1c8a1c8974.