]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agocompiletest: use precise cfg matching instead of hard-coded tables
Eric Huss [Mon, 8 Aug 2022 04:26:13 +0000 (21:26 -0700)]
compiletest: use precise cfg matching instead of hard-coded tables

22 months agoAuto merge of #99833 - andrewpollack:fuchsia-rust-ci-zircon-lib-improvement, r=Mark...
bors [Sun, 7 Aug 2022 15:58:30 +0000 (15:58 +0000)]
Auto merge of #99833 - andrewpollack:fuchsia-rust-ci-zircon-lib-improvement, r=Mark-Simulacrum

Fuchsia CI zircon lib improvement

Removing Zircon build process, instead pulling `sysroot` and related libs directly from Fuchsia SDK

cc. `@tmandry` `@djkoloski`

22 months agoShifting CI to pull Zircon libraries directly from Fuchsia SDK
Andrew Pollack [Wed, 27 Jul 2022 23:47:19 +0000 (23:47 +0000)]
Shifting CI to pull Zircon libraries directly from Fuchsia SDK

PR feedback

PR Followups

Updating clang download

Updating clang download

Restructuring env used

Restructuring env used

Adding chmod

Adding chmod

Adding chmod

22 months agoAuto merge of #99983 - RalfJung:more-layout-checks, r=eddyb
bors [Sun, 7 Aug 2022 13:17:54 +0000 (13:17 +0000)]
Auto merge of #99983 - RalfJung:more-layout-checks, r=eddyb

More layout sanity checks

r? `@eddyb`

22 months agoAuto merge of #100091 - chenyukang:add-check-for-link-ordinal, r=michaelwoerister
bors [Sun, 7 Aug 2022 05:37:29 +0000 (05:37 +0000)]
Auto merge of #100091 - chenyukang:add-check-for-link-ordinal, r=michaelwoerister

Check link ordinal to make sure it is targetted  for foreign function

Fix #100009, when link ordinal is not target for foreign functions, emit an error.

cc `@dpaoliello`

22 months agoAuto merge of #100004 - jyn514:exclude-single-test, r=Mark-Simulacrum
bors [Sun, 7 Aug 2022 02:56:48 +0000 (02:56 +0000)]
Auto merge of #100004 - jyn514:exclude-single-test, r=Mark-Simulacrum

Move `x test --skip` to be part of `--exclude`

`--skip` is inconsistent with the rest of the interface and redundant with `--exclude`.
Fix --exclude to work properly for files and directories rather than having a separate flag.

Fixes https://github.com/rust-lang/rust/issues/96342. cc https://github.com/rust-lang/rust/pull/96493#issuecomment-1200521720

r? `@Mark-Simulacrum`

22 months agoAuto merge of #100213 - matthiaskrgr:rollup-mqe7t1n, r=matthiaskrgr
bors [Sat, 6 Aug 2022 23:38:28 +0000 (23:38 +0000)]
Auto merge of #100213 - matthiaskrgr:rollup-mqe7t1n, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #100071 (deps: dedupe `annotate-snippets` crate versions)
 - #100127 (Remove Windows function preloading)
 - #100130 (Avoid pointing out `return` span if it has nothing to do with type error)
 - #100169 (Optimize `pointer::as_aligned_to`)
 - #100175 (ascii -> ASCII in code comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #100175 - fxn:patch-1, r=Mark-Simulacrum
Matthias Krüger [Sat, 6 Aug 2022 23:19:35 +0000 (01:19 +0200)]
Rollup merge of #100175 - fxn:patch-1, r=Mark-Simulacrum

ascii -> ASCII in code comment

Easy one I spotted while reading source code.

22 months agoRollup merge of #100169 - WaffleLapkin:optimize_is_aligned_to, r=workingjubilee
Matthias Krüger [Sat, 6 Aug 2022 23:19:34 +0000 (01:19 +0200)]
Rollup merge of #100169 - WaffleLapkin:optimize_is_aligned_to, r=workingjubilee

Optimize `pointer::as_aligned_to`

This PR replaces `addr % align` with `addr & align - 1`, which is correct due to `align` being a power of two.

