about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-10-28Emit proper error when casting to Ddyn-starMichael Goulet-1/+65
2022-10-28Auto merge of #102674 - CastilloDel:master, r=oli-obkbors-15/+14
Remove allow(rustc::potential_query_instability) in rustc_const_eval The use of FxHashMap has been replaced with FxIndexMap. Related to #84447
2022-10-28Auto merge of #103671 - matthiaskrgr:rollup-iuugpep, r=matthiaskrgrbors-114/+928
Rollup of 5 pull requests Successful merges: - #102642 (Add tests for static async functions in traits) - #103283 (Add suggestions for unsafe impl error codes) - #103523 (Fix unwanted merge of inline doc comments for impl blocks) - #103550 (diagnostics: do not suggest static candidates as traits to import) - #103641 (Don't carry MIR location in `ConstraintCategory::CallArgument`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-28Auto merge of #103672 - matthiaskrgr:rollup-dyk3civ, r=matthiaskrgrbors-113/+180
Rollup of 6 pull requests Successful merges: - #103585 (Migrate source line numbers CSS to CSS variables) - #103608 (Remap early bound lifetimes in return-position `impl Trait` in traits too) - #103609 (Emit a nicer error on `impl Self {`) - #103631 (Add test for issue 36007) - #103643 (rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags) - #103645 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-28Rollup merge of #103645 - weihanglo:update-cargo, r=weihangloMatthias Krüger-0/+0
Update cargo 6 commits in 9210810d1fd7b51ae0439a0a363cc50e36963455..7e484fc1a766f56dbc95380f45719698e0c82749 2022-10-25 22:31:50 +0000 to 2022-10-27 15:20:57 +0000 - fix(publish): Block until it is in index (rust-lang/cargo#11062) - Add Accept-Encoding request header to enable compression (rust-lang/cargo#11292) - Update contrib docs for highfive transition (rust-lang/cargo#11294) - Migrate from highfive to triagebot (rust-lang/cargo#11293) - Fix dupe word typos (rust-lang/cargo#11287) - Fix confusing error messages when using -Zsparse-registry (rust-lang/cargo#11283)
2022-10-28Rollup merge of #103643 - notriddle:notriddle/summary-focus-visible, ↵Matthias Krüger-4/+2
r=GuillaumeGomez rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags We really shouldn't be overriding this kind of stuff unless the browser default is really broken (like outlining the thing that isn't clickable). This directly reverts b8f4e74cbc938d3448507d422c98061c2b71c922.
2022-10-28Rollup merge of #103631 - Rageking8:Add-test-for-issue-36007, r=compiler-errorsMatthias Krüger-0/+20
Add test for issue 36007 Fixes #36007 r? ``@compiler-errors``
2022-10-28Rollup merge of #103609 - BoxyUwU:fix_impl_self_cycle, r=compiler-errorsMatthias Krüger-76/+74
Emit a nicer error on `impl Self {` currently it emits a "cycle detected error" but this PR makes it emit a more user friendly error specifically saying that `Self` is disallowed in that position. this is a pretty hacky fix so i dont expect this to be merged (I basically only made this PR because i wanted to see if CI passes) r? ``@compiler-errors``
2022-10-28Rollup merge of #103608 - compiler-errors:rpitit-early-lt, r=cjgillotMatthias Krüger-1/+24
Remap early bound lifetimes in return-position `impl Trait` in traits too Fixes part of #103457 r? ``@cjgillot,`` though feel free to reassign, just thought you'd have sufficient context to review.
2022-10-28Rollup merge of #103585 - GuillaumeGomez:source-line-css, r=notriddleMatthias Krüger-32/+60
Migrate source line numbers CSS to CSS variables Part of https://github.com/rust-lang/rust/pull/98460. No UI changes. r? ``@notriddle``
2022-10-28Rollup merge of #103641 - compiler-errors:issue-103624, r=cjgillotMatthias Krüger-100/+165
Don't carry MIR location in `ConstraintCategory::CallArgument` It turns out that `ConstraintCategory::CallArgument` cannot just carry a MIR location in it, since we may bubble them up to totally different MIR bodies. So instead, revert the commit a6b5f95fb028f9feb4a2957c06b35035be2c6155, and instead just erase regions from the original `Option<Ty<'tcx>>` that it carried, so that it doesn't ICE with the changes in #103220. Best reviewed in parts -- the first is just a revert, and the second is where the meaningful changes happen. Fixes #103624
2022-10-28Rollup merge of #103550 - notriddle:notriddle/no-suggest-static-candidates, ↵Matthias Krüger-6/+52
r=wesleywiser diagnostics: do not suggest static candidates as traits to import If it's a static candidate, then it's already implemented. Do not suggest it a second time for implementing. Partial fix for #102354
2022-10-28Rollup merge of #103523 - GuillaumeGomez:inline-doc-comment-impl-block, ↵Matthias Krüger-8/+48
r=notriddle Fix unwanted merge of inline doc comments for impl blocks Fixes https://github.com/rust-lang/rust/issues/102909. We need this merge mechanism for inlined items but it's completely unwanted for impl blocks (at least the doc comments are, not the other attributes) since we want to keep what `cfg()` is put on the `pub use` or other attributes. r? ``@notriddle``
2022-10-28Rollup merge of #103283 - nbarrios1337:unsafe-impl-suggestions, r=cjgillotMatthias Krüger-0/+84
Add suggestions for unsafe impl error codes Adds suggestions for users to add `unsafe` to trait impls that should be `unsafe`, and remove `unsafe` from trait impls that do not require `unsafe` With the folllowing code: ```rust struct Foo {} struct Bar {} trait Safe {} unsafe trait Unsafe {} impl Safe for Foo {} // ok impl Unsafe for Foo {} // E0200 unsafe impl Safe for Bar {} // E0199 unsafe impl Unsafe for Bar {} // ok // omitted empty main fn ``` The current rustc output is: ``` error[E0199]: implementing the trait `Safe` is not unsafe --> e0200.rs:13:1 | 13 | unsafe impl Safe for Bar {} // E0199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0200]: the trait `Unsafe` requires an `unsafe impl` declaration --> e0200.rs:11:1 | 11 | impl Unsafe for Foo {} // E0200 | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to 2 previous errors Some errors have detailed explanations: E0199, E0200. For more information about an error, try `rustc --explain E0199`. ``` With this PR, the future rustc output would be: ``` error[E0199]: implementing the trait `Safe` is not unsafe --> ../../temp/e0200.rs:13:1 | 13 | unsafe impl Safe for Bar {} // E0199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: remove `unsafe` from this trait implementation | 13 - unsafe impl Safe for Bar {} // E0199 13 + impl Safe for Bar {} // E0199 | error[E0200]: the trait `Unsafe` requires an `unsafe impl` declaration --> ../../temp/e0200.rs:11:1 | 11 | impl Unsafe for Foo {} // E0200 | ^^^^^^^^^^^^^^^^^^^^^^ | = note: the trait `Unsafe` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword help: add `unsafe` to this trait implementation | 11 | unsafe impl Unsafe for Foo {} // E0200 | ++++++ error: aborting due to 2 previous errors Some errors have detailed explanations: E0199, E0200. For more information about an error, try `rustc --explain E0199`. ``` ``@rustbot`` label +T-compiler +A-diagnostics +A-suggestion-diagnostics
2022-10-28Rollup merge of #102642 - bryangarza:afit-tests, r=compiler-errorsMatthias Krüger-0/+579
Add tests for static async functions in traits This patch adds test cases for AFIT, the majority of which are currently expected to run as `check-fail`. --- Note: I grabbed the cases from https://hackmd.io/SwRcXCiWQV-WRJ4BYs53fA Also, I'm not sure if the `async-associated-types2` and `async-associated-types2-desugared` are correct, I modified them a bit from the examples in the HackMD.
2022-10-28Auto merge of #103654 - flip1995:clippy_backport, r=Manishearthbors-3/+2
Move clippy::uninlined_format_args back to pedantic Before `beta` is branched tomorrow we want to move this lint back to `pedantic` so that it is not enabled by default. Clippy PR: https://github.com/rust-lang/rust-clippy/pull/9728 Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/.60uninlined_format_args.60.20category/near/306306974 r? `@Manishearth`
2022-10-27Update tests based on feedbackBryan Garza-26/+7
- Add comment to some tests that will break when #102745 is implemented - Mark a test with known-bug - Delete duplicate test
2022-10-27Update src/test/ui/async-await/in-trait/async-example.rsBryan Garza-2/+2
Co-authored-by: Michael Goulet <michael@errs.io>
2022-10-27Add additional tests for static AFITBryan Garza-0/+169
2022-10-27Update tests based on feedbackBryan Garza-33/+48
2022-10-27Update static AFIT tests based on feedbackBryan Garza-144/+28
2022-10-27Add tests for static async functions in traitsBryan Garza-0/+530
This patch adds test cases for AFIT, the majority of which are currently expected to run as `check-fail`.
2022-10-27Auto merge of #103629 - matthiaskrgr:rollup-r94tqfa, r=matthiaskrgrbors-217/+467
Rollup of 8 pull requests Successful merges: - #103110 (remove redundant Send impl for references) - #103255 (Clean up hidden type registration) - #103394 (Clarify documentation about the memory layout of `UnsafeCell`) - #103408 (Clean return-position `impl Trait` in traits correctly in rustdoc) - #103505 (rustdoc: parse self-closing tags and attributes in `invalid_html_tags`) - #103524 (rustc_metadata: Add struct and variant constructors to module children at encoding time) - #103544 (Add flag to forbid recovery in the parser) - #103616 (rustdoc: remove CSS workaround for Firefox 29) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-27tidy + move logic to fnBoxy-31/+30
2022-10-27use proper spansBoxy-28/+54
2022-10-27DoItBoxy-83/+56
2022-10-27Move clippy::uninlined_format_args back to pedanticPhilipp Krones-3/+2
2022-10-28Update cargoWeihang Lo-0/+0
6 commits in 9210810d1fd7b51ae0439a0a363cc50e36963455..7e484fc1a766f56dbc95380f45719698e0c82749 2022-10-25 22:31:50 +0000 to 2022-10-27 15:20:57 +0000 - fix(publish): Block until it is in index (rust-lang/cargo#11062) - Add Accept-Encoding request header to enable compression (rust-lang/cargo#11292) - Update contrib docs for highfive transition (rust-lang/cargo#11294) - Migrate from highfive to triagebot (rust-lang/cargo#11293) - Fix dupe word typos (rust-lang/cargo#11287) - Fix confusing error messages when using -Zsparse-registry (rust-lang/cargo#11283)
2022-10-27rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tagsMichael Howell-4/+2
We really shouldn't be overriding this kind of stuff unless the browser default is really broken (like outlining the thing that isn't clickable). This directly reverts b8f4e74cbc938d3448507d422c98061c2b71c922.
2022-10-27Erase regions from CallArgument, add test + blessMichael Goulet-7/+73
2022-10-27Revert "Make ClosureOutlivesRequirement not rely on an unresolved type"Michael Goulet-94/+93
This reverts commit a6b5f95fb028f9feb4a2957c06b35035be2c6155.
2022-10-27add test for issue 36007Rageking8-0/+20
2022-10-27Rollup merge of #103616 - rust-lang:notriddle/moz-box-sizing, r=GuillaumeGomezMatthias Krüger-3/+1
rustdoc: remove CSS workaround for Firefox 29 CSS variables, which rustdoc now relies on, are only supported in Firefox 31 and later: https://www.mozilla.org/en-US/firefox/31.0/releasenotes/ This means it’s fine to also rely on unprefixed box-sizing, which is supported in Firefox 29 and later: https://www.mozilla.org/en-US/firefox/29.0/releasenotes/
2022-10-27Rollup merge of #103544 - Nilstrieb:no-recovery-pls, r=compiler-errorsMatthias Krüger-2/+31
Add flag to forbid recovery in the parser To start the effort of fixing #103534, this adds a new flag to the parser, which forbids the parser from doing recovery, which it shouldn't do in macros. This doesn't add any new checks for recoveries yet and is just here to bikeshed the names for the functions here before doing more. r? `@compiler-errors`
2022-10-27Rollup merge of #103524 - petrochenkov:modchild4, r=cjgillotMatthias Krüger-50/+53
rustc_metadata: Add struct and variant constructors to module children at encoding time instead of decoding time. Continuation of https://github.com/rust-lang/rust/pull/95899. The last time it caused some ICEs from generator use, but not everything seems ok.
2022-10-27Rollup merge of #103505 - notriddle:notriddle/rustdoc-self-closing-tags, ↵Matthias Krüger-1/+204
r=GuillaumeGomez rustdoc: parse self-closing tags and attributes in `invalid_html_tags` Fixes #103460
2022-10-27Rollup merge of #103408 - compiler-errors:rpitit-rustdoc, r=GuillaumeGomezMatthias Krüger-53/+94
Clean return-position `impl Trait` in traits correctly in rustdoc Fixes #103403
2022-10-27Rollup merge of #103394 - Pointerbender:unsafecell-docs, r=AmanieuMatthias Krüger-25/+36
Clarify documentation about the memory layout of `UnsafeCell` This PR addresses a [comment](https://github.com/rust-lang/rust/pull/101717#issuecomment-1279908390) by `@RalfJung` in PR #101717 to further clarify the documentation of `UnsafeCell<T>`. The previous PR was merged already before we had a chance to correct this, hence this second PR :) To goal of this PR is: 1. Split the paragraph about the memory layout of `UnsafeCell<T>` and the usage of `UnsafeCell::(raw_)get()` into two paragraphs, so that it is easier to digest for the reader. 2. Slightly simplify the previously added examples in order to reduce redundancy between the new examples and the examples that already [existed](https://github.com/rust-lang/rust/blob/ddd119b2fed57eb6b19c44c18108de95c564a48d/library/core/src/cell.rs#L1858-L1908) before these 2 PRs (which remained untouched by both PRs).
2022-10-27Rollup merge of #103255 - oli-obk:opaque_wrong_eq_relation, r=compiler-errorsMatthias Krüger-75/+41
Clean up hidden type registration work on https://github.com/rust-lang/rust/issues/101186 Actually passing down the relation and using it instead of `eq` for the hidden type comparison has *no* effect whatsoever and allows for no further improvements at the call sites. I decided the increased complexity was not worth it and thus did not include that change in this PR. r? `@compiler-errors`
2022-10-27Rollup merge of #103110 - RalfJung:manual-send, r=thomccMatthias Krüger-8/+7
remove redundant Send impl for references Also explain why the other instance is not redundant, move it next to the trait they are implementing, and out of the redundant module. This seems to go back all the way to https://github.com/rust-lang/rust/commit/35ca50bd5676db31a8074a216d1aadad7d434de8, not sure why the module was added. The instance for `&mut` is the default instance we get anyway, and we don't have anything similar for `Sync`, so IMO we should be consistent and not have the redundant instance here, either.
2022-10-27Add tests for source line numbers colorsGuillaume Gomez-1/+43
2022-10-27Migrate line numbers CSS to CSS variablesGuillaume Gomez-31/+17
2022-10-27Auto merge of #103623 - matthiaskrgr:rollup-318yc1t, r=matthiaskrgrbors-140/+431
Rollup of 9 pull requests Successful merges: - #103035 (Even nicer errors from assert_unsafe_precondition) - #103106 (Try to say that memory outside the AM is always exposed) - #103475 (Make param index generation a bit more robust) - #103525 (Move a wf-check into the site where the value is instantiated) - #103564 (library: allow some unused things in Miri) - #103586 (Process registered region obligation in `resolve_regions_with_wf_tys`) - #103592 (rustdoc: remove redundant CSS selector `.notable-traits .notable`) - #103593 (Remove an unused parser function (`Expr::returns`)) - #103611 (Add test for issue 103574) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-10-27Rollup merge of #103611 - Rageking8:fix-103574, r=lcnrMatthias Krüger-4/+56
Add test for issue 103574 Fixes #103574 Together with some slight formatting. r? `@lcnr`
2022-10-27Rollup merge of #103593 - compiler-errors:nit-remove-returns, r=fee1-deadMatthias Krüger-18/+0
Remove an unused parser function (`Expr::returns`) I removed the only usage in #97474
2022-10-27Rollup merge of #103592 - notriddle:notriddle/notable-traits-notable, ↵Matthias Krüger-2/+39
r=GuillaumeGomez rustdoc: remove redundant CSS selector `.notable-traits .notable` The margin was already being set to 0 only a few lines lower.
2022-10-27Rollup merge of #103586 - compiler-errors:issue-103573, r=jackh726Matthias Krüger-0/+40
Process registered region obligation in `resolve_regions_with_wf_tys` Fixes #103573
2022-10-27Rollup merge of #103564 - RalfJung:miri-unused, r=thomccMatthias Krüger-2/+3
library: allow some unused things in Miri Should help for https://github.com/rust-lang/rust/pull/102950.
2022-10-27Rollup merge of #103525 - oli-obk:const_impl_on_non_const_trait, r=lcnrMatthias Krüger-59/+126
Move a wf-check into the site where the value is instantiated r? ``@lcnr``
2022-10-27Rollup merge of #103475 - oli-obk:generic_param_indices, r=lcnrMatthias Krüger-13/+14
Make param index generation a bit more robust r? ````@lcnr```` While not really necessary for closure and anon const ids, it's strictly more correct