about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-01-11Auto merge of #105919 - uweigand:s390x-stack-overflow, r=Nilstriebbors-1/+2
Fix stack overflow in recursive AST walk in early lint The src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs test case added to verify https://github.com/rust-lang/rust/issues/74564 still crashes with a stack overflow on s390x-ibm-linux. Symptom is a very deep recursion in compiler/rustc_lint/src/early.rs: fn visit_expr(&mut self, e: &'a ast::Expr) { self.with_lint_attrs(e.id, &e.attrs, |cx| { lint_callback!(cx, check_expr, e); ast_visit::walk_expr(cx, e); }) } (where walk_expr recursively calls back into visit_expr). The crash happens at a nesting depth of over 17000 stack frames when using the default 8 MB stack size on s390x. This patch fixes the problem by adding a ensure_sufficient_stack call to the with_lint_attrs routine (which also should take care of all the other mutually recursive visitors here). Fixes part of https://github.com/rust-lang/rust/issues/105383.
2023-01-11Auto merge of #106708 - JohnTitor:rollup-xcmg5yv, r=JohnTitorbors-134/+455
Rollup of 14 pull requests Successful merges: - #105194 (Add comment to cleanup_kinds) - #106521 (remove E0280) - #106628 (Remove unneeded ItemId::Primitive variant) - #106635 (std sync tests: better type name, clarifying comment) - #106642 (Add test for #106062) - #106645 ([RFC 2397] Initial implementation) - #106653 (Fix help docs for -Zallow-features) - #106657 (Remove myself from rust-lang/rust reviewers) - #106662 (specialize impl of `ToString` on `bool`) - #106669 (create helper function for `rustc_lint_defs::Level` and remove it's duplicated code) - #106671 (Change flags with a fixed default value from Option<bool> to bool) - #106689 (Fix invalid files array re-creation in rustdoc-gui tester) - #106690 (Fix scrolling for item declaration block) - #106698 (Add compiler-errors to some trait system notification groups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-11Rollup merge of #106698 - compiler-errors:notify-mr-errs, r=Mark-SimulacrumYuki Okushi-2/+2
Add compiler-errors to some trait system notification groups I care about these areas of the compiler.
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 #106671 - tmiasko:opt-bool, r=wesleywiserYuki Okushi-6/+6
Change flags with a fixed default value from Option<bool> to bool
2023-01-11Rollup merge of #106669 - ozkanonur:helper-function-for-lint-level, r=NilstriebYuki Okushi-20/+15
create helper function for `rustc_lint_defs::Level` and remove it's duplicated code Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-01-11Rollup merge of #106662 - Ezrashaw:specialize-bool-tostring, r=cuviperYuki Okushi-0/+9
specialize impl of `ToString` on `bool` Fixes #106611 Specialize `bool`s `ToString` impl by copying it from `Display`. This is a significant optimization as we avoid lots of dynamic dispatch. AFAIK, this doesn't require a API Change Proposal as this doesn't regress existing code and can be undone without regressing code.
2023-01-11Rollup merge of #106657 - jyn514:review, r=Mark-SimulacrumYuki Okushi-2/+0
Remove myself from rust-lang/rust reviewers I don't have time to both review and work on my foundation grant.
2023-01-11Rollup merge of #106653 - ehuss:allow-features-help, r=nilstriebYuki Okushi-2/+2
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/+69
[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 #106635 - RalfJung:std-test-nits, r=thomccYuki Okushi-12/+12
std sync tests: better type name, clarifying comment Just resolving some confusion that I encountered while reading these tests. r? `@thomcc`
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-52/+55
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-11Rollup merge of #105194 - tmiasko:cleanup-kinds, r=davidtwcoYuki Okushi-0/+3
Add comment to cleanup_kinds based on the original commit message 1ae7ae0c1c7ed68c616273f245647afa47f3cbde
2023-01-11Add compiler-errors to some trait system notification groupsMichael Goulet-2/+2
2023-01-10Auto merge of #106687 - pietroalbini:pa-cve-nightly, r=pietroalbinibors-13/+39
[nightly] Fix CVE-2022-46176 See https://blog.rust-lang.org/2023/01/10/cve-2022-46176.html r? `@ghost`
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-10update release notes for 1.66.1Pietro Albini-0/+5
2023-01-10bump Cargo submodule to fix CVE-2022-46176Pietro Albini-6/+26
2023-01-10disable fast submodule checkout due to spurious ci failuresPietro Albini-7/+8
2023-01-10Change type of box_noalias to boolTomasz Miąsko-3/+3
2023-01-10Change type of mutable_noalias to boolTomasz Miąsko-3/+3
2023-01-10Add comment to cleanup_kindsTomasz Miąsko-0/+3
based on the original commit message 1ae7ae0c1c7ed68c616273f245647afa47f3cbde
2023-01-10create helper function for `rustc_lint_defs::Level` and remove it's ↵ozkanonur-20/+15
duplicated code r=ozkanonur Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-01-10Auto merge of #106607 - ↵bors-107/+329
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-177/+553
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-10impl: specialize impl of `ToString` on `bool`Ezra Shaw-0/+9
2023-01-10remove E0280 and ICE insteadbowlerman-52/+55
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/+69
2023-01-09Remove myself from rust-lang/rust reviewersJoshua Nelson-2/+0
I don't have time to both review and work on my foundation grant.
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-1/+9
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 #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obkYuki Okushi-36/+14
No need to take opaques in `check_type_bounds` `InferCtxt` already has its defining use anchor set to err r? ``@oli-obk``
2023-01-10Rollup merge of #106175 - compiler-errors:bad-import-sugg, r=oli-obkYuki Okushi-43/+167
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-10Rollup merge of #105708 - tomerze:enable-atomic-cas-bpf, r=nagisaYuki Okushi-1/+5
Enable atomic cas for bpf targets It seems like LLVM now supports it. https://reviews.llvm.org/D72184 - the PR in LLVM
2023-01-10Rollup merge of #105034 - HintringerFabian:improve_iterator_flatten_doc, ↵Yuki Okushi-0/+12
r=cuviper Add example for iterator_flatten Adds an Example to iterator_flatten Fixes #82687
2023-01-09Fix help docs for -Zallow-featuresEric Huss-2/+2
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-09Add issue number to FIXMEsTyler Mandry-2/+2
2023-01-09Auto merge of #106637 - fee1-dead-contrib:rollup-ticvmsd, r=fee1-deadbors-1336/+2284
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