Here is a proof that this makes things better: [[godbolt]](https://godbolt.org/z/Wbq3hx6YG).

This PR also removes `assume(align != 0)`, with the new impl it does not improve anything anymore ([[godbolt]](https://rust.godbolt.org/z/zcnrG4777), [[original concern]](https://github.com/rust-lang/rust/pull/95643#discussion_r843326903)).

22 months agoRollup merge of #100130 - compiler-errors:erroneous-return-span, r=lcnr
Matthias Krüger [Sat, 6 Aug 2022 23:19:33 +0000 (01:19 +0200)]
Rollup merge of #100130 - compiler-errors:erroneous-return-span, r=lcnr

Avoid pointing out `return` span if it has nothing to do with type error

This code:

```rust
fn f(_: String) {}

fn main() {
    let x = || {
        if true {
            return ();
        }
        f("");
    };
}
```

Emits this:
```
   Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
 --> src/main.rs:8:11
  |
8 |         f("");
  |           ^^- help: try using a conversion method: `.to_string()`
  |           |
  |           expected struct `String`, found `&str`
  |
note: return type inferred to be `String` here
 --> src/main.rs:6:20
  |
6 |             return ();
  |                    ^^
```

Specifically, that note has nothing to do with the type error in question. This is because the change implemented in #84244 tries to point out the `return` span on _any_ type coercion error within a closure that happens after a `return` statement, regardless of if the error has anything to do with it.

This is really easy to trigger -- just needs a closure (or an `async`) and an early return (or any other form, e.g. `?` operator suffices) -- and super distracting in production codebases. I'm letting #84128 regress because that issue is much harder to fix correctly, and I can re-open that issue after this lands.

As a drive-by, I added a `resolve_vars_if_possible` to the coercion error logic, which leads to some error improvements. Unrelated to the issue above, though.

22 months agoRollup merge of #100127 - ChrisDenton:remove-init, r=thomcc
Matthias Krüger [Sat, 6 Aug 2022 23:19:32 +0000 (01:19 +0200)]
Rollup merge of #100127 - ChrisDenton:remove-init, r=thomcc

Remove Windows function preloading

After `@Mark-Simulacrum` asked me to provide guidance for when optionally imported functions should be preloaded, I realised my justifications were now quite weak. I think the strongest argument that can be made is that it avoids some degree of nondeterminism when calling these functions (in as far as system API calls can be said to be deterministic). However, I don't think that's particularly convincing unless there's a real world use case where it matters. Further discussion with `@thomcc` has strengthened my feeling that preloading isn't really needed.

Note that `WaitOnAddress` needed some adjustment to work without preloading. I opted not to use a macro for this special case as it seemed silly to do so for just one thing (and I don't like macros tbh).

22 months agoRollup merge of #100071 - klensy:annotate-snippets-bump, r=Mark-Simulacrum
Matthias Krüger [Sat, 6 Aug 2022 23:19:32 +0000 (01:19 +0200)]
Rollup merge of #100071 - klensy:annotate-snippets-bump, r=Mark-Simulacrum

deps: dedupe `annotate-snippets` crate versions

Dedupes `annotate-snippets` crate versions (https://github.com/rust-lang/annotate-snippets-rs/blob/0.9.1/CHANGELOG.md). Should work, but there is not a lot of tests.

Looks like switching to that crate a bit stalled.

22 months agoAuto merge of #100117 - nicholasbishop:bishop-update-cc, r=Mark-Simulacrum
bors [Sat, 6 Aug 2022 21:10:52 +0000 (21:10 +0000)]
Auto merge of #100117 - nicholasbishop:bishop-update-cc, r=Mark-Simulacrum

Bump cc version in bootstrap

Among other changes, the newer cc release pulls in this fix:
https://github.com/rust-lang/cc-rs/commit/b2792e33ff91b92e2e920e54d582b0c334670c37

This fixes errors when building compiler_builtins for UEFI targets.

22 months agoAuto merge of #99524 - cuviper:relnotes-1.63.0, r=Mark-Simulacrum
bors [Sat, 6 Aug 2022 17:50:41 +0000 (17:50 +0000)]
Auto merge of #99524 - cuviper:relnotes-1.63.0, r=Mark-Simulacrum

Add release notes for Rust 1.63.0

22 months agoAuto merge of #100195 - matthiaskrgr:rollup-ovzyyb0, r=matthiaskrgr
bors [Sat, 6 Aug 2022 15:09:59 +0000 (15:09 +0000)]
Auto merge of #100195 - matthiaskrgr:rollup-ovzyyb0, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #100094 (Detect type mismatch due to loop that might never iterate)
 - #100132 (Use (actually) dummy place for let-else divergence)
 - #100167 (Recover `require`, `include` instead of `use` in item)
 - #100193 (Remove more Clean trait implementations)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #100193 - GuillaumeGomez:rm-clean-impls, r=notriddle
Matthias Krüger [Sat, 6 Aug 2022 14:16:00 +0000 (16:16 +0200)]
Rollup merge of #100193 - GuillaumeGomez:rm-clean-impls, r=notriddle

Remove more Clean trait implementations

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? `@notriddle`

22 months agoRollup merge of #100167 - chenyukang:require-suggestion, r=estebank
Matthias Krüger [Sat, 6 Aug 2022 14:15:59 +0000 (16:15 +0200)]
Rollup merge of #100167 - chenyukang:require-suggestion, r=estebank

Recover `require`, `include` instead of `use` in item

Fix #100140

22 months agoRollup merge of #100132 - compiler-errors:issue-100103, r=tmiasko
Matthias Krüger [Sat, 6 Aug 2022 14:15:56 +0000 (16:15 +0200)]
Rollup merge of #100132 - compiler-errors:issue-100103, r=tmiasko

Use (actually) dummy place for let-else divergence

Fixes #100103

22 months agoRollup merge of #100094 - lyming2007:issue-98982, r=estebank
Matthias Krüger [Sat, 6 Aug 2022 14:15:56 +0000 (16:15 +0200)]
Rollup merge of #100094 - lyming2007:issue-98982, r=estebank

Detect type mismatch due to loop that might never iterate

When loop as tail expression causes a miss match type E0308 error, recursively get the return statement and add diagnostic information on it.

22 months agoAuto merge of #99893 - compiler-errors:issue-99387, r=davidtwco
bors [Sat, 6 Aug 2022 12:29:11 +0000 (12:29 +0000)]
Auto merge of #99893 - compiler-errors:issue-99387, r=davidtwco

Delay formatting trimmed path until lint/error is emitted

Fixes #99387

r? `@davidtwco`

22 months agoremove Clean trait implementation for hir::PolyTraitRef
Guillaume Gomez [Sat, 6 Aug 2022 09:54:54 +0000 (11:54 +0200)]
remove Clean trait implementation for hir::PolyTraitRef

22 months agoremove Clean trait implementation for hir::GenericBound
Guillaume Gomez [Sat, 6 Aug 2022 09:52:27 +0000 (11:52 +0200)]
remove Clean trait implementation for hir::GenericBound

22 months agoAuto merge of #100172 - Mark-Simulacrum:bump-165, r=Mark-Simulacrum
bors [Sat, 6 Aug 2022 09:37:32 +0000 (09:37 +0000)]
Auto merge of #100172 - Mark-Simulacrum:bump-165, r=Mark-Simulacrum

Bump to 1.65.0

r? `@Mark-Simulacrum`

22 months agoAuto merge of #99743 - compiler-errors:fulfillment-context-cleanups, r=jackh726
bors [Sat, 6 Aug 2022 06:48:15 +0000 (06:48 +0000)]
Auto merge of #99743 - compiler-errors:fulfillment-context-cleanups, r=jackh726

Some `FulfillmentContext`-related cleanups

Use `ObligationCtxt` in some places, remove some `FulfillmentContext`s in others...

r? types

22 months agoAuto merge of #100035 - workingjubilee:merge-functions, r=nikic
bors [Fri, 5 Aug 2022 23:11:49 +0000 (23:11 +0000)]
Auto merge of #100035 - workingjubilee:merge-functions, r=nikic

Enable function merging when opt is for size

It is, of course, natural to want to merge aliasing functions when
optimizing for code size, since that can eliminate several bytes.
And an exhaustive match helps make the code less brittle.

Closes #98215.

22 months agoEnable function merging when opt is for size
Jubilee Young [Mon, 1 Aug 2022 21:04:14 +0000 (14:04 -0700)]
Enable function merging when opt is for size

It is, of course, natural to want to merge aliasing functions when
optimizing for code size, since that can eliminate several bytes.
And an exhaustive match helps make the code less brittle.

22 months agoimplement #98982
Yiming Lei [Wed, 3 Aug 2022 04:46:07 +0000 (21:46 -0700)]
implement #98982
when loop as tail expression for miss match type E0308 error, recursively get
the return statement and add diagnostic information on it
use rustc_hir::intravisit to collect the return expression
modified:   compiler/rustc_typeck/src/check/coercion.rs
new file:   src/test/ui/typeck/issue-98982.rs
new file:   src/test/ui/typeck/issue-98982.stderr

22 months agoUpdate RELEASES.md
Josh Stone [Fri, 5 Aug 2022 17:02:46 +0000 (10:02 -0700)]
Update RELEASES.md

Co-authored-by: Trevor Spiteri <tspiteri@ieee.org>
22 months agoUpdate RELEASES.md
Josh Stone [Fri, 5 Aug 2022 17:02:38 +0000 (10:02 -0700)]
Update RELEASES.md

Co-authored-by: Trevor Spiteri <tspiteri@ieee.org>
22 months agoascii -> ASCII in code comment
Xavier Noria [Fri, 5 Aug 2022 16:45:42 +0000 (18:45 +0200)]
ascii -> ASCII in code comment

22 months agomove DiagnosticArgFromDisplay into rustc_errors
Michael Goulet [Fri, 5 Aug 2022 16:43:52 +0000 (16:43 +0000)]
move DiagnosticArgFromDisplay into rustc_errors

22 months agoDelay formatting trimmed path until lint/error is emitted
Michael Goulet [Fri, 29 Jul 2022 06:48:39 +0000 (06:48 +0000)]
Delay formatting trimmed path until lint/error is emitted

22 months agoAuto merge of #100174 - Dylan-DPC:rollup-wnskbk6, r=Dylan-DPC
bors [Fri, 5 Aug 2022 16:35:15 +0000 (16:35 +0000)]
Auto merge of #100174 - Dylan-DPC:rollup-wnskbk6, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #99835 (Suggest adding/removing `ref` for binding patterns)
 - #100155 (Use `node_type_opt` to skip over generics that were not expected)
 - #100157 (rustdoc: use `collect()` instead of repeatedly pushing)
 - #100158 (kmc-solid: Add a stub implementation of #98246 (`File::set_times`))
 - #100166 (Remove more Clean trait implementations)
 - #100168 (Improve diagnostics for `const a: = expr;`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_cons...
Dylan DPC [Fri, 5 Aug 2022 16:24:37 +0000 (21:54 +0530)]
Rollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_const_item, r=compiler-errors

Improve diagnostics for `const a: = expr;`

Adds a suggestion to write a type when there is a colon, but the type is not present.
I've also shrunk spans a little, so the suggestions are a little nicer.

Resolves #100146

r? `@compiler-errors`

22 months agoRollup merge of #100166 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC
Dylan DPC [Fri, 5 Aug 2022 16:24:36 +0000 (21:54 +0530)]
Rollup merge of #100166 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC

Remove more Clean trait implementations

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? `@notriddle`

22 months agoRollup merge of #100158 - solid-rs:patch/kmc-solid/follow-up-98246, r=joshtriplett
Dylan DPC [Fri, 5 Aug 2022 16:24:35 +0000 (21:54 +0530)]
Rollup merge of #100158 - solid-rs:patch/kmc-solid/follow-up-98246, r=joshtriplett

kmc-solid: Add a stub implementation of #98246 (`File::set_times`)

 Fixes the build failure of the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets after #98246.

This target does not support setting a modification time and access time separately, hence stubbing out the implementation.

22 months agoRollup merge of #100157 - rust-lang:notriddle/use-map-instead-of-repeated-push, r...
Dylan DPC [Fri, 5 Aug 2022 16:24:34 +0000 (21:54 +0530)]
Rollup merge of #100157 - rust-lang:notriddle/use-map-instead-of-repeated-push, r=Dylan-DPC

rustdoc: use `collect()` instead of repeatedly pushing

22 months agoRollup merge of #100155 - compiler-errors:issue-100154, r=jackh726
Dylan DPC [Fri, 5 Aug 2022 16:24:33 +0000 (21:54 +0530)]
Rollup merge of #100155 - compiler-errors:issue-100154, r=jackh726

Use `node_type_opt` to skip over generics that were not expected

Fixes #100154

22 months agoRollup merge of #99835 - TaKO8Ki:suggest-adding-or-removing-ref-for-binding-pattern...
Dylan DPC [Fri, 5 Aug 2022 16:24:32 +0000 (21:54 +0530)]
Rollup merge of #99835 - TaKO8Ki:suggest-adding-or-removing-ref-for-binding-pattern, r=estebank

Suggest adding/removing `ref` for binding patterns

This fixes what a fixme comment says.

r? `@estebank`

22 months agoBump to 1.65.0
Mark Rousskov [Fri, 5 Aug 2022 15:32:46 +0000 (11:32 -0400)]
Bump to 1.65.0

22 months agoOptimize `pointer::as_aligned_to`
Maybe Waffle [Fri, 5 Aug 2022 13:11:47 +0000 (17:11 +0400)]
Optimize `pointer::as_aligned_to`

22 months agoAuto merge of #100073 - dpaoliello:externvar, r=michaelwoerister
bors [Fri, 5 Aug 2022 13:05:34 +0000 (13:05 +0000)]
Auto merge of #100073 - dpaoliello:externvar, r=michaelwoerister

Add test for raw-dylib with an external variable

All existing tests of link kind `raw-dylib` only validate the ability to link against functions, but it is also possible to link against variables.

This adds tests for linking against a variable using `raw-dylib` both by-name and by-ordinal.

22 months agoImprove diagnostics for `const a: = expr;`
Maybe Waffle [Fri, 5 Aug 2022 11:41:42 +0000 (15:41 +0400)]
Improve diagnostics for `const a: = expr;`

22 months agorecover require,include instead of use in item
yukang [Fri, 5 Aug 2022 11:20:03 +0000 (19:20 +0800)]
recover require,include instead of use in item

22 months agoremove Clean trait implementation for hir::TraitItem
Guillaume Gomez [Fri, 5 Aug 2022 10:08:32 +0000 (12:08 +0200)]
remove Clean trait implementation for hir::TraitItem

22 months agoremove Clean trait implementation for hir::PolyTraitRef
Guillaume Gomez [Fri, 5 Aug 2022 10:01:30 +0000 (12:01 +0200)]
remove Clean trait implementation for hir::PolyTraitRef

22 months agoAuto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebank
bors [Fri, 5 Aug 2022 09:32:26 +0000 (09:32 +0000)]
Auto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebank

Warn about dead tuple struct fields

Continuation of #92972. Fixes #92790.

The language team has already commented on this in https://github.com/rust-lang/rust/pull/92972#issuecomment-1021511970; I have incorporated their requests here. Specifically, there is now a new allow-by-default `unused_tuple_struct_fields` lint (name bikesheddable), and fields of unit type are ignored (https://github.com/rust-lang/rust/pull/92972#issuecomment-1021815408), so error messages look like this:
```
error: field is never read: `1`
  --> $DIR/tuple-struct-field.rs:6:21
   |
LL | struct Wrapper(i32, [u8; LEN], String);
   |                     ^^^^^^^^^
   |
help: change the field to unit type to suppress this warning while preserving the field numbering
   |
LL | struct Wrapper(i32, (), String);
   |                     ~~
```
r? `@joshtriplett`

22 months agoAuto merge of #99867 - spastorino:refactor-remap-lifetimes, r=nikomatsakis
bors [Fri, 5 Aug 2022 06:35:12 +0000 (06:35 +0000)]
Auto merge of #99867 - spastorino:refactor-remap-lifetimes, r=nikomatsakis

Split create_def and lowering of lifetimes for opaque types and bare async fns

r? `@cjgillot`

This work is kind of half-way, but I think it could be merged anyway.
I think we should be able to remove all the vacant arms in `new_named_lifetime_with_res`, if I'm not wrong that requires visiting more nodes. We can do that as a follow up.
In follow-up PRs, besides the thing mentioned previously, I'll be trying to remove `LifetimeCaptureContext`, `captured_lifetimes` as a global data structure, global `binders_to_ignore` and all their friends :).

Also try to remap in a more general way based on def-ids.

22 months agoAuto merge of #97085 - rylev:test-issue-33172, r=wesleywiser
bors [Fri, 5 Aug 2022 03:26:47 +0000 (03:26 +0000)]
Auto merge of #97085 - rylev:test-issue-33172, r=wesleywiser

Add a test for issue #33172

Adds a test confirming that #33172 has been fixed.

CDB has some surprising results as it looks like the supposedly unmangled static's symbol name is prefixed when it shouldn't be.

r? `@wesleywiser`

Closes #33172

22 months agorustdoc: use `collect()` instead of repeatedly pushing to bounds
Michael Howell [Fri, 5 Aug 2022 01:13:53 +0000 (18:13 -0700)]
rustdoc: use `collect()` instead of repeatedly pushing to bounds

22 months agorustdoc: use `collect()` instead of repeatedly pushing to bindings
Michael Howell [Fri, 5 Aug 2022 00:19:57 +0000 (17:19 -0700)]
rustdoc: use `collect()` instead of repeatedly pushing to bindings

22 months agoAuto merge of #95026 - cuviper:bump-linux-min, r=Mark-Simulacrum
bors [Thu, 4 Aug 2022 23:56:07 +0000 (23:56 +0000)]
Auto merge of #95026 - cuviper:bump-linux-min, r=Mark-Simulacrum

Increase the minimum linux-gnu versions

This is implementing the MCP from rust-lang/compiler-team#493. It is
increasing the minimum requirements of a couple Tier 1 targets, and
others at lower tiers, so this should go through FCP sign-offs for both
`T-compiler` and `T-release`.

The new `linux-gnu` baseline is kernel 3.2 and glibc 2.17. We will also
take that kernel as the minimum floor for _all_ `*-linux-*` targets, so
it may be broadly assumed in the implementation of the standard library.
That does not preclude specific targets from having greater requirements
where it makes sense, like a new arch needing something newer, or a
platform like `linux-android` choosing a newer baseline.

22 months agoLink /rustroot/lib stuff for clang -m32 to see
Josh Stone [Thu, 4 Aug 2022 23:25:01 +0000 (16:25 -0700)]
Link /rustroot/lib stuff for clang -m32 to see

22 months agoopt node type
Michael Goulet [Thu, 4 Aug 2022 22:43:39 +0000 (22:43 +0000)]
opt node type

22 months agoAuto merge of #100151 - matthiaskrgr:rollup-irqwvj2, r=matthiaskrgr
bors [Thu, 4 Aug 2022 21:03:48 +0000 (21:03 +0000)]
Auto merge of #100151 - matthiaskrgr:rollup-irqwvj2, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #98796 (Do not exclusively suggest `;` when `,` is also a choice)
 - #99772 (Re-enable submodule archive downloads.)
 - #100058 (Suggest a positional formatting argument instead of a captured argument)
 - #100093 (Enable unused_parens for match arms)
 - #100095 (More EarlyBinder cleanups)
 - #100138 (Remove more Clean trait implementations)
 - #100148 (RustWrapper: update for TypedPointerType in LLVM)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

22 months agoRollup merge of #100148 - durin42:llvm-16-pointertype, r=nikic
Matthias Krüger [Thu, 4 Aug 2022 20:25:06 +0000 (22:25 +0200)]
Rollup merge of #100148 - durin42:llvm-16-pointertype, r=nikic

RustWrapper: update for TypedPointerType in LLVM

This is a result of https://reviews.llvm.org/D130592.

r? `@nikic`

22 months agoRollup merge of #100138 - GuillaumeGomez:rm-clean-impls, r=notriddle
Matthias Krüger [Thu, 4 Aug 2022 20:25:05 +0000 (22:25 +0200)]
Rollup merge of #100138 - GuillaumeGomez:rm-clean-impls, r=notriddle

Remove more Clean trait implementations

Follow-up of https://github.com/rust-lang/rust/pull/99638.

r? `@notriddle`

22 months agoRollup merge of #100095 - jackh726:early-binder, r=lcnr
Matthias Krüger [Thu, 4 Aug 2022 20:25:04 +0000 (22:25 +0200)]
Rollup merge of #100095 - jackh726:early-binder, r=lcnr

More EarlyBinder cleanups

Each commit is independent

r? types

22 months agoRollup merge of #100093 - wcampbell0x2a:unused-parens-for-match-arms, r=petrochenkov
Matthias Krüger [Thu, 4 Aug 2022 20:25:02 +0000 (22:25 +0200)]
Rollup merge of #100093 - wcampbell0x2a:unused-parens-for-match-arms, r=petrochenkov

Enable unused_parens for match arms

Fixes: https://github.com/rust-lang/rust/issues/92751
Currently I can't get the `stderr` to work with `./x.py test`, but this should fix the issue. Help would be appreciated!

22 months agoRollup merge of #100058 - TaKO8Ki:suggest-positional-formatting-argument-instead...
Matthias Krüger [Thu, 4 Aug 2022 20:25:01 +0000 (22:25 +0200)]
Rollup merge of #100058 - TaKO8Ki:suggest-positional-formatting-argument-instead-of-format-args-capture, r=estebank

Suggest a positional formatting argument instead of a captured argument

This patch fixes a part of #96999.

fixes #98241
fixes #97311

r? `@estebank`

22 months agoRollup merge of #99772 - ehuss:reenable-submodule-archive, r=Mark-Simulacrum
Matthias Krüger [Thu, 4 Aug 2022 20:25:00 +0000 (22:25 +0200)]
Rollup merge of #99772 - ehuss:reenable-submodule-archive, r=Mark-Simulacrum

Re-enable submodule archive downloads.

This is effectively a revert of #98423 (though it keeps the `--depth 1` flag since that is still helpful).

GitHub has indicated that they have been working on the original issue, and my testing shows that the llvm-project archive download now succeeds 100% of the time.

This should save about a minute on every job.

22 months agoRollup merge of #98796 - compiler-errors:no-semi-if-comma, r=estebank
Matthias Krüger [Thu, 4 Aug 2022 20:24:59 +0000 (22:24 +0200)]
Rollup merge of #98796 - compiler-errors:no-semi-if-comma, r=estebank

Do not exclusively suggest `;` when `,` is also a choice

Fixes #96791

22 months agoAdd test for raw-dylib with an external variable
Daniel Paoliello [Tue, 2 Aug 2022 18:36:41 +0000 (11:36 -0700)]
Add test for raw-dylib with an external variable

22 months agoReword some 1.63.0 release notes
Josh Stone [Thu, 4 Aug 2022 18:48:16 +0000 (11:48 -0700)]
Reword some 1.63.0 release notes

22 months agoFix typo
Santiago Pastorino [Thu, 4 Aug 2022 15:48:20 +0000 (12:48 -0300)]
Fix typo

22 months agoImprove opt_local_def_id docs
Santiago Pastorino [Thu, 4 Aug 2022 15:47:58 +0000 (12:47 -0300)]
Improve opt_local_def_id docs

22 months agoComplete the links for 1.63.0 stabilizations
Josh Stone [Thu, 4 Aug 2022 18:08:15 +0000 (11:08 -0700)]
Complete the links for 1.63.0 stabilizations

22 months agoApply suggested updates
Josh Stone [Wed, 20 Jul 2022 20:16:27 +0000 (13:16 -0700)]
Apply suggested updates

22 months agoAdd release notes for Rust 1.63.0
Josh Stone [Wed, 20 Jul 2022 19:22:34 +0000 (12:22 -0700)]
Add release notes for Rust 1.63.0

22 months agoRelease 1.62.1
Mark Rousskov [Fri, 15 Jul 2022 21:51:06 +0000 (17:51 -0400)]
Release 1.62.1

22 months agoDowngrade dist-powerpc-linux binutils to 2.30
Josh Stone [Thu, 4 Aug 2022 17:16:19 +0000 (10:16 -0700)]
Downgrade dist-powerpc-linux binutils to 2.30

With binutils 2.32, we were getting errors like this:

    relocation truncated to fit: R_PPC_PLTREL24 against symbol
        `__cxa_atexit@@GLIBC_2.1.3' defined in .plt section in
        /x-tools/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu/sysroot/usr/lib/crt1.o

but it builds okay with binutils 2.30.

22 months agoImprove record_def_id_remap docs
Santiago Pastorino [Thu, 4 Aug 2022 15:47:19 +0000 (12:47 -0300)]
Improve record_def_id_remap docs

22 months agoDo not collect lifetimes with Infer resolution
Santiago Pastorino [Thu, 4 Aug 2022 15:40:00 +0000 (12:40 -0300)]
Do not collect lifetimes with Infer resolution

22 months agoRustWrapper: update for TypedPointerType in LLVM
Augie Fackler [Thu, 4 Aug 2022 15:31:01 +0000 (11:31 -0400)]
RustWrapper: update for TypedPointerType in LLVM

This is a result of https://reviews.llvm.org/D130592.

22 months agoUse span_bug instead of panic
Santiago Pastorino [Thu, 4 Aug 2022 15:07:03 +0000 (12:07 -0300)]
Use span_bug instead of panic

22 months agoAdd docs to generics_def_id_map
Santiago Pastorino [Thu, 4 Aug 2022 13:14:16 +0000 (10:14 -0300)]
Add docs to generics_def_id_map

22 months agoAdd docs to record_elided_anchor
Santiago Pastorino [Thu, 4 Aug 2022 13:12:56 +0000 (10:12 -0300)]
Add docs to record_elided_anchor

22 months agoExtract record_elided_anchor
Santiago Pastorino [Thu, 4 Aug 2022 13:10:04 +0000 (10:10 -0300)]
Extract record_elided_anchor

22 months agoMove new_remapping inside with_hir_id_owner
Santiago Pastorino [Thu, 4 Aug 2022 13:05:04 +0000 (10:05 -0300)]
Move new_remapping inside with_hir_id_owner

22 months agoAdd documentation for create_lifetime_defs
Santiago Pastorino [Thu, 4 Aug 2022 13:02:52 +0000 (10:02 -0300)]
Add documentation for create_lifetime_defs

22 months agoAdd more debug calls
Santiago Pastorino [Thu, 4 Aug 2022 12:58:37 +0000 (09:58 -0300)]
Add more debug calls

22 months agoAdd documentation about lifetime args
Santiago Pastorino [Thu, 4 Aug 2022 12:56:12 +0000 (09:56 -0300)]
Add documentation about lifetime args

22 months agoAdd documentation about lifetime_defs
Santiago Pastorino [Thu, 4 Aug 2022 12:52:15 +0000 (09:52 -0300)]
Add documentation about lifetime_defs

22 months agoMove hir_bounds after lifetime_defs
Santiago Pastorino [Thu, 4 Aug 2022 12:44:18 +0000 (09:44 -0300)]
Move hir_bounds after lifetime_defs

22 months agocaptures -> collected_lifetimes
Santiago Pastorino [Thu, 4 Aug 2022 02:26:10 +0000 (23:26 -0300)]
captures -> collected_lifetimes

22 months agoMove lifetimes_in_bounds call to outside with_hir_id_owner block in lower_async_fn_ret_ty
Santiago Pastorino [Thu, 4 Aug 2022 02:24:13 +0000 (23:24 -0300)]
Move lifetimes_in_bounds call to outside with_hir_id_owner block in lower_async_fn_ret_ty

22 months agoMove lifetimes_in_bounds call to outside with_hir_id_owner block in lower_opaque_impl...
Santiago Pastorino [Thu, 4 Aug 2022 02:16:03 +0000 (23:16 -0300)]
Move lifetimes_in_bounds call to outside with_hir_id_owner block in lower_opaque_impl_trait

22 months agoDocument what collected_lifetimes vec containts
Santiago Pastorino [Wed, 3 Aug 2022 22:40:54 +0000 (19:40 -0300)]
Document what collected_lifetimes vec containts

22 months agoDocument lower_opaque_impl_trait
Santiago Pastorino [Wed, 3 Aug 2022 22:34:00 +0000 (19:34 -0300)]
Document lower_opaque_impl_trait

22 months agowith_lifetime_binder is now lower_lifetime_binder and doesn't need a closure
Santiago Pastorino [Wed, 3 Aug 2022 22:09:14 +0000 (19:09 -0300)]
with_lifetime_binder is now lower_lifetime_binder and doesn't need a closure

22 months agoAdd comments on with_remapping
Santiago Pastorino [Wed, 3 Aug 2022 20:32:24 +0000 (17:32 -0300)]
Add comments on with_remapping

22 months agoDocument opt_local_def_id
Santiago Pastorino [Wed, 3 Aug 2022 20:26:38 +0000 (17:26 -0300)]
Document opt_local_def_id

22 months agoDocument generics_def_id_map field and record/get methods on it
Santiago Pastorino [Wed, 3 Aug 2022 20:16:33 +0000 (17:16 -0300)]
Document generics_def_id_map field and record/get methods on it

22 months agoAdd comments about lifetime collect and create lifetime defs for RPITs
Santiago Pastorino [Wed, 3 Aug 2022 20:06:30 +0000 (17:06 -0300)]
Add comments about lifetime collect and create lifetime defs for RPITs

22 months agoAvoid explicitly handling res when is not needed
Santiago Pastorino [Wed, 3 Aug 2022 02:06:38 +0000 (23:06 -0300)]
Avoid explicitly handling res when is not needed

22 months agocreate_and_capture_lifetime_defs -> create_lifetime_defs
Santiago Pastorino [Tue, 2 Aug 2022 23:15:15 +0000 (20:15 -0300)]
create_and_capture_lifetime_defs -> create_lifetime_defs

22 months agoRemove captured_lifetimes and LifetimeCaptureContext and make create_lifetime_defs...
Santiago Pastorino [Tue, 2 Aug 2022 23:14:24 +0000 (20:14 -0300)]
Remove captured_lifetimes and LifetimeCaptureContext and make create_lifetime_defs return the captures

22 months agoImplement def_id based remapping
Santiago Pastorino [Tue, 2 Aug 2022 23:01:40 +0000 (20:01 -0300)]
Implement def_id based remapping

22 months agoRemove local_def_id from captured_lifetimes
Santiago Pastorino [Wed, 3 Aug 2022 02:20:15 +0000 (23:20 -0300)]
Remove local_def_id from captured_lifetimes

22 months agoCapture things as Lifetime object to simplify things
Santiago Pastorino [Tue, 2 Aug 2022 21:04:37 +0000 (18:04 -0300)]
Capture things as Lifetime object to simplify things