about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-12-02Rollup merge of #105163 - compiler-errors:afit-lt-arity, r=jackh726Matthias Krüger-0/+41
Check lifetime param count in `collect_trait_impl_trait_tys` We checked the type and const generics count, but not the lifetimes, which were handled in a different function. Fixes #105154
2022-12-02Rollup merge of #105162 - compiler-errors:fn-sig-arity, r=cjgillotMatthias Krüger-0/+17
Properly synthesize `FnSig` value during cycle Get the arity correct when creating a `FnSig` type during `tcx.fn_sig` cycle recovery Fixes #105152
2022-12-02Rollup merge of #105033 - durin42:llvm-16-dont-tail-call-me-bro, r=tmandryMatthias Krüger-0/+5
sparc-struct-abi: work around new tail-call optimization 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. r? ``@nikic``
2022-12-02Rollup merge of #105026 - oToToT:aarch64-v8a, r=davidtwcoMatthias Krüger-0/+37
v8a as default aarch64 target 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. p.s. a bit more context can also be found in https://github.com/llvm/llvm-project/issues/57904#issuecomment-1329555590.
2022-12-02Auto merge of #104863 - nnethercote:reduce-lint-macros, r=cjgillotbors-200/+94
Reduce macro usage for lints r? `@cjgillot`
2022-12-02Rollup merge of #105143 - notriddle:notriddle/scraped-example-list-font, ↵Matthias Krüger-0/+31
r=GuillaumeGomez rustdoc: use simpler CSS for setting the font on scraped examples
2022-12-02Rollup merge of #105132 - GuillaumeGomez:migrate-summary-toggle-to-var, ↵Matthias Krüger-0/+29
r=notriddle Migrate summary toggle filter to CSS variable r? `@notriddle`
2022-12-02Rollup merge of #104614 - Nilstrieb:type-ascribe!, r=TaKO8KiMatthias Krüger-224/+198
Add `type_ascribe!` macro as placeholder syntax for type ascription This makes it still possible to test the internal semantics of type ascription even once the `:`-syntax is removed from the parser. The macro now gets used in a bunch of UI tests that test the semantics and not syntax of type ascription. I might have forgotten a few tests but this should hopefully be most of them. The remaining ones will certainly be found once type ascription is removed from the parser altogether. Part of #101728
2022-12-01Properly synthesize fn sig value during cycleMichael Goulet-0/+17
2022-12-02Auto merge of #104963 - petrochenkov:noaddids2, r=cjgillotbors-47/+40
rustc_ast_lowering: Stop lowering imports into multiple items Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
2022-12-02Merge `builtins` into `EarlyLintPassObjects`.Nicholas Nethercote-129/+86
This avoids calling `early_lint_node` twice. Note: one `early_lint_node` call had `!pre_expansion` for the second argument and the other had `false`. The new single call just has `!pre_expansion`. This results in a reduction of duplicate error messages in some `ui-fulldeps` tests. The order of some `ui-fulldeps` output also changes, but that doesn't matter.
2022-12-02Check lifetime param count in collect_trait_impl_trait_tysMichael Goulet-0/+41
2022-12-02Remove `-Zno-interleave-lints`.Nicholas Nethercote-71/+8
Because it complicates lint implementation greatly.
2022-12-01rustdoc: use simpler CSS for setting the font on scraped examplesMichael Howell-0/+31
2022-12-01Auto merge of #105125 - matthiaskrgr:rollup-fr0snmj, r=matthiaskrgrbors-0/+49
Rollup of 4 pull requests Successful merges: - #105078 (Fix `expr_to_spanned_string` ICE) - #105087 (Extract llvm datalayout parsing out of spec module) - #105088 (rustdoc: remove redundant CSS `div.desc { display: block }`) - #105106 (Fix ICE from #105101) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-01rustc_ast_lowering: Stop lowering imports into multiple itemsVadim Petrochenkov-47/+40
Lower them into a single item with multiple resolutions instead. This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
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-01Ignore `gnu` systems (`windows-msvc` only)Florian Bartels-1/+2
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-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-11-30Add a regression test for #104322Georg Semmler-0/+80
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-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