about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2022-12-20Auto merge of #105940 - matthiaskrgr:rollup-ho4po1t, r=matthiaskrgrbors-2/+30
Rollup of 5 pull requests Successful merges: - #105901 (Don't panic on stable since miri is not available there) - #105912 (rustdoc: force pre tags to have the default line height) - #105914 (rustdoc: Simplify CSS for scraped code examples code blocks) - #105933 (Add readable rustdoc display for tvOS and watchOS) - #105935 (docs/test: add UI test and long-form error docs for `E0377`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-20Rollup merge of #105935 - Ezrashaw:add-test+docs-for-e0377, r=GuillaumeGomezMatthias Krüger-2/+30
docs/test: add UI test and long-form error docs for `E0377`
2022-12-20Auto merge of #105880 - Nilstrieb:make-newtypes-less-not-rust, r=oli-obkbors-268/+182
Improve syntax of `newtype_index` This makes it more like proper Rust and also makes the implementation a lot simpler. Mostly just turns weird flags in the body into proper attributes. It should probably also be converted to an attribute macro instead of function-like, but that can be done in a future PR.
2022-12-20docs/test: add UI test and long-form error docs for `E0377`Ezra Shaw-2/+30
2022-12-20Auto merge of #105575 - compiler-errors:impl-wf-lint, r=oli-obkbors-14/+147
Add `IMPLIED_BOUNDS_ENTAILMENT` lint Implements a lint (#105572) version of the hard-error introduced in #105483. Context is in that PR. r? `@lcnr` cc `@oli-obk` who had asked for this to be a lint first Not sure if this needs to be an FCP, since it's a lint for now.
2022-12-20Auto merge of #105918 - matthiaskrgr:rollup-mmazd62, r=matthiaskrgrbors-40/+134
Rollup of 7 pull requests Successful merges: - #105801 (Realistic `Path::as_mut_os_str` doctest) - #105860 (Add long error docs for `E0460` and `E0457`) - #105895 (Test that we don't add a new kind of breaking change with TAITs) - #105902 (docs: improve pin docs) - #105910 (Update books) - #105913 (rustdoc: remove width-limiter from source pages, stop overriding CSS) - #105915 (Revert "Replace usage of `ResumeTy` in async lowering with `Context`") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-19Auto merge of #105905 - lqd:revert-103880, r=jackh726bors-357/+99
Revert #103880 "Use non-ascribed type as field's type in mir" This PR prepares a revert for #103880 to fix #105809, #105881, #105886 and others (like the duplicates of the first one), in case an actual fix can't get done today. I've also added the MCVE from #105809. There is no MCVE for the #105881 and #105886 ICEs yet however, so there are no tests for them here, although we'll need one before relanding the original changes. Were this PR to land, it would also reopen #96514 as it was fixed by the original PR. Opening as draft to allow time for a possible fix. r? `@jackh726`
2022-12-19Rollup merge of #105915 - andrewpollack:revert-105250-async-rm-resumety, ↵Matthias Krüger-38/+25
r=tmandry Revert "Replace usage of `ResumeTy` in async lowering with `Context`" Reverts rust-lang/rust#105250 Fixes: #105501 Following instructions from [forge](https://forge.rust-lang.org/compiler/reviews.html#reverts). This change introduced a breaking change that is not actionable nor relevant, and is blocking updates to our toolchain. Along with other comments on the CL marking issues that are fixed by reverts, reverting is best until these issues can be resolved cc. `@Swatinem`
2022-12-19Rollup merge of #105860 - Ezrashaw:add-long-errors-0460-0457, ↵Matthias Krüger-2/+109
r=jruderman,GuillaumeGomez Add long error docs for `E0460` and `E0457` Final docs for errors in #61137 that have UI tests, my next PRs will also add these tests. r? ``@GuillaumeGomez``
2022-12-19Revert "Replace usage of `ResumeTy` in async lowering with `Context`"Andrew Pollack-38/+25
2022-12-19Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorinobors-45/+27
Address some `EarlyBinder` nits
2022-12-19Make fast-path for implied wf lint betterMichael Goulet-71/+92
2022-12-19Downgrade IMPLIED_BOUNDS_ENTAILMENT to warn by default, add it to builtin ↵Michael Goulet-4/+5
lint list
2022-12-19Add IMPLIED_BOUNDS_ENTAILMENT lintMichael Goulet-7/+118
2022-12-19Revert "Auto merge of #103880 - b-naber:field-ty-mir, r=lcnr"Rémy Rakic-357/+99
This reverts commit 03770f0e2b60c02db8fcf52fed5fb36aac70cedc, reversing changes made to 01ef4b21dc5251b58bd9c6fd6face2ae95d56da1.
2022-12-19more markdown list formattingEzra Shaw-3/+3
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-12-19Rollup merge of #105882 - compiler-errors:issue-105832, r=jackh726Dylan DPC-5/+3
Don't ICE in closure arg borrow suggestion Fixes #105832
2022-12-19Rollup merge of #105864 - matthiaskrgr:compl, r=NilstriebDylan DPC-54/+26
clippy::complexity fixes filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool r? `@compiler-errors`
2022-12-19Rollup merge of #105839 - LegionMammal978:mut-upvar-not-send, r=lcnrDylan DPC-17/+22
Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators Right now, we suggest a `T: Sync` bound for both `&T` and `&mut T` upvars. A user on URLO [found this confusing](https://users.rust-lang.org/t/error-complains-about-missing-sync-but-send-is-whats-missing/86021), so I wrote this quick fix to look at the mutability before making the suggestion.
2022-12-19Auto merge of #105883 - matthiaskrgr:rollup-v5n53t1, r=matthiaskrgrbors-154/+92
Rollup of 8 pull requests Successful merges: - #105419 (Add tests for #41731) - #105447 (Add a test for #103095) - #105842 (print argument name in arg mismatch if possible) - #105863 (Update browser-ui-test version to reduce GUI tests flakyness) - #105867 (remove redundant fn params that were only "used" in recursion) - #105869 (don't clone Copy types) - #105873 (use &str / String literals instead of format!()) - #105879 (Revert "Introduce lowering_arena to avoid creating AST nodes on the fly") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-19clippy::complexity fixesMatthias Krüger-54/+26
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
2022-12-18Rollup merge of #105879 - Nilstrieb:revert-hir-arena, r=oli-obkMatthias Krüger-38/+21
Revert "Introduce lowering_arena to avoid creating AST nodes on the fly" This reverts commit d9a1faaa9cff6eab069ea8e5cd7862d0ae48e231 (#101499). This was originally part of #101345 which has now been closed as a different approach is taken now. r? `@oli-obk` cc `@spastorino`
2022-12-18Rollup merge of #105873 - matthiaskrgr:clippy_fmt, r=NilstriebMatthias Krüger-55/+37
use &str / String literals instead of format!()
2022-12-18Rollup merge of #105869 - matthiaskrgr:clone_on_copy, r=compiler-errorsMatthias Krüger-16/+16
don't clone Copy types
2022-12-18Rollup merge of #105867 - matthiaskrgr:rec_param, r=compiler-errorsMatthias Krüger-44/+10
remove redundant fn params that were only "used" in recursion
2022-12-18Rollup merge of #105842 - compiler-errors:arg-name-sugg, r=petrochenkovMatthias Krüger-1/+8
print argument name in arg mismatch if possible A bit more contextual than just `/* value */`, at least when the argument is named something related to its context. The UI test cases are... not super convincing, but also they're minimized tests.
2022-12-18Auto merge of #105446 - erikdesjardins:vt-size, r=nikicbors-3/+24
Add 0..=isize::MAX range metadata to size loads from vtables This is the (much belated) size counterpart to #91569. Inspired by https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Range.20metadata.20for.20.60size_of_val.60.20and.20other.20isize.3A.3AMAX.20limits. This could help optimize layout computations based on the size of a dyn trait. Though, admittedly, adding this to vtables wouldn't be as beneficial as adding it to slice len, which is used much more often. Miri detects this UB already: https://github.com/rust-lang/rust/blob/b7cc99142ad0cfe47e2fe9f7a82eaf5b672c0573/compiler/rustc_const_eval/src/interpret/traits.rs#L119-L121 (In fact Miri goes further, [assuming a 48-bit address space on 64-bit platforms](https://github.com/rust-lang/rust/blob/9db224fc908059986c179fc6ec433944e9cfce50/compiler/rustc_abi/src/lib.rs#L312-L331), but I don't think we can assume that in an optimization.)
2022-12-18Don't ICE in closure arg borrow suggestionMichael Goulet-5/+3
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-115/+68
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Make `#[debug_format]` an attribute in `newtype_index`Nilstrieb-92/+64
This removes the `custom` format functionality as its only user was trivially migrated to using a normal format. If a new use case for a custom formatting impl pops up, you can add it back.
2022-12-18Make `#[max]` an attribute in `newtype_index`Nilstrieb-17/+21
2022-12-18Make `#[no_ord_impl]` an attribute in `newtype_index`Nilstrieb-9/+5
2022-12-18Make `#[custom_encodable]` an attribute for `newtype_index`Nilstrieb-18/+19
Makes the syntax a little more rusty.
2022-12-19docs: add long-form error-code docs for E0457Ezra Shaw-1/+37
2022-12-19docs: add long-form error-code docs for E0460Ezra Shaw-1/+72
2022-12-18Use `#[derive]` instead of custom syntax in all `newtype_index`Nilstrieb-26/+14
2022-12-18Revert "Introduce lowering_arena to avoid creating AST nodes on the fly"Nilstrieb-38/+21
This reverts commit d9a1faaa9cff6eab069ea8e5cd7862d0ae48e231. This was originally part of a larger PR that has now been closed as a different approach is taken now.
2022-12-18Rollup merge of #105875 - matthiaskrgr:needless_borrowed_reference, r=oli-obkMatthias Krüger-42/+41
don't destuct references just to reborrow
2022-12-18Rollup merge of #105870 - matthiaskrgr:useless_conv, r=oli-obkMatthias Krüger-27/+17
avoid .into() conversion to identical types
2022-12-18Rollup merge of #105854 - matthiaskrgr:rmclone, r=compiler-errorsMatthias Krüger-1/+1
remove redundant clone
2022-12-18Rollup merge of #105420 - tmiasko:dest-prop-dead-code, r=JakobDegenMatthias Krüger-0/+7
Remove dead code after destination propagation Fixes #105428. cc `@JakobDegen`
2022-12-18don't restuct references just to reborrowMatthias Krüger-42/+41
2022-12-18avoid .into() conversion to identical typesMatthias Krüger-27/+17
2022-12-18use &str / String literals instead of format!()Matthias Krüger-55/+37
2022-12-18remove redundant fn params that were only "used" in recursionMatthias Krüger-44/+10
2022-12-18don't clone Copy typesMatthias Krüger-16/+16
2022-12-18Auto merge of #104417 - mejrs:mir_build, r=davidtwcobors-291/+1191
Migrate rustc_mir_build diagnostics Rebases https://github.com/rust-lang/rust/pull/100854 ~~The remaining issue is how to better resolve https://github.com/rust-lang/rust/commit/72bea68af4ee2a41c44998916f6a789163f12e7d~~ ~~The diagnostic macros seems to generate a broken diagnostic, and I couldn't figure out how to manually format the fluent message, so I hardcoded the format string for now. I'd like pointers to a better fix for this.~~ Also, I'm not 100% sure I didn't mess up a rebase somewhere 🙂 r? `@davidtwco`
2022-12-18remove redundant cloneMatthias Krüger-1/+1
2022-12-17Rollup merge of #105814 - JakobDegen:custom-mir-terms, r=oli-obkMatthias Krüger-0/+49
Support call and drop terminators in custom mir The only caveat with this change is that cleanup blocks are not supported. I would like to add them, but it's not quite clear to me what the best way to do that is, so I'll have to think about it some more. r? ``@oli-obk``
2022-12-17Rollup merge of #105792 - Ezrashaw:add-e0320-long-docs, r=GuillaumeGomezMatthias Krüger-1/+28
docs: add long error explanation for error E0320 Continuation of #105791 r? ``@GuillaumeGomez``