about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-12-25Remove redundant clone suggestionEsteban Küber-24/+0
2022-12-25Create new inference contextEsteban Küber-1/+61
2022-12-25Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgrbors-74/+87
Rollup of 4 pull requests Successful merges: - #105375 (Fix an outdated comment mentioning parameter that doesn't exist anymore) - #105955 (Remove wrapper functions for some unstable options) - #106137 (fix more clippy::style findings) - #106140 (Migrate links-color.goml to functions) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-25Rollup merge of #106140 - GuillaumeGomez:migrate-links-color, r=notriddleMatthias Krüger-74/+87
Migrate links-color.goml to functions r? `@notriddle`
2022-12-25Auto merge of #105997 - RalfJung:immediate-abort, r=eholkbors-26/+46
abort immediately on bad mem::zeroed/uninit Now that we have non-unwinding panics, let's use them for these assertions. This re-establishes the property that `mem::uninitialized` and `mem::zeroed` will never unwind -- the earlier approach of causing panics here sometimes led to hard-to-debug segfaults when the surrounding code was not able to cope with the unexpected unwinding. Cc `@bjorn3` I did not touch cranelift but I assume it needs a similar patch. However it has a `codegen_panic` abstraction that I did not want to touch since I didn't know how else it is used.
2022-12-25Migrate links-color.goml to functionsGuillaume Gomez-74/+87
2022-12-25Remove references to removed option from tests.Camille GILLOT-120/+13
2022-12-25Give the correct track-caller location with MIR inlining.Camille GILLOT-16/+20
2022-12-25Bless incremental test.Camille GILLOT-2/+2
2022-12-25Adapt codegen test.Camille GILLOT-3/+6
2022-12-25Remove Nop in simplify_locals.Camille GILLOT-54/+0
It's cheap and does not change anything.
2022-12-25Move SimplifyLocals before ConstProp.Camille GILLOT-433/+332
2022-12-25Make tests unit.Camille GILLOT-17/+22
2022-12-25fix codegen testRalf Jung-8/+8
2022-12-25Auto merge of #105701 - RedDocMD:bug-105634, r=cjgillotbors-0/+8
Allow .. to be parsed as let initializer .. and ..= are valid expressions, however when used in a let statement it is not parsed. Fixes #105634
2022-12-25Auto merge of #106132 - kadiwa4:typos, r=compiler-errorsbors-4/+4
Fix some typos
2022-12-25fix some typosKaDiWa-4/+4
2022-12-24Bubble up ErrorGuaranteed from region constraints in method item compareMichael Goulet-25/+4
2022-12-24Auto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddlebors-4/+40
Migrate toggle-line-inner background to CSS variable r? `@notriddle`
2022-12-24Auto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJungbors-0/+413
Stop promoting all the things fixes #91009 r? `@RalfJung`
2022-12-24Rollup merge of #106109 - notriddle:notriddle/source-lines, r=GuillaumeGomezMatthias Krüger-14/+44
rustdoc: make line number CSS for doc comment and scraped the same ![image](https://user-images.githubusercontent.com/1593513/209423540-2657bb43-e6d7-4af3-9cb3-c790a8dd8cd9.png) Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling Preview: http://notriddle.com/notriddle-rustdoc-demos/source-lines/test_dingus/fn.test.html
2022-12-24Rollup merge of #106100 - scottmcm:derived-less-than-test, r=compiler-errorsMatthias Krüger-0/+49
Codegen test for derived `<` on trivial newtype [TEST ONLY] I originally wrote this for #106065, but the libcore changes there aren't necessarily a win. So I pulled out this test to be its own PR since it's important (see https://github.com/rust-lang/rust/pull/105840#discussion_r1056030324) and well-intentioned changes to core or the derive could accidentally break it without that being obvious (other than by massive unexplained perf changes).
2022-12-24Rollup merge of #105872 - chenyukang:yukang/fix-105494-remove-method-call, ↵Matthias Krüger-0/+76
r=eholk Suggest remove last method call when type coerce with expected type Fixes #105494
2022-12-24ignore some targetsRalf Jung-0/+2
2022-12-24Extend GUI test for toggle-line backgroundGuillaume Gomez-4/+40
2022-12-23rustdoc: make line number CSS for doc comment and scraped the sameMichael Howell-14/+44
Discussed in https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling
2022-12-24Rollup merge of #106069 - notriddle:notriddle/search-tabs, r=GuillaumeGomezMatthias Krüger-39/+40
rustdoc: use a more evocative name for CSS/JS `#titles` This renames the ID, which is only used in search results, to `#search-tabs`. Also changes the `.count` to a span, so it doesn't need its display mode to be overridden.
2022-12-24Rollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomezMatthias Krüger-0/+28
docs/test: add UI test and long-form error docs for E0462 Another UI test/ docs combo. r? ``@GuillaumeGomez``
2022-12-23Codegen test for derived `<` on trivial newtype [TEST ONLY]Scott McMurray-0/+49
2022-12-23Verify receiver is of `self: Pin<&mut Self>`Esteban Küber-4/+0
2022-12-23Suggest `.clone()` on method call move errorsEsteban Küber-0/+44
2022-12-23Suggest `Pin::as_mut` when encountering borrow errorEsteban Küber-0/+57
2022-12-23Rollup merge of #106055 - compiler-errors:too-many-calls, r=estebanknils-0/+95
Check arg expressions properly on error in `confirm_builtin_call` Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: https://github.com/rust-lang/rust/pull/105973#issuecomment-1363152232 Fixes #106030 Fixes #105244
2022-12-23Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkovnils-17/+0
Move tests r? ``@petrochenkov`` * 6470 is an ancient LLVM compilation bug * 22375 to typeck because of https://github.com/rust-lang/rust/pull/23013
2022-12-23Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errorsnils-0/+54
implement the skeleton of the updated trait solver cc ```@rust-lang/initiative-trait-system-refactor``` This is mostly following the architecture discussed in the types team meetup. After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible. This somewhat closely mirrors the current `evaluate` implementation with the following notable differences: - it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive) - it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful) - it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality) - it is implemented to work with lazy normalization A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work. r? ```@compiler-errors``` / ```@rust-lang/types``` :3
2022-12-23Move testsCaio-17/+0
2022-12-23Add testsMichael Goulet-0/+43
2022-12-22rustdoc: fix race condition in GUI testMichael Howell-0/+1
2022-12-22rustdoc: use a more evocative name for CSS/JS `#titles`Michael Howell-39/+39
This renames the ID, which is only used in search results, to `#search-tabs`. Also changes the `.count` to a span, so it doesn't need its display mode to be overridden.
2022-12-23Rollup merge of #105978 - jyn514:unused_proc_macro_decl, r=tmiaskoMatthias Krüger-0/+1
Mark `proc_macro_decls_static` as always used This would have avoided a bug in https://github.com/rust-lang/rust/pull/104860. In practice this shouldn't matter since nothing uses the query other than the `dead_code` lint, but this isn't documented as an internal-only query so it seems nice for it to be accurate. I think for `dead_code` it doesn't matter because the relevant code is generated by `rustc_builtin_macros` and isn't linted. I think `@tmiasko` or `@bjorn3` would be a good reviewer? r? `@tmiasko`
2022-12-23Always suggest as `MachineApplicable` in `recover_intersection_pat`Yuki Okushi-23/+75
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-23docs/test: add UI test and long-form error docs for E0462Ezra Shaw-0/+28
2022-12-22Fix `explicit_outlives_requirements` lint in macrosLukas Markeffsky-3/+66
Show the suggestion if and only if the bounds are from the same source context.
2022-12-22Auto merge of #106054 - matthiaskrgr:rollup-38epsfh, r=matthiaskrgrbors-11/+194
Rollup of 6 pull requests Successful merges: - #105567 (KCFI test: Also support LLVM 16 output) - #105847 (Ensure param-env is const before calling `eval_to_valtree`) - #105983 (Add a missing early return in drop tracking `handle_uninhabited_return`) - #106027 (rustdoc: simplify CSS and DOM for more-scraped-examples) - #106035 (Migrate search tab title color to CSS variable) - #106037 (Add regression test for #94293) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Rollup merge of #106037 - JohnTitor:issue-94293, r=lcnrMatthias Krüger-0/+31
Add regression test for #94293 Closes #94293 r? ```@lcnr``` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22Rollup merge of #106035 - ↵Matthias Krüger-0/+15
GuillaumeGomez:migrate-css-var-search-tab-title-color, r=notriddle Migrate search tab title color to CSS variable r? ```@notriddle```
2022-12-22Rollup merge of #106027 - notriddle:notriddle/more-scraped-examples-inner, ↵Matthias Krüger-5/+5
r=GuillaumeGomez rustdoc: simplify CSS and DOM for more-scraped-examples This gets rid of the more-scraped-examples-inner wrapper, instead nesting the children directly and using absolute positioning for the toggle line.
2022-12-22Rollup merge of #105983 - compiler-errors:issue-105981, r=tmiaskoMatthias Krüger-0/+93
Add a missing early return in drop tracking `handle_uninhabited_return` This return is needed so we don't call `Ty::is_inhabited_from` from a type with ty/ct vars in it. Fixes #105981
2022-12-22Rollup merge of #105847 - compiler-errors:issue-104396, r=oli-obkMatthias Krüger-0/+47
Ensure param-env is const before calling `eval_to_valtree` Other queries call `ParamEnv::with_const` *inside* of the query itself (e.g. `const_eval_global_id_for_typeck`), so this could alternatively be moved into the provider of `eval_to_valtree` instead. I don't have a particularly strong opinion, though *theoretically* caching is better if we make the query keys more constrained. I'm not exactly sure how this is an effect of the `-Zmir-opt-level=3` flag. Maybe something about the inliner causes us to inline an unevaluated const into a body where it can be evaluated, but where it has not yet been normalized. This seems likely, since we're inlining `from_fn_1::<{ N / 2 }, _>` in `from_fn_2`, which means that we will need to evaluate that constant during the const prop pass after inlining. Fixes #104396
2022-12-22Rollup merge of #105567 - TimNN:kcfi16, r=nikicMatthias Krüger-6/+3
KCFI test: Also support LLVM 16 output With a regex we can support the LLVM 16 output now already (and there are some third-party build bots that test Rust with LLVM head, like https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds?branch=master). cc ```@rcvalle```