about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-12-01Add GUI test for toggle filter and opacityGuillaume Gomez-0/+29
2022-12-01Auto merge of #105003 - flba-eb:only_windows, r=Mark-Simulacrumbors-25/+3
Run Windows-only tests only on Windows This removes the need to maintain an ignore-list of all other OSs. See https://github.com/rust-lang/rust/pull/102305 for a similar change.
2022-12-01More testsOli Scherer-1/+160
2022-12-01Ignore `gnu` systems (`windows-msvc` only)Florian Bartels-1/+2
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 #104975 - JakobDegen:custom_mir_let, r=oli-obkbors-17/+152
`#![custom_mir]`: Various improvements This PR makes a bunch of improvements to `#![custom_mir]`. Ideally this would be 4 PRs, one for each commit, but those would take forever to get merged and be a pain to juggle. Should still be reviewed one commit at a time though. ### Commit 1: Support arbitrary `let` Before this change, all locals used in the body need to be declared at the top of the `mir!` invocation, which is rather annoying. We attempt to change that. Unfortunately, we still have the requirement that the output of the `mir!` macro must resolve, typecheck, etc. Because of that, we can't just accept this in the THIR -> MIR parser because something like ```rust { let x = 0; Goto(other) } other = { RET = x; Return() } ``` will fail to resolve. Instead, the implementation does macro shenanigans to find the let declarations and extract them as part of the `mir!` macro. That *works*, but it is fairly complicated and degrades debuginfo by quite a bit. Specifically, the spans for any statements and declarations that are affected by this are completely wrong. My guess is that this is a net improvement though. One way to recover some of the debuginfo would be to not support type annotations in the `let` statements, which would allow us to parse like `let $stmt:stmt`. That seems quite surprising though. ### Commit 2: Parse consts Reuses most of the const parsing from regular Mir building for building custom mir ### Commit 3: Parse statics Statics are slightly weird because the Mir primitive associated with them is a reference/pointer to them, so this is factored out separately. ### Commit 4: Fix some spans A bunch of the spans were non-ideal, so we adjust them to be much more helpful. r? `@oli-obk`
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 #105063 - aDotInTheVoid:rdj-dont-assume-core, r=notriddleMatthias Krüger-1/+6
Rustdoc Json Tests: Don't assume that core::fmt::Debug will always have one item. See https://github.com/rust-lang/rust/pull/104525#issuecomment-1330837047 and https://github.com/rust-lang/rust/pull/104525#issuecomment-1331087852 for motivation. This still assumes that `fmt` is the first method, but thats alot less brittle than assuming it will be the only method. Sadly, we can't use a aux crate to insulate the tests from core changes, because core is special, so all we can do is try not to depend on things that may change.
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-11-30Rollup merge of #103065 - aDotInTheVoid:rdj-arg-pattern, r=GuillaumeGomezMatthias Krüger-0/+7
rustdoc-json: Document and Test that args can be patterns.
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-30Auto merge of #105080 - matthiaskrgr:rollup-7ffj4oe, r=matthiaskrgrbors-0/+70
Rollup of 5 pull requests Successful merges: - #104697 (Restore control flow on error in EUV) - #104811 (feat: implement TcpStream shutdown for wasm32-wasi) - #105039 (Fix an ICE parsing a malformed literal in `concat_bytes!`.) - #105071 (Add Nicholas Nethercote to `.mailmap`.) - #105079 (Add bots to `.mailmap`) Failed merges: - #105074 (Add Nicholas Bishop to `.mailmap`) r? `@ghost` `@rustbot` modify labels: rollup
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-30Auto merge of #104679 - dvdhrm:rw/dso, r=petrochenkovbors-0/+37
codegen-llvm: never combine DSOLocal and DllImport Prevent DllImport from being attached to DSOLocal definitions in the LLVM IR. The combination makes no sense, since definitions local to the compilation unit will never be imported from external objects. Additionally, LLVM will refuse the IR if it encounters the combination (introduced in [1]): ``` if (GV.hasDLLImportStorageClass()) Assert(!GV.isDSOLocal(), "GlobalValue with DLLImport Storage is dso_local!", &GV); ``` Right now, codegen-llvm will only apply DllImport to constants and rely on call-stubs for functions. Hence, we simply extend the codegen of constants to skip DllImport for any local definitions. This was discovered when switching the EFI targets to the static relocation model [2]. With this fixed, we can start another attempt at this. [1] https://smlnj-gitlab.cs.uchicago.edu/manticore/llvm/commit/509132b368efed10bbdad825403f45e9cf1d6e38 [2] https://github.com/rust-lang/rust/issues/101656
2022-11-29Improve spans in custom mirJakob Degen-34/+34
2022-11-29Support statics in custom mirJakob Degen-0/+40
2022-11-29Support most constant kinds in custom mirJakob Degen-0/+45
2022-11-29Support arbitrary `let` statements in custom mirJakob Degen-0/+50
2022-11-30Fix an ICE parsing a malformed literal in `concat_bytes!`.Nicholas Nethercote-0/+24
Fixes #104769.
2022-11-29Rollup merge of #105023 - tmiasko:asm-sym-static-reachable, r=wesleywiserMatthias Krüger-0/+20
Statics used in reachable function's inline asm are reachable Fixes #104925.
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-29Don't assume that core::fmt::Debug will always have one item.Nixon Enraght-Moony-1/+6
2022-11-29Make `missing_copy_implementations` more cautiousmejrs-0/+35
2022-11-29test/codegen: test inter-crate linkage with static relocationDavid Rheinsberg-0/+37
Add a codegen-test that verifies inter-crate linkage with the static relocation model. We expect all symbols that are part of a rust compilation to end up in the same DSO, thus we expect `dso_local` annotations.
2022-11-29v8a as default aarch64 targetTommy Chiang (oToToT)-0/+37
After https://github.com/llvm/llvm-project/commit/8689f5e landed, LLVM takes the intersection of v8a and v8r as default. This commit brings back v8a support by explicitly specifying v8a in the feature list. This should solve #97724.
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 #105027 - aDotInTheVoid:rdj-foreign-variant-test, ↵Matthias Krüger-0/+25
r=GuillaumeGomez Rustdoc-Json: Add tests for linking to foreign variants. I initially taught these would be bugs, but it turn out they work perfectly, and the variant is added to paths. Most of the work is done by jsondoclint checking all the ID's resolve (although this wont happen for links until #105015, which in turn is blocked on removing foreign traits), but we do check that neither the enum nor the variant is inlined, so it must be resolved correctly through paths. r? ``@GuillaumeGomez``
2022-11-29Rollup merge of #105024 - notriddle:notriddle/fnname, r=jyn514Matthias Krüger-32/+32
rustdoc: remove `fnname` CSS class that's styled exactly like `fn` It's not obvious why this was ever a separate class name, since even in c4219a478354b464079b1b7ab081e071e8e39765 when it was first added, it was styled identically to regular `fn` links.
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-28sparc-struct-abi: work around new tail-call optimizationAugie Fackler-0/+5
Upstream LLVM change https://reviews.llvm.org/D138741 introduced some new tail-call smarts for SPARC which broke some of the checks in this test. Rather than adjust the test expectations, we add an extra no-args function that can get tail-called or not without hurting the needs of the test.