about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-01-12Auto merge of #106757 - matthiaskrgr:rollup-9j8830g, r=matthiaskrgrbors-71/+3
Rollup of 10 pull requests Successful merges: - #106167 (Fix invalid syntax and incomplete suggestion in impl Trait parameter type suggestions for E0311) - #106309 (Prefer non-`[type error]` candidates during selection) - #106532 (Allow codegen to unsize `dyn*` to `dyn`) - #106596 (Hide more of long types in E0271) - #106638 (std tests: use __OsLocalKeyInner from realstd) - #106676 (Test that we cannot use trait impl methods arguments as defining uses) - #106702 (Conserve cause of `ImplDerivedObligation` in E0599) - #106732 (rustc_llvm: replace llvm::makeArrayRef with ArrayRef constructors.) - #106733 (Revert "warn newer available version of the x tool") - #106748 (Clean up `OnUnimplementedFormatString::verify`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-12Rollup merge of #106733 - DebugSteven:revert-104552-warn-newer-x, r=jyn514Matthias Krüger-71/+3
Revert "warn newer available version of the x tool" Reverts rust-lang/rust#104552 Running the x executable directly created an [issue](https://github.com/rust-lang/rust/issues/106469) here. There are other options for warning a user that a newer version of x exists in the issue's discussion as well. r? `@jyn514`
2023-01-12Auto merge of #106711 - albertlarsan68:use-ci-llvm-when-lld, r=jyn514bors-4/+0
Use CI LLVM in `test-various` builder It was disabled because it needs `lld`, but since #104748 was merged it is no longer needed. This will speed this test, since it no longer needs to build LLVM.
2023-01-11Rollup merge of #106734 - albertlarsan68:deny-src-tests-in-tidy, r=NilstriebMatthias Krüger-0/+17
Deny having src/test exisiting in tidy Fixes #106724
2023-01-11keep --wrapper-version argument in xDebugSteven-0/+8
2023-01-11Deny having src/test exisiting in tidyAlbert Larsan-0/+17
2023-01-11Revert "warn newer available version of the x tool"J Haigh-79/+3
2023-01-11Rollup merge of #106427 - mejrs:translation_errors, r=davidtwconils-1/+3
Improve fluent error messages These have been really frustrating me while migrating diagnostics.
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-129/+133
2023-01-11Move /src/test to /testsAlbert Larsan-849763/+0
2023-01-11Use CI LLVM in `test-various` builderAlbert Larsan-4/+0
It was disabled because it needs lld, but since 104748 was merged it is no longer needed.
2023-01-11Rollup merge of #106690 - GuillaumeGomez:item-declaration-scrolling, r=notriddleYuki Okushi-0/+177
Fix scrolling for item declaration block Fixes https://github.com/rust-lang/rust/issues/105580. The `contain: layout` was the issue here and the bug was actually on both mobile and desktop. r? `@notriddle`
2023-01-11Rollup merge of #106689 - GuillaumeGomez:rustdoc-gui-files-array, r=notriddleYuki Okushi-1/+2
Fix invalid files array re-creation in rustdoc-gui tester It fixes the error <code>expected `runTest` first argument to be a string</code>: ``` { file_name: { file_name: '/home/imperio/rust/rust/src/test/rustdoc-gui/type-declation-overflow.goml', output: 'type-declation-overflow... FAILED\n' + '...' }, output: Error: expected `runTest` first argument to be a string at runTest (/home/imperio/rust/rust/node_modules/browser-ui-test/src/index.js:591:15) at runTests (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:144:26) at main (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:278:15) } Error: expected `runTest` first argument to be a string at runTest (/home/imperio/rust/rust/node_modules/browser-ui-test/src/index.js:591:15) at runTests (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:144:26) at main (/home/imperio/rust/rust/src/tools/rustdoc-gui/tester.js:278:15) ``` The problem was that I concatenated two arrays of object whereas `files` is supposed to be an array of string. r? `@notriddle`
2023-01-11Rollup merge of #106653 - ehuss:allow-features-help, r=nilstriebYuki Okushi-1/+1
Fix help docs for -Zallow-features The arguments for -Zallow-features are comma-separated (`parse_opt_comma_list`), not space separated (`parse_list`).
2023-01-11Rollup merge of #106645 - c410-f3r:rfc-2397-1, r=oli-obkYuki Okushi-0/+63
[RFC 2397] Initial implementation cc #51992 Because of previous experiences where ppl didn't have the time to review large PRs (or any at all), the implementation of this feature will be delivered in small chunks to hopefully make things faster. In this initial PR, only the attribute is being declared and gated with ordinary tests.
2023-01-11Rollup merge of #106642 - albertlarsan68:test-106062, r=JohnTitorYuki Okushi-0/+42
Add test for #106062 Add a regression test for #106062 Closes #106062
2023-01-11Rollup merge of #106628 - GuillaumeGomez:rm-itemid-primitive, r=notriddleYuki Okushi-37/+61
Remove unneeded ItemId::Primitive variant As I mentioned [here](https://github.com/rust-lang/rust/pull/106412#issuecomment-1371405115), I wondered if `ItemId::Primitive` was actually used for anything. Apparently, it seems so because removing it led to no changes as far as I and tests could see. r? `@notriddle`
2023-01-11Rollup merge of #106521 - oskgo:remove-E0280, r=jackh726Yuki Okushi-44/+43
remove E0280 After looking at #61137 I tried my hand at E0280. I'm unable to find a reasonable example that emits the error. There are a couple of old examples that compile with the current compiler ([#26217](https://github.com/rust-lang/rust/issues/26217), [#42114](https://github.com/rust-lang/rust/issues/42114), [#27113](https://github.com/rust-lang/rust/issues/27113)) and there is a [bug with chalk](https://github.com/rust-lang/rust/blob/b7cdb635c4b973572307ad288466fba64533369c/src/test/ui/chalkify/bugs/async.rs) that makes it emit the error, with a couple more chalk bugs on zulip. It seems like the error is supposed to be emitted from unfulfilled where bounds, of which two are related to borrow checking (error in where T: 'a or where 'a: 'b) and thus tend to emit errors like "lifetime may not live long enough" from borrow checking instead. The final case is with type equality constraints (where <T as Iterator>::Item == u32), which is unimplemented ([#20041](https://github.com/rust-lang/rust/issues/20041)). That such different problems are supposed to have the same error code also seems strange to me. Since the error seems to only be emitted when using chalk I propose to remove it and replace it with an ICE instead. A crater run might be warranted. Pinging `@jackh726` due to removal of chalk test that now ICEs.
2023-01-10Remove unneeded ItemId::Primitive variantGuillaume Gomez-37/+61
2023-01-10Add GUI test for item declaration block scrollingGuillaume Gomez-0/+173
2023-01-10Fix scrolling for item declaration blockGuillaume Gomez-0/+4
2023-01-10Fix invalid files array re-creation in rustdoc-gui testerGuillaume Gomez-1/+2
2023-01-10bump Cargo submodule to fix CVE-2022-46176Pietro Albini-0/+0
2023-01-10disable fast submodule checkout due to spurious ci failuresPietro Albini-7/+8
2023-01-10Auto merge of #106607 - ↵bors-22/+133
compiler-errors:be-more-accurate-abt-method-suggestions, r=oli-obk Consider return type when giving various method suggestions 1. Fix a bug in method probe where we weren't normalizing `xform_ret_ty` for non-`impl` method candidates. This shouldn't affect happy-path code, since we only use `xform_ret_ty` when probing methods for diagnostics (I think). 2. Pass the return type expectation down to `lookup_probe`/`probe_for_name` usages in diagnostics. Added a few UI tests to gate against bad suggestions. 3. Make a `FnCtxt::lookup_probe_for_diagnostic` which properly passes down `IsSuggestion(true)`. Should help suppress other weird notes in some corner cases.
2023-01-10Auto merge of #106656 - JohnTitor:rollup-rk2qltg, r=JohnTitorbors-110/+450
Rollup of 9 pull requests Successful merges: - #105034 (Add example for iterator_flatten) - #105708 (Enable atomic cas for bpf targets) - #106175 (Fix bad import suggestion with nested `use` tree) - #106204 (No need to take opaques in `check_type_bounds`) - #106387 (Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`") - #106636 (Accept old spelling of Fuchsia target triples) - #106639 (update Miri) - #106640 (update test for inductive canonical cycles) - #106647 (rustdoc: merge common CSS for `a`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-10remove E0280 and ICE insteadbowlerman-44/+43
2023-01-10Auto merge of #106495 - JohnTitor:issue-100772, r=compiler-errorsbors-0/+11
Add regression test for #100772 Closes #100772 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-09[RFC 2397] Initial implementationCaio-0/+63
2023-01-10Rollup merge of #106647 - notriddle:notriddle/a, r=GuillaumeGomezYuki Okushi-4/+1
rustdoc: merge common CSS for `a`
2023-01-10Rollup merge of #106640 - lcnr:update-test, r=jackh726Yuki Okushi-43/+58
update test for inductive canonical cycles the previous test always resulted in a cycle :sweat_smile: cc https://github.com/rust-lang/chalk/pull/787. I checked with #102713 and this is the only test which fails with that PR. r? ``@jackh726``
2023-01-10Rollup merge of #106639 - RalfJung:miri, r=RalfJungYuki Okushi-35/+246
update Miri Notable PRs: - https://github.com/rust-lang/miri/pull/2748 - https://github.com/rust-lang/miri/pull/2752 r? `@ghost`
2023-01-10Rollup merge of #106636 - djkoloski:accept_old_fuchsia_triple, r=tmandryYuki Okushi-0/+2
Accept old spelling of Fuchsia target triples The old spelling of Fuchsia target triples was changed in #106429 to add a proper vendor. Because the old spelling is widely used, some projects may need time to migrate their uses to the new triple spelling. The old spelling may eventually be removed altogether. r? ``@tmandry``
2023-01-10Rollup merge of #106387 - jyn514:clippy, r=Mark-SimulacrumYuki Okushi-14/+41
Revert "bootstrap: Get rid of `tail_args` in `stream_cargo`" This reverts commit 9dfe50440e6d48bd2fd40a4b7b3992998e55eace. (Note: that merged as part of https://github.com/rust-lang/rust/pull/106305, but https://github.com/rust-lang/rust/pull/106305/ contains more commits than just 9dfe50440e6d48bd2fd40a4b7b3992998e55eace.) Fixes `x clippy`. It turns out `clippy` was the only one using `tail_args` 🤦 sorry for not testing this earlier. r? `@Mark-Simulacrum`
2023-01-10Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obkYuki Okushi-14/+102
Fix bad import suggestion with nested `use` tree Fixes #105566 Fixes #105373 Ideally, we'd find some way to turn these into structured suggestions -- perhaps on a separate line as a different `use` statement, but I have no idea how to access the span for the whole `use` from this point in the import resolution code.
2023-01-09Fix help docs for -Zallow-featuresEric Huss-1/+1
2023-01-09Auto merge of #105855 - arcnmx:rust-analyzer-2022-12, r=lnicolabors-5744/+14558
:arrow_up: rust-analyzer Updates rust-analyzer to https://github.com/rust-lang/rust-analyzer/commit/368e0bb32f1178cf162c2ce5f7e10b7ae211eb26 This is a continuation/replacement of #105834, close that if this is chosen instead.
2023-01-09:arrow_up: rust-analyzerarcnmx-5744/+14558
Merge commit '368e0bb32f1178cf162c2ce5f7e10b7ae211eb26'
2023-01-09Auto merge of #106637 - fee1-dead-contrib:rollup-ticvmsd, r=fee1-deadbors-1135/+2036
Rollup of 10 pull requests Successful merges: - #105292 (Change a commit_if_ok call to probe) - #105655 (Remove invalid case for mutable borrow suggestion) - #106047 (Fix ui constant tests for big-endian platforms) - #106061 (Enable Shadow Call Stack for Fuchsia on AArch64) - #106164 (Move `check_region_obligations_and_report_errors` to `TypeErrCtxt`) - #106291 (Fix incorrect suggestion for extra `&` in pattern) - #106389 (Simplify some canonical type alias names) - #106468 (Use FxIndexSet when updating obligation causes in `adjust_fulfillment_errors_for_expr_obligation`) - #106549 (Use fmt named parameters in rustc_borrowck) - #106614 (error-code docs improvements (No. 2)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-09rustdoc: merge common CSS for `a`Michael Howell-4/+1
2023-01-09hack: don't normalize xform_ret_ty for trait/object candidates unless neededMichael Goulet-14/+0
2023-01-09Consider method return type for various method suggestionsMichael Goulet-22/+147
2023-01-09Accept old spelling of Fuchsia target triplesDavid Koloski-0/+2
Because the old spelling is widely used, some projects may need time to migrate their uses to the new triple spelling. The old spelling may eventually be removed altogether.
2023-01-09Add test for issue 106062Albert Larsan-0/+42
2023-01-09update test for inductive canonical cycleslcnr-43/+58
2023-01-09Rollup merge of #106614 - Ezrashaw:ui-test-fixups-2, r=GuillaumeGomezfee1-dead-2/+51
error-code docs improvements (No. 2) - Added empty error-code docs for `E0208`, `E0640` and `E0717` with the "internal" header as discussed on Discord. - Wrote docs and UI test for `E0711`, again with the header. - `tidy` changes are common-sense and make everything pass, `style.rs` hack is annoying though. r? ```@GuillaumeGomez```
2023-01-09Rollup merge of #106291 - obeis:issue-106182, r=oli-obkfee1-dead-3/+48
Fix incorrect suggestion for extra `&` in pattern Closes #106182
2023-01-09Rollup merge of #106047 - uweigand:s390x-test-bigendian-ui, r=oli-obkfee1-dead-1130/+1716
Fix ui constant tests for big-endian platforms A number of tests under ui/const-ptr and ui/consts are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the stderr test files. Fix this by a combination of two types of changes: - Where possible (i.e. where the particular value of a constant does not affect the purpose of the test), choose constant values that have the same encoding on big- and little-endian platforms. - Where this is not possible, provide a normalize-stderr-test rule that transforms the printed big-endian encoding of such constants into the corresponding little-endian form. Fixes part of https://github.com/rust-lang/rust/issues/105383.
2023-01-09Rollup merge of #105655 - RedDocMD:bug-105645, r=oli-obkfee1-dead-0/+26
Remove invalid case for mutable borrow suggestion If we have a call such as `foo(&mut buf)` and after reference collapsing the type is inferred as `&T` where-as the required type is `&mut T`, don't suggest `foo(&mut mut buf)`. This is wrong syntactically and the issue lies elsewhere, not in the borrow. Fixes #105645
2023-01-09Rollup merge of #105292 - JulianKnodt:no_eager_commit, r=BoxyUwUfee1-dead-0/+195
Change a commit_if_ok call to probe Removes an over-eager `commit_if_ok` which makes inference worse. I'm not entirely sure whether it's ok to remove the check that types are the same, because casting seems to cause equality checks with incorrect types? Fixes #105037 r? ```@BoxyUwU```