about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-09-01don't panic in BorrowedCursor::writeZachary S-2/+3
2023-09-01Auto merge of #115276 - fmease:rustdoc-obj-lt-defs-handle-self-ty-params, ↵bors-8/+57
r=GuillaumeGomez rustdoc: correctly deal with self ty params when eliding default object lifetimes Fixes #115179.
2023-09-01Auto merge of #115452 - matthiaskrgr:rollup-he30fhv, r=matthiaskrgrbors-49/+233
Rollup of 5 pull requests Successful merges: - #115411 (miri ABI check: fix handling of 1-ZST; don't accept sign differences) - #115424 (diagnostics: avoid wrong `unused_parens` on `x as (T) < y`) - #115425 (remove unnecessary heap allocation) - #115446 (fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta) - #115447 (Add comment so pub items are not removed) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-01Rollup merge of #115447 - LegNeato:patch-2, r=oli-obkMatthias Krüger-0/+2
Add comment so pub items are not removed As suggested in https://github.com/rust-lang/rust/pull/115393, add a comment so someone doesn't clean these up.
2023-09-01Rollup merge of #115446 - klensy:fixup-stable-version, r=cuviperMatthias Krüger-1/+1
fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta See: https://github.com/rust-lang/rust/pull/114562#issuecomment-1669424749 https://github.com/rust-lang/rust/pull/115056#issuecomment-1686316608 https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E72.2E0/near/387695644 Should be backported to beta too.
2023-09-01Rollup merge of #115425 - thechampagne:master, r=oli-obkMatthias Krüger-2/+2
remove unnecessary heap allocation
2023-09-01Rollup merge of #115424 - notriddle:notriddle/issue-106413, r=oli-obkMatthias Krüger-1/+189
diagnostics: avoid wrong `unused_parens` on `x as (T) < y` Fixes #106413 Fixes #80636
2023-09-01Rollup merge of #115411 - RalfJung:miri-abi, r=oli-obkMatthias Krüger-45/+39
miri ABI check: fix handling of 1-ZST; don't accept sign differences r? `@oli-obk`
2023-09-01Add comment so pub items are not removedChristian Legnitto-0/+2
As suggested in https://github.com/rust-lang/rust/pull/115393, add a comment so someone doesn't clean these up.
2023-09-01fix version for abi_thiscall to 1.73.0, which was forgotten to change when ↵klensy-1/+1
stabilized
2023-09-01Auto merge of #114065 - lukas-code:u16_from_char, r=dtolnaybors-2/+36
`impl TryFrom<char> for u16` This PR implements the final missing `char` -> unsigned integer conversion. ACP: https://github.com/rust-lang/libs-team/issues/146 r? libs-api `@rustbot` label +T-libs-api +needs-fcp -T-libs
2023-09-01rustdoc: correctly deal with self ty params when eliding default object ↵León Orell Valerian Liehr-8/+57
lifetimes
2023-09-01Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkovbors-1688/+850
Replace old private-in-public diagnostic with type privacy lints Next part of RFC https://github.com/rust-lang/rust/issues/48054. r? `@petrochenkov`
2023-09-01Auto merge of #111752 - dingxiangfei2009:lower-or-pattern, r=cjgillotbors-628/+1005
Lower `Or` pattern without allocating place cc `@azizghuloum` `@cjgillot` Related to #111583 and #111644 While reviewing #111644, it occurs to me that while we directly lower conjunctive predicates, which are connected with `&&`, into the desirable control flow, today we don't directly lower the disjunctive predicates, which are connected with `||`, in the similar fashion. Instead, we allocate a place for the boolean temporary to hold the result of evaluating the `||` expression. Usually I would expect optimization at later stages to "inline" the evaluation of boolean predicates into simple CFG, but #111583 is an example where `&&` is failing to be optimized away and the assembly shows that both the expensive operands are evaluated. Therefore, I would like to make a small change to make the CFG a bit more straight-forward without invoking the `as_temp` machinery, and plus avoid allocating the place to hold the boolean result as well.
2023-09-01Auto merge of #115415 - c410-f3r:t3st3ss, r=flip1995bors-11/+84
[`Clippy`] Use symbols intended for `arithmetic_side_effects` #115177 added the symbols for `arithmetic_side_effects` and now this PR actually uses them to prevent an eventual removal. All because #115183 was recently merged and next Clippy update will probably take some time to happen. Fixes https://github.com/rust-lang/rust-clippy/issues/11392
2023-09-01[`clippy`] Use symbols intended for `arithmetic_side_effects`Caio-11/+84
2023-09-01Auto merge of #113201 - oli-obk:recursive_type_alias, r=estebank,compiler-errorsbors-21/+103
Permit recursive weak type aliases I saw #63097 and thought "we can do ~~better~~ funnier". So here it is. It's not useful, but it's certainly something. This may actually become feasible with lazy norm (so in 5 years (constant, not reducing over time)). r? `@estebank` cc `@GuillaumeGomez`
2023-08-31Use terminology more sensiblyMichael Howell-1/+1
2023-09-01Auto merge of #114448 - SteveLauC:std_fs_read_doc, r=Mark-Simulacrumbors-5/+7
docs: improve std::fs::read doc #### What does this PR do 1. Rephrase a confusing sentence in the document of `std::fs::read()` ----- Closes #114432 cc `@Dexus0` `@saethlin`
2023-09-01Auto merge of #115400 - gurry:issue-115264-ice, r=compiler-errorsbors-2/+38
Return ident for ExprField and PatField HIR nodes Fixes #115264
2023-08-31diagnostics: avoid wrong `unused_parens` on `x as (T) < y`Michael Howell-1/+189
2023-09-01docs: improve std::fs::read docSteve Lau-5/+7
2023-09-01remove unnecessary heap allocationXXIV-2/+2
2023-09-01Return ident for ExprField and PatField HIR nodesGurinder Singh-2/+38
2023-08-31Auto merge of #115366 - ↵bors-0/+31
compiler-errors:associated-type-bound-implicit-lifetimes, r=jackh726 Capture lifetimes for associated type bounds destined to be lowered to opaques Some associated type bounds get lowered to opaques, but they're not represented in the AST as opaques. That means that we never collect lifetimes for them (`record_lifetime_params_for_impl_trait`) which are used currently for RPITITs, which capture all of their in-scope lifetimes[^1]. This means that the nested RPITITs that arise from some type like `impl Foo<Type: Bar>` (~> `impl Foo<Type = impl Bar>`) don't capture any lifetimes, leading to ICEs. This PR makes sure we collect the lifetimes for associated type bounds as well, and make sure that they are set up correctly for opaque type lowering later. Fixes #115360 [^1]: #114489
2023-09-01update tests that are ignored by debugDing Xiang Fei-278/+326
2023-08-31Auto merge of #115389 - bvanjoi:fix-115380, r=petrochenkovbors-4/+7
fix(resolve): update def if binding is warning ambiguity Fixes #115380
2023-08-31miri ABI check: fix handling of 1-ZST; don't accept sign differencesRalf Jung-35/+38
2023-08-31update abi_compat.rsRalf Jung-12/+3
2023-08-31Auto merge of #115384 - lqd:default-universe-info, r=matthewjasperbors-19/+132
Work around ICE in diagnostics for local super-universes missing `UniverseInfo`s In issue #114907, canonicalization of liveness dropck-outlives results (IIUC) encounters universes absent from the original query. Some local universes [are created](https://github.com/lqd/rust/blob/f3a1bae88c617330b8956818da3cea256336c1cf/compiler/rustc_infer/src/infer/canonical/query_response.rs#L417-L425) for the mapping, but importantly, they won't have associated causes. These missing `UniverseInfo`s can be [needed](https://github.com/lqd/rust/blob/f3a1bae88c617330b8956818da3cea256336c1cf/compiler/rustc_borrowck/src/diagnostics/region_errors.rs#L376) during diagnostics, [causing the `IndexMap: key not found` ICE](https://github.com/lqd/rust/blob/d55522aad87c5605d7edd5dd4b37926e8b446117/compiler/rustc_borrowck/src/region_infer/mod.rs#L2252) seen in the issue. This PR works around this by returning the suboptimal catch-all cause, to avoid the ICE. It does results in suboptimal diagnostics right now, but it's better than an ICE. r? `@matthewjasper.` Let me know if there's a good easy-ish way to fix this, but I believe that for some of these erroneous cases and diagnostics, that inference/canonicalization/higher-ranked subtyping/etc may not behave exactly the same with the new trait solver? If that's the case then it'd probably be best to wait a bit more to do the correct fix. Fixes #114907. cc `@aliemjay`
2023-08-31Auto merge of #115408 - RalfJung:miri, r=RalfJungbors-101/+286
update Miri r? `@ghost`
2023-08-31fix(resolve): update def if binding is warning ambiguitybohan-4/+7
2023-08-31remove dummy UniverseInfo causes from type checker `fully_perform_op`Rémy Rakic-7/+5
This was backfilling causes for new universes that may have been created by an op, when there was no error info to use for improved diagnostics. We don't need to do that anymore: `other()` is the default when there is no registered universe cause.
2023-08-31Auto merge of #3046 - RalfJung:rustup, r=RalfJungbors-71/+263
Rustup also more ABI compat tests
2023-08-31more ABI compat testsRalf Jung-12/+48
2023-08-31Auto merge of #115290 - compiler-errors:ctor-unsafe, r=cjgillotbors-30/+65
`rustc_layout_scalar_valid_range` makes ctors unsafe We already validate this when we use the ctor in a call, e.g. `Variant(1)`, but not if we use the ctor as a fn ptr, e.g. `.map(Variant)`. The easiest way to fix the latter is (afaict) is by marking the ctor as unsafe itself. Fixes #115284
2023-08-31remove dummy UniverseInfo causes from type checker `type_check`Rémy Rakic-4/+0
This was pre-filling causes for universes that could already exist in the InferCtxt. We don't need to do that anymore: `other()` is the default when there is no registered universe cause.
2023-08-31remove dummy UniverseInfo causes from type checker ↵Rémy Rakic-7/+0
`instantiate_canonical_with_fresh_inference_vars` This was backfilling causes for the new universes that can be created by the InferCtxt. We don't need to do that anymore: `other()` is the default when there is no registered universe cause.
2023-08-31fmtRalf Jung-1/+1
2023-08-31Merge from rustcRalf Jung-64/+220
2023-08-31Preparing for merge from rustcRalf Jung-1/+1
2023-08-31Auto merge of #115346 - oli-obk:smir_const, r=spastorinobors-152/+166
Some SMIR Const cleanups Only e1def3bd41b021ce87a5d639b10cdf4a7df1d0b5 is new logic, everywhere else I just used the implementations that y'all had already written. r? `@spastorino` cc `@ouz-a`
2023-08-31Auto merge of #115374 - RalfJung:miri-fn-abi, r=oli-obkbors-63/+219
miri function ABI check: accept repr(transparent) wrappers as compatible
2023-08-31Auto merge of #3045 - RalfJung:tier1-ci, r=RalfJungbors-1/+1
make sure we test all tier 1 targets i686-pc-windows-gnu was missing (and i686-pc-windows-msvc was being tested twice, as host and foreign target).
2023-08-31make sure we test all tier 1 targets: i686-pc-windows-gnu was missingRalf Jung-1/+1
2023-08-31Auto merge of #3044 - rust-lang:rustup-2023-08-31, r=RalfJungbors-10895/+18909
Automatic sync from rustc
2023-08-31Auto merge of #115398 - matthiaskrgr:rollup-88lj9gk, r=matthiaskrgrbors-6/+9
Rollup of 3 pull requests Successful merges: - #115373 (Fix bors missing a commit when merging #115355) - #115378 (`ignore-cross-compile` remaining tests that run binaries) - #115393 (Make `termcolor` types public in `rustc_errors`) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-31Rollup merge of #115393 - LegNeato:patch-1, r=oli-obkMatthias Krüger-1/+1
Make `termcolor` types public in `rustc_errors` After https://github.com/rust-lang/rust/pull/114104, `rust-gpu` is unable to create a custom `Emitter` as the bounds have changed to include `WriteColor`. I was able to work around this by adding `termcolor` as a direct dependency, but I believe this should be exposed as part of `rustc_errors` proper. See https://github.com/rust-lang/rust/pull/102992 for why `rust-gpu` needs to create a custom emitter.
2023-08-31Rollup merge of #115378 - ferrocene:ignore-cross-compile, r=lqdMatthias Krüger-0/+7
`ignore-cross-compile` remaining tests that run binaries Follow up to https://github.com/rust-lang/rust/pull/114958
2023-08-31Rollup merge of #115373 - lqd:come-on-bors, r=compiler-errorsMatthias Krüger-5/+1
Fix bors missing a commit when merging #115355 bors incorrectly merged an outdated version of PR #115355 (via rollup #115370): - it [recorded r+](https://github.com/rust-lang/rust/pull/115355#issuecomment-1698372365) as approving commit https://github.com/rust-lang/rust/commit/325b585259871c99093b2a2e9463f941b8aa0ceb, and thus merged the original revision https://github.com/rust-lang/rust/commit/7762ac7bb5ac10046a5a9ee838480a78bf150237 - but the branch at the time was at commit https://github.com/rust-lang/rust/commit/eefa07d69baad3207ad520da8590fb44ef989416, so bors missed the `compiler/rustc_trait_selection/src/solve/search_graph/mod.rs` cleanup in commit https://github.com/rust-lang/rust/pull/115355/commits/0e1e964a349681504e7103d4ec70aca5616222fc 😓 Thankfully the change that bors missed was small, and this new PR corrects the situation (as I'd rather avoid having confusing multiple merge commits of PR #115355 in the git history) r? ``@compiler-errors``