]> git.lizzy.rs Git - rust.git/log
rust.git
22 months agoUpdate rls
Eric Huss [Wed, 3 Aug 2022 03:08:30 +0000 (20:08 -0700)]
Update rls

23 months agoRemove CARGO_TEST_DISABLE_GIT_CLI
Eric Huss [Tue, 2 Aug 2022 16:25:35 +0000 (09:25 -0700)]
Remove CARGO_TEST_DISABLE_GIT_CLI

This was a leftover from the Appveyor days.

23 months agoUpdate cargo
Eric Huss [Tue, 2 Aug 2022 16:24:03 +0000 (09:24 -0700)]
Update cargo

23 months agoAuto merge of #99977 - BlackHoleFox:cfte-cstr, r=thomcc
bors [Tue, 2 Aug 2022 09:07:31 +0000 (09:07 +0000)]
Auto merge of #99977 - BlackHoleFox:cfte-cstr, r=thomcc

Add validation to const fn CStr creation

Improves upon the existing validation that only worked when building the stdlib from source. `CStr::from_bytes_with_nul_unchecked` now utilizes `const_eval_select` to validate the safety requirements of the function when used as `const FOO: &CStr = CStr::from_bytes_with_nul_unchecked(b"Foobar\0");`.

This can help catch erroneous code written by accident and, assuming a new enough `rustc` in use, remove the need for boilerplate safety comments for this function in `const` contexts.

~~I think this might need a UI test, but I don't know where to put it. If this is a worth change, a perf run would be nice to make sure the `O(n)` validation isn't too bad. I didn't notice a difference building the stdlib tests locally.~~

23 months agoAuto merge of #100048 - matthiaskrgr:rollup-agimvm6, r=matthiaskrgr
bors [Tue, 2 Aug 2022 06:09:22 +0000 (06:09 +0000)]
Auto merge of #100048 - matthiaskrgr:rollup-agimvm6, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #99156 (`codegen_fulfill_obligation` expect erased regions)
 - #99293 (only run --all-targets in stage0 for Std)
 - #99779 (Fix item info pos and height)
 - #99994 (Remove `guess_head_span`)
 - #100011 (Use Parser's `restrictions` instead of `let_expr_allowed`)
 - #100017 (kmc-solid: Update `Socket::connect_timeout` to be in line with #78802)
 - #100037 (Update rustc man page to match `rustc --help`)
 - #100042 (Update books)

Failed merges:

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

23 months agoRollup merge of #100042 - ehuss:update-books, r=ehuss
Matthias Krüger [Tue, 2 Aug 2022 05:30:47 +0000 (07:30 +0200)]
Rollup merge of #100042 - ehuss:update-books, r=ehuss

Update books

## reference

2 commits in a92be0fef439b3d8e0468d82cb24812d303520a0..f3d3953bf3b158d596c96d55ce5366f9f3f972e9
2022-07-21 19:01:23 -0700 to 2022-08-01 17:17:37 -0700
- Add `let_chains` references (rust-lang/reference#1179)
- Remove outdated warning (rust-lang/reference#1243)

## rust-by-example

18 commits in 3155db49b0d57cd82c65456ac210b69ecec5ccb1..ee342dc91e1ba1bb1e1f1318f84bbe3bfac04798
2022-07-05 20:35:53 -0300 to 2022-07-27 11:06:36 -0300
- Closure inferred twice (rust-lang/rust-by-example#1588)
- fix a syntax bug in example assembly (rust-lang/rust-by-example#1511)
- Minor grammar change in src/std/rc.md paragraph 2 (rust-lang/rust-by-example#1586)
- Fix typo in asm.md (rust-lang/rust-by-example#1585)
- Fix incorrect padding in fixed-width print (rust-lang/rust-by-example#1584)
- Update print.md (rust-lang/rust-by-example#1582)
- add-chapter-on-defaults (rust-lang/rust-by-example#1580)
- Fix typo (rust-lang/rust-by-example#1579)
- fix a compile error (rust-lang/rust-by-example#1578)
- Suggest using mod.rs pattern to share test code (rust-lang/rust-by-example#1577)
- fix a compile error in iter_any.md (rust-lang/rust-by-example#1576)
- Mention attribute like macros in attributes.md (rust-lang/rust-by-example#1574)
- Update exercise to be clearer (rust-lang/rust-by-example#1573)
- fixes link for turbofish in testcase_mapreduce.md (rust-lang/rust-by-example#1572)
- Fix inconsistency between comment and code in hello/print.md (rust-lang/rust-by-example#1571)
- Fixes a typo in print.md (rust-lang/rust-by-example#1570)
- into_iter-moves-elements (rust-lang/rust-by-example#1569)
- Fix a typo in print.md (rust-lang/rust-by-example#1568)

## rustc-dev-guide

16 commits in d5201cddace979b299ec1bf9fd8997338151aa9d..04f3cf0bb2f5a6ee2bfc4b1a6a6cd8c11d1c5531
2022-07-21 04:48:49 +0200 to 2022-07-31 07:46:57 +0200
- address review comment
- accept review suggestion
- try address review comments
- summary of chapter
- Update src/building/compiler-documenting.md
- revamp doc-build chapter
- minor fixes
- Prefer relative links
- Fix the link to clippy docs
- Fix the link to `ResolverAstLowering`
- Fix the link to `ProcMacro` trait
- Fix the link to `Lazy<T>`
- Add instructions to fix build errors in std after adding a new target
- Document how to build a cross-compiler
- Add documentation about Microsoft provided debuggers and CodeView/PDB… (rust-lang/rustc-dev-guide#1406)
- rust-analyzer is now a subtree

## embedded-book

2 commits in 766979590da8100998f0d662499d4a901d8d1640..befe6840874311635c417cf731377f07234ee373
2022-07-04 09:13:58 +0000 to 2022-07-25 07:51:14 +0000
- Updated instructions for running first Hardware example  (rust-embedded/book#323)
- Improved ligability for hardware.md  (rust-embedded/book#324)

23 months agoRollup merge of #100037 - fw-immunant:patch-1, r=jyn514
Matthias Krüger [Tue, 2 Aug 2022 05:30:46 +0000 (07:30 +0200)]
Rollup merge of #100037 - fw-immunant:patch-1, r=jyn514

Update rustc man page to match `rustc --help`

This brings the `--crate-type`,  `--emit`, and `--print` options' allowed arguments into sync with that printed by `rustc --help`.

c.f. the `opt::multi_s` calls for `"crate-type"`, `"emit"`, and `"print"` here: https://github.com/rust-lang/rust/blob/master/compiler/rustc_session/src/config.rs

23 months agoRollup merge of #100017 - solid-rs:patch/kmc-solid/adapt-to-78802, r=thomcc
Matthias Krüger [Tue, 2 Aug 2022 05:30:45 +0000 (07:30 +0200)]
Rollup merge of #100017 - solid-rs:patch/kmc-solid/adapt-to-78802, r=thomcc

kmc-solid: Update `Socket::connect_timeout` to be in line with #78802

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

```
error[E0308]: mismatched types
   --> library\std\src\sys\solid\net.rs:234:45
    |
234 |             cvt(netc::connect(self.0.raw(), addrp, len))
    |                 -------------               ^^^^^ expected *-ptr, found union `SocketAddrCRepr`
    |                 |
    |                 arguments to this function are incorrect
    |
    = note: expected raw pointer `*const sockets::sockaddr`
                     found union `SocketAddrCRepr`
note: function defined here
   --> library\std\src\sys\solid\abi\sockets.rs:173:12
    |
    173 |     pub fn connect(s: c_int, name: *const sockaddr, namelen: socklen_t) -> c_int;
    |            ^^^^^^^
```

23 months agoRollup merge of #100011 - compiler-errors:let-chain-restriction, r=fee1-dead
Matthias Krüger [Tue, 2 Aug 2022 05:30:44 +0000 (07:30 +0200)]
Rollup merge of #100011 - compiler-errors:let-chain-restriction, r=fee1-dead

Use Parser's `restrictions` instead of `let_expr_allowed`

This also means that the `ALLOW_LET` flag is reset properly for subexpressions, so we can properly deny things like `a && (b && let c = d)`. Also the parser is a tiny bit smaller now.

It doesn't reject _all_ bad `let` expr usages, just a bit more.

cc `@c410-f3r`

23 months agoRollup merge of #99994 - TaKO8Ki:remove-guess-head-span, r=fee1-dead
Matthias Krüger [Tue, 2 Aug 2022 05:30:43 +0000 (07:30 +0200)]
Rollup merge of #99994 - TaKO8Ki:remove-guess-head-span, r=fee1-dead

Remove `guess_head_span`

follow-up to #98519

23 months agoRollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, r=notriddle
Matthias Krüger [Tue, 2 Aug 2022 05:30:41 +0000 (07:30 +0200)]
Rollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, r=notriddle

Fix item info pos and height

Fixes https://github.com/rust-lang/rust/issues/98266.
Fixes https://github.com/rust-lang/rust/issues/98343.

You can test it [here](https://rustdoc.crud.net/imperio/fix-item-info-pos-and-height/lib2/trait.Trait.html).

Here is a screenshot of the result:

![Screenshot from 2022-07-26 21-55-53](https://user-images.githubusercontent.com/3050060/181100624-18b8b045-5c25-4c7c-9c44-97d55d29b675.png)

r? `@jsha`

23 months agoRollup merge of #99293 - jo3bingham:issue-98720-fix, r=jyn514
Matthias Krüger [Tue, 2 Aug 2022 05:30:40 +0000 (07:30 +0200)]
Rollup merge of #99293 - jo3bingham:issue-98720-fix, r=jyn514

only run --all-targets in stage0 for Std

Repro'd the issue with `python3 x.py check --stage 1 library/std` and tested the fix with the same command.

r? `@jyn514`

I tried to implement [this solution](https://github.com/rust-lang/rust/issues/98720#issuecomment-1184435462), but didn't have any luck. I don't think I fully understood what needed to be done. However, I would love to be mentored on it since it would be a more correct solution, and I can learn more about how bootstrap works.

23 months agoRollup merge of #99156 - lcnr:omoe-wa, r=wesleywiser
Matthias Krüger [Tue, 2 Aug 2022 05:30:39 +0000 (07:30 +0200)]
Rollup merge of #99156 - lcnr:omoe-wa, r=wesleywiser

`codegen_fulfill_obligation` expect erased regions

it's a query, so by erasing regions before calling it, we get better caching.
This doesn't actually change anything as its already the status quo.

23 months agoAuto merge of #99431 - yaahc:error-in-core, r=joshtriplett
bors [Tue, 2 Aug 2022 03:25:41 +0000 (03:25 +0000)]
Auto merge of #99431 - yaahc:error-in-core, r=joshtriplett

Remove `fn backtrace` and replace with usages of provider API

This PR is part of moving error into core and has been split to facilitate review.

23 months agoremove a `SourceMap::guess_head_span`
Takayuki Maeda [Mon, 1 Aug 2022 03:01:53 +0000 (12:01 +0900)]
remove a `SourceMap::guess_head_span`

23 months agoUpdate books
Eric Huss [Tue, 2 Aug 2022 01:57:55 +0000 (18:57 -0700)]
Update books

23 months agoAuto merge of #100033 - rylev:no-cancel-try-perf, r=Mark-Simulacrum
bors [Tue, 2 Aug 2022 00:39:17 +0000 (00:39 +0000)]
Auto merge of #100033 - rylev:no-cancel-try-perf, r=Mark-Simulacrum

Don't cancel try-perf branch if 'outdated'

`try-perf` just like the `try` branch should always run all jobs to completion. This allows us to use the branch like a queue.

r? `@Mark-Simulacrum`

23 months agoDon't cancel try-perf branch if 'outdated'
Ryan Levick [Mon, 1 Aug 2022 20:52:48 +0000 (22:52 +0200)]
Don't cancel try-perf branch if 'outdated'

23 months agoUpdate rustc man page to match `rustc --help`
Frances Wingerter [Mon, 1 Aug 2022 22:03:18 +0000 (22:03 +0000)]
Update rustc man page to match `rustc --help`

This brings the `--crate-type`,  `--emit`, and `--print` options' allowed arguments into sync with that printed by `rustc --help`.

23 months agoAuto merge of #95884 - cjgillot:assoc-item, r=lcnr
bors [Mon, 1 Aug 2022 21:43:35 +0000 (21:43 +0000)]
Auto merge of #95884 - cjgillot:assoc-item, r=lcnr

Thin `AssocItem`

This PR removes a few fields from `AssocItem` that should be easily computed using other queries.
This simplifies some of the metadata decoding.

23 months agoremove fn backtrace
Jane Losare-Lusby [Mon, 18 Jul 2022 17:52:03 +0000 (17:52 +0000)]
remove fn backtrace

23 months agoMatch on TraitItem exhaustively.
Camille GILLOT [Mon, 1 Aug 2022 17:46:10 +0000 (19:46 +0200)]
Match on TraitItem exhaustively.

23 months agoBless incremental tests.
Camille GILLOT [Sat, 30 Jul 2022 16:43:37 +0000 (18:43 +0200)]
Bless incremental tests.

23 months agoRemove trait_of_item query.
Camille GILLOT [Sat, 12 Mar 2022 23:58:21 +0000 (00:58 +0100)]
Remove trait_of_item query.

23 months agoRemove DefId from AssocItemContainer.
Camille GILLOT [Sat, 12 Mar 2022 23:52:25 +0000 (00:52 +0100)]
Remove DefId from AssocItemContainer.

23 months agoRemove visibility from AssocItem.
Camille GILLOT [Sat, 12 Mar 2022 20:40:43 +0000 (21:40 +0100)]
Remove visibility from AssocItem.

23 months agoStore associated item defaultness in impl_defaultness.
Camille GILLOT [Sat, 12 Mar 2022 18:36:11 +0000 (19:36 +0100)]
Store associated item defaultness in impl_defaultness.

23 months agoadd comment
Joseph Bingham [Mon, 1 Aug 2022 19:15:33 +0000 (20:15 +0100)]
add comment

23 months agoAuto merge of #99476 - dpaoliello:rawdylibvectorcall, r=michaelwoerister
bors [Mon, 1 Aug 2022 18:43:57 +0000 (18:43 +0000)]
Auto merge of #99476 - dpaoliello:rawdylibvectorcall, r=michaelwoerister

Add tests for raw-dylib with vectorcall, and fix vectorcall code generation

* Adds tests for using `raw-dylib` (#58713) with `vectorcall`.
* Fixed code generation for `vectorcall` (parameters have to be marked with `InReg`, just like `fastcall`).
* Enabled running the `raw-dylib` `fastcall` tests when using MSVC (since I had to add support in the test for running MSVC-only tests since GCC doesn't support `vectorcall`).

23 months agoAuto merge of #100024 - matthiaskrgr:rollup-36ab4wx, r=matthiaskrgr
bors [Mon, 1 Aug 2022 15:40:43 +0000 (15:40 +0000)]
Auto merge of #100024 - matthiaskrgr:rollup-36ab4wx, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #99340 (Fix ICE in Definitions::create_def)
 - #99629 (Improve `cannot move out of` error message)
 - #99864 (bootstrap: don't emit warn about duplicated deps with same/different features if some of sets actually empty)
 - #99911 (Remove some uses of `guess_head_span`)
 - #99976 (Make Rustdoc exit with correct error code when scraping examples from invalid files)
 - #100003 (Improve size assertions.)
 - #100012 (Avoid `Ty` to `String` conversions)
 - #100020 (better error when python is not found in x - issue #99648)

Failed merges:

 - #99994 (Replace `guess_head_span` with `opt_span`)

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

23 months agoRollup merge of #100020 - CallumIO:issue-99648, r=jyn514
Matthias Krüger [Mon, 1 Aug 2022 14:49:35 +0000 (16:49 +0200)]
Rollup merge of #100020 - CallumIO:issue-99648, r=jyn514

better error when python is not found in x - issue #99648

`x` now shows an appropriate error message and exits, when a version of `python` is not found on the users `PATH`.

Resolves #99648

23 months agoRollup merge of #100012 - TaKO8Ki:avoid-ty-to-string-conversions, r=fee1-dead
Matthias Krüger [Mon, 1 Aug 2022 14:49:34 +0000 (16:49 +0200)]
Rollup merge of #100012 - TaKO8Ki:avoid-ty-to-string-conversions, r=fee1-dead

Avoid `Ty` to `String` conversions

follow-up to #98668

23 months agoRollup merge of #100003 - nnethercote:improve-size-assertions, r=lqd
Matthias Krüger [Mon, 1 Aug 2022 14:49:33 +0000 (16:49 +0200)]
Rollup merge of #100003 - nnethercote:improve-size-assertions, r=lqd

Improve size assertions.

- For any file with four or more size assertions, move them into a
  separate module (as is already done for `hir.rs`).
- Add some more for AST nodes and THIR nodes.
- Put the `hir.rs` ones in alphabetical order.

r? `@lqd`

23 months agoRollup merge of #99976 - willcrichton:example-analyzer, r=jyn514
Matthias Krüger [Mon, 1 Aug 2022 14:49:32 +0000 (16:49 +0200)]
Rollup merge of #99976 - willcrichton:example-analyzer, r=jyn514

Make Rustdoc exit with correct error code when scraping examples from invalid files

This PR fixes a small issue with the new Rustdoc scrape-examples feature. If a file that is being scraped has a type error, then currently that error is printed out, but the rustdoc process exits as if it succeeded. This is a problem for Cargo, which needs to track whether scraping succeeded (see rust-lang/cargo#10343).

This PR fixes the issue by checking whether an error is emitted, and aborting if so.

23 months agoRollup merge of #99911 - cjgillot:no-guess, r=davidtwco
Matthias Krüger [Mon, 1 Aug 2022 14:49:31 +0000 (16:49 +0200)]
Rollup merge of #99911 - cjgillot:no-guess, r=davidtwco

Remove some uses of `guess_head_span`

That function cuts a span at the first occurrence of `{`.  Using `def_span` is almost always more precise.

23 months agoRollup merge of #99864 - klensy:bootstrap-art-dupe, r=jyn514
Matthias Krüger [Mon, 1 Aug 2022 14:49:30 +0000 (16:49 +0200)]
Rollup merge of #99864 - klensy:bootstrap-art-dupe, r=jyn514

bootstrap: don't emit warn about duplicated deps with same/different features if some of sets actually empty

Example (https://github.com/rust-lang-ci/rust/runs/7551453940?check_suite_focus=true#step:25:15008):
```
 duplicate artifacts found when compiling a tool, this typically means that something was recompiled because a transitive dependency has different features activated than in a previous build:

the following dependencies are duplicated although they have the same features enabled:
the following dependencies have different features:
  memchr 2.5.0 (registry+https://github.com/rust-lang/crates.io-index)
    `clippy-driver` additionally enabled features {} at "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-freebsd/release/deps/libmemchr-44aa6ff4f08e293f.rlib"
    `cargo` additionally enabled features {"use_std"} at "/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-tools/x86_64-unknown-freebsd/release/deps/libmemchr-70e29af0fd3ef292.rlib"
```

Notice that no info printed under  `the following dependencies are duplicated although they have the same features enabled:`

23 months agoRollup merge of #99629 - obeis:issue-99470, r=compiler-errors
Matthias Krüger [Mon, 1 Aug 2022 14:49:28 +0000 (16:49 +0200)]
Rollup merge of #99629 - obeis:issue-99470, r=compiler-errors

Improve `cannot move out of` error message

Closes #99470
r? `@bjorn3`

23 months agoRollup merge of #99340 - GoldsteinE:fix-localdefid-debug-ice, r=lcnr
Matthias Krüger [Mon, 1 Aug 2022 14:49:27 +0000 (16:49 +0200)]
Rollup merge of #99340 - GoldsteinE:fix-localdefid-debug-ice, r=lcnr

Fix ICE in Definitions::create_def

`Debug` implementation for `LocalDefId` uses global `Definitions`. Normally it’s ok, but we can’t do it while holding a mutable reference to `Definitions`, since it causes ICE or deadlock (depending on whether `parallel_compiler` is enabled).

This PR effectively copies the `Debug` implementation into the problematic method. I don’t particularly love this solution (since it creates code duplication), but I don’t see any other options.

This issue was discovered when running `rustdoc` with `RUSTDOC_LOG=trace` on the following file:
```rust
pub struct SomeStruct;

fn asdf() {
    impl SomeStruct {
        pub fn qwop(&self) {
            println!("hidden function");
        }
    }
}
```

I’m not sure how to create a test for this behavior.

23 months agofix ICE in Definitions::create_def
Goldstein [Sat, 16 Jul 2022 18:30:17 +0000 (21:30 +0300)]
fix ICE in Definitions::create_def

23 months agoAuto merge of #99884 - nnethercote:lexer-improvements, r=matklad
bors [Mon, 1 Aug 2022 12:52:49 +0000 (12:52 +0000)]
Auto merge of #99884 - nnethercote:lexer-improvements, r=matklad

Lexer improvements

Some cleanups and small speed improvements.

r? `@matklad`

23 months agofix: better error when python not found in x
Callum Leslie [Mon, 1 Aug 2022 11:04:56 +0000 (12:04 +0100)]
fix: better error when python not found in x

chore: clean comments to be relevant

23 months agoMake Rustdoc exit with correct error code when scrape examples from invalid files
Will Crichton [Sun, 31 Jul 2022 04:12:04 +0000 (21:12 -0700)]
Make Rustdoc exit with correct error code when scrape examples from invalid files

23 months agokmc-solid: Adapt to a recent change in the `IntoInner` impl of `SocketAddr`
Tomoaki Kawada [Mon, 1 Aug 2022 06:19:25 +0000 (15:19 +0900)]
kmc-solid: Adapt to a recent change in the `IntoInner` impl of `SocketAddr`

`(x: SocketAddr).into_inner()` evaluates to `(SocketAddrCRepr,
socklen_t)` instead of `(*const sockaddr, socklen_t)` as of
commit 55e23db13.

23 months agoAuto merge of #98246 - joshtriplett:times, r=m-ou-se
bors [Mon, 1 Aug 2022 06:44:43 +0000 (06:44 +0000)]
Auto merge of #98246 - joshtriplett:times, r=m-ou-se

Support setting file accessed/modified timestamps

Add `struct FileTimes` to contain the relevant file timestamps, since
most platforms require setting all of them at once. (This also allows
for future platform-specific extensions such as setting creation time.)

Add `File::set_file_time` to set the timestamps for a `File`.

Implement the `sys` backends for UNIX, macOS (which needs to fall back
to `futimes` before macOS 10.13 because it lacks `futimens`), Windows,
and WASI.

23 months agoAuto merge of #99944 - bjorn3:hide_proc_macro_symbols, r=eddyb
bors [Mon, 1 Aug 2022 03:58:52 +0000 (03:58 +0000)]
Auto merge of #99944 - bjorn3:hide_proc_macro_symbols, r=eddyb

Limit symbols exported from proc macros

Only `__rustc_proc_macro_decls_*__` and `rust_metadata_*` need to be
exported for proc macros to work. All other symbols only increase binary
size and have the potential to conflict with symbols from the host
compiler.

Fixes https://github.com/rust-lang/rust/issues/99909
Fixes #59998

cc `@eddyb`

23 months agoavoid `Ty` to `String` conversions
Takayuki Maeda [Mon, 1 Aug 2022 03:52:30 +0000 (12:52 +0900)]
avoid `Ty` to `String` conversions

23 months agoUse expr parse restrictions for let expr parsing
Michael Goulet [Mon, 1 Aug 2022 01:13:16 +0000 (01:13 +0000)]
Use expr parse restrictions for let expr parsing

23 months agoAuto merge of #99998 - matthiaskrgr:rollup-igafy0r, r=matthiaskrgr
bors [Mon, 1 Aug 2022 01:11:08 +0000 (01:11 +0000)]
Auto merge of #99998 - matthiaskrgr:rollup-igafy0r, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #99519 (Remove implicit names and values from `--cfg` in `--check-cfg`)
 - #99620 (`-Z location-detail`: provide option to disable all location details)
 - #99932 (Fix unwinding on certain platforms when debug assertions are enabled)
 - #99973 (Layout things)
 - #99980 (Remove more Clean trait implementations)
 - #99984 (Fix compat.rs for `cfg(miri)`)
 - #99986 (Add wrap suggestions for record variants)

Failed merges:

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

23 months agoImprove size assertions.
Nicholas Nethercote [Sat, 30 Jul 2022 20:57:53 +0000 (06:57 +1000)]
Improve size assertions.

- For any file with four or more size assertions, move them into a
  separate module (as is already done for `hir.rs`).
- Add some more for AST nodes and THIR nodes.
- Put the `hir.rs` ones in alphabetical order.

23 months agoShrink `Token`.
Nicholas Nethercote [Wed, 27 Jul 2022 03:59:30 +0000 (13:59 +1000)]
Shrink `Token`.

From 72 bytes to 12 bytes (on x86-64).

There are two parts to this:
- Changing various source code offsets from 64-bit to 32-bit. This is
  not a problem because the rest of rustc also uses 32-bit source code
  offsets. This means `Token` is no longer `Copy` but this causes no
  problems.
- Removing the `RawStrError` from `LiteralKind`. Raw string literal
  invalidity is now indicated by a `None` value within
  `RawStr`/`RawByteStr`, and the new `validate_raw_str` function can be
  used to re-lex an invalid raw string literal to get the `RawStrError`.

There is one very small change in behaviour. Previously, if a raw string
literal matched both the `InvalidStarter` and `TooManyHashes` cases,
the latter would override the former. This has now changed, because
`raw_double_quoted_string` now uses `?` and so returns immediately upon
detecting the `InvalidStarter` case. I think this is a slight
improvement to report the earlier-detected error, and it explains the
change in the `test_too_many_hashes` test.

The commit also removes a couple of comments that refer to #77629 and
say that the size of these types don't affect performance. These
comments are wrong, though the performance effect is small.

23 months agoAdd a size assertion for `Token`.
Nicholas Nethercote [Wed, 27 Jul 2022 04:21:08 +0000 (14:21 +1000)]
Add a size assertion for `Token`.

23 months agoInline `TokenStreamBuilder::push`.
Nicholas Nethercote [Wed, 27 Jul 2022 05:13:15 +0000 (15:13 +1000)]
Inline `TokenStreamBuilder::push`.

Because it's small and hot.

23 months agoAvoid an unnecessary `return`.
Nicholas Nethercote [Wed, 27 Jul 2022 05:07:19 +0000 (15:07 +1000)]
Avoid an unnecessary `return`.

23 months agoInline `first_token`.
Nicholas Nethercote [Wed, 27 Jul 2022 03:50:48 +0000 (13:50 +1000)]
Inline `first_token`.

Because it's tiny and hot.

23 months agoRemove `StringReader::end_src_index`.
Nicholas Nethercote [Wed, 27 Jul 2022 02:50:22 +0000 (12:50 +1000)]
Remove `StringReader::end_src_index`.

It not needed, always being set to the end of the text.

23 months agoImprove shebang handling.
Nicholas Nethercote [Wed, 27 Jul 2022 02:15:35 +0000 (12:15 +1000)]
Improve shebang handling.

Avoid doing stuff until it's necessary.

23 months agoAuto merge of #99052 - tmiasko:bitset-clone-from, r=Mark-Simulacrum
bors [Sun, 31 Jul 2022 21:40:21 +0000 (21:40 +0000)]
Auto merge of #99052 - tmiasko:bitset-clone-from, r=Mark-Simulacrum

Fix cloning from a BitSet with a different domain size

The previous implementation incorrectly assumed that the
number of words in a bit set is equal to the domain size.

The new implementation delegates to `Vec::clone_from` which
is specialized for `Copy` elements.

Fixes #99006.

23 months agoRollup merge of #99986 - WaffleLapkin:record_struct_wrap_suggestion, r=compiler-errors
Matthias Krüger [Sun, 31 Jul 2022 21:39:44 +0000 (23:39 +0200)]
Rollup merge of #99986 - WaffleLapkin:record_struct_wrap_suggestion, r=compiler-errors

Add wrap suggestions for record variants

This PR adds a suggestions to wrap an expression in a record struct/variant when encountering mismatched types, similarly to a suggestion to wrap expression in a tuple struct that was added before.

An example:
```rust
struct B {
    f: u8,
}

enum E {
    A(u32),
    B { f: u8 },
}

fn main() {
    let _: B = 1;
    let _: E = 1;
}
```
```text
error[E0308]: mismatched types
  --> ./t.rs:11:16
   |
11 |     let _: B = 1;
   |            -   ^ expected struct `B`, found integer
   |            |
   |            expected due to this
   |
help: try wrapping the expression in `B`
   |
11 |     let _: B = B { f: 1 };
   |                ++++++   +

error[E0308]: mismatched types
  --> ./t.rs:12:16
   |
12 |     let _: E = 1;
   |            -   ^ expected enum `E`, found integer
   |            |
   |            expected due to this
   |
help: try wrapping the expression in a variant of `E`
   |
12 |     let _: E = E::A(1);
   |                +++++ +
12 |     let _: E = E::B { f: 1 };
   |                +++++++++   +
```

r? `@compiler-errors`

23 months agoRollup merge of #99984 - ChrisDenton:fix-miri, r=Mark-Simulacrum
Matthias Krüger [Sun, 31 Jul 2022 21:39:44 +0000 (23:39 +0200)]
Rollup merge of #99984 - ChrisDenton:fix-miri, r=Mark-Simulacrum

Fix compat.rs for `cfg(miri)`

Fixes #99982

23 months agoRollup merge of #99980 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC
Matthias Krüger [Sun, 31 Jul 2022 21:39:43 +0000 (23:39 +0200)]
Rollup merge of #99980 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC

Remove more Clean trait implementations

This time as well it allowed to remove a function.

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

r? `@notriddle`

23 months agoRollup merge of #99973 - RalfJung:layout-things, r=eddyb
Matthias Krüger [Sun, 31 Jul 2022 21:39:42 +0000 (23:39 +0200)]
Rollup merge of #99973 - RalfJung:layout-things, r=eddyb

Layout things

These two commits are pretty independent, but didn't seem worth doing individual PRs for:
- Always check that size is a multiple of align, even without debug assertions
- Change Layout debug printing to put `variants` last, since it often huge and not usually the part we are most interested in

Cc `@eddyb`

23 months agoRollup merge of #99932 - madsmtm:fix-unwinding-debug-assertions, r=Amanieu
Matthias Krüger [Sun, 31 Jul 2022 21:39:41 +0000 (23:39 +0200)]
Rollup merge of #99932 - madsmtm:fix-unwinding-debug-assertions, r=Amanieu

Fix unwinding on certain platforms when debug assertions are enabled

This came up on `armv7-apple-ios` when using `-Zbuild-std`.

Looks like this is a leftover from a [conversion from C to Rust](051c2d14fb1e73866376668088971605d38f0c65), where integer wrapping is implicit.

Not at all sure how the unwinding code works!

23 months agoRollup merge of #99620 - hudson-ayers:fix-location-detail, r=davidtwco
Matthias Krüger [Sun, 31 Jul 2022 21:39:40 +0000 (23:39 +0200)]
Rollup merge of #99620 - hudson-ayers:fix-location-detail, r=davidtwco

`-Z location-detail`: provide option to disable all location details

As reported [here](https://github.com/rust-lang/rust/pull/89920#issuecomment-1190598924), when I first implemented the `-Z location-detail` flag there was a bug, where passing an empty list was not correctly supported, and instead rejected by the compiler. This PR fixes that such that passing an empty list results in no location details being tracked, as originally specified in https://github.com/rust-lang/rfcs/pull/2091 .

This PR also adds a test case to verify that this option continues to work as intended.

23 months agoRollup merge of #99519 - Urgau:check-cfg-implicit, r=petrochenkov
Matthias Krüger [Sun, 31 Jul 2022 21:39:38 +0000 (23:39 +0200)]
Rollup merge of #99519 - Urgau:check-cfg-implicit, r=petrochenkov

Remove implicit names and values from `--cfg` in `--check-cfg`

This PR remove the implicit names and values from `--cfg` in `--check-cfg` because the behavior is quite surprising but also because it's really easy to inadvertently really on the implicitness and when the `--cfg` is not set anymore to have an unexpected warning from an unexpected condition that pass with the implicitness.

This change in behavior will also enable us to warn when an unexpected `--cfg` is passed, ex: the user wrote `--cfg=unstabl` instead of `--cfg=unstable`. The implementation of the warning will be done in a follow-up PR.

cc `@petrochenkov`

23 months agoAuto merge of #99988 - rylev:allow-try-perf, r=Mark-Simulacrum
bors [Sun, 31 Jul 2022 18:59:10 +0000 (18:59 +0000)]
Auto merge of #99988 - rylev:allow-try-perf, r=Mark-Simulacrum

Allow try-perf branch to run in CI

We want to be able to build artifacts through the try-perf branch but without this change the CI fails early.

r? `@Mark-Simulacrum`

23 months agoAdd validation to const fn CStr creation
BlackHoleFox [Sun, 31 Jul 2022 08:10:09 +0000 (03:10 -0500)]
Add validation to const fn CStr creation

23 months agoImprove `cannot move out of` error message
Obei Sideg [Fri, 22 Jul 2022 21:35:35 +0000 (00:35 +0300)]
Improve `cannot move out of` error message

23 months agoAllow try-perf branch to run in CI
Ryan Levick [Sun, 31 Jul 2022 16:53:34 +0000 (18:53 +0200)]
Allow try-perf branch to run in CI

23 months agoMake sure `symbol_name` is const evaluated
Chris Denton [Sun, 31 Jul 2022 14:07:47 +0000 (15:07 +0100)]
Make sure `symbol_name` is const evaluated

23 months agoAuto merge of #78802 - faern:simplify-socketaddr, r=joshtriplett
bors [Sun, 31 Jul 2022 15:56:28 +0000 (15:56 +0000)]
Auto merge of #78802 - faern:simplify-socketaddr, r=joshtriplett

Implement network primitives with ideal Rust layout, not C system layout

This PR is the result of this internals forum thread: https://internals.rust-lang.org/t/why-are-socketaddrv4-socketaddrv6-based-on-low-level-sockaddr-in-6/13321.

Instead of basing `std:::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6}` on system (C) structs, they are encoded in a more optimal and idiomatic Rust way.

This changes the public API of std by introducing structural equality impls for all four types here, which means that `match ipv4addr { SOME_CONSTANT => ... }` will now compile, whereas previously this was an error. No other intentional changes are introduced to public API.

It's possible to observe the current layout of these types (e.g., by pointer casting); most but not all libraries which were found by Crater to do this have had updates issued and affected versions yanked. See report below.

### Benefits of this change

- It will become possible to move these fundamental network types from `std` into `core` ([RFC](https://github.com/rust-lang/rfcs/pull/2832)).
- Some methods that can't be made `const fn`s today can be made `const fn`s with this change.
- `SocketAddrV4` only occupies 6 bytes instead of 16 bytes.
- These simple primitives become easier to read and uses less `unsafe`.
- Makes these types support structural equality, which means you can now (for instance) match an `Ipv4Addr` against a constant

### ~Remaining~ Previous problems

This change obviously changes the memory layout of the types. And it turns out some libraries invalidly assumes the memory layout and does very dangerous pointer casts to convert them. These libraries will have undefined behaviour and perform invalid memory access until patched.

- [x] - `mio` - Issue: https://github.com/tokio-rs/mio/issues/1386.
  - [x] `0.7` branch https://github.com/tokio-rs/mio/pull/1388
  - [x] `0.7.6` published https://github.com/tokio-rs/mio/pull/1398
  - [x] Yank all `0.7` versions older than `0.7.6`
  - [x] Report `<0.7.6` to RustSec Advisory Database https://rustsec.org/advisories/RUSTSEC-2020-0081.html
- [x] - `socket2` - Issue: https://github.com/rust-lang/socket2-rs/issues/119.
  - [x] `0.3.x` branch https://github.com/rust-lang/socket2-rs/pull/120
  - [x] `0.3.16` published
  - [x] `master` branch https://github.com/rust-lang/socket2-rs/pull/122
  - [x] Yank all `0.3` versions older than `0.3.16`
  - [x] Report `<0.3.16` to RustSec Advisory Database https://rustsec.org/advisories/RUSTSEC-2020-0079.html
- [x] - `net2` - Issue: https://github.com/deprecrated/net2-rs/issues/105
  - [x] https://github.com/deprecrated/net2-rs/pull/106
  - [x] `0.2.36` published
  - [x] Yank all `0.2` versions older than `0.2.36`
  - [x] Report `<0.2.36` to RustSec Advisory Database https://rustsec.org/advisories/RUSTSEC-2020-0078.html
- [x] - `miow` - Issue: https://github.com/yoshuawuyts/miow/issues/38
  - [x] `0.3.x` - https://github.com/yoshuawuyts/miow/pull/39
  - [x] `0.3.6` published
  - [x] `0.2.x` - https://github.com/yoshuawuyts/miow/pull/40
  - [x] `0.2.2` published
  - [x] Yanked all `0.2` versions older than `0.2.2`
  - [x] Yanked all `0.3` versions older than `0.3.6`
  - [x] Report `<0.2.2` and `<0.3.6` to RustSec Advisory Database https://rustsec.org/advisories/RUSTSEC-2020-0080.html
- [x] - `quinn master` (aka what became 0.7) - https://github.com/quinn-rs/quinn/issues/968 https://github.com/quinn-rs/quinn/pull/987
  - [x] - `quinn 0.6` - https://github.com/quinn-rs/quinn/pull/1045
  - [x] - `quinn 0.5` - https://github.com/quinn-rs/quinn/pull/1046
  - [x] - Release `0.7.0`, `0.6.2` and `0.5.4`
- [x] - `nb-connect` - https://github.com/smol-rs/nb-connect/issues/1
  - [x] - Release `1.0.3`
  - [x] - Yank all versions older than `1.0.3`
- [x] - `shadowsocks-rust` - https://github.com/shadowsocks/shadowsocks-rust/issues/462
- [ ] - `rio` - https://github.com/spacejam/rio/issues/44
- [ ] - `seaslug` - https://github.com/spacejam/seaslug/issues/1

#### Fixed crate versions

All crates I have found that assumed the memory layout have been fixed and published. The crates and versions that will continue working even as/if this PR is merged is (please upgrade these to help unblock this PR):

* `net2 0.2.36`
* `socket2 0.3.16`
* `miow 0.2.2`
* `miow 0.3.6`
* `mio 0.7.6`
* `mio 0.6.23` - Never had the invalid assumption itself, but has now been bumped to only allow fixed dependencies (`net2` + `miow`)
* `nb-connect 1.0.3`
* `quinn 0.5.4`
* `quinn 0.6.2`

### Release notes draft

This release changes the memory layout of `Ipv4Addr`, `Ipv6Addr`, `SocketAddrV4` and `SocketAddrV6`. The standard library no longer implements these as the corresponding `libc` structs (`sockaddr_in`, `sockaddr_in6` etc.). This internal representation was never exposed, but some crates relied on it anyway by unsafely transmuting. This change will cause those crates to make invalid memory accesses. Notably `net2 <0.2.36`, `socket2 <0.3.16`, `mio <0.7.6`, `miow <0.3.6` and a few other crates are affected. All known affected crates have been patched and have had fixed versions published over a year ago. If any affected crate is still in your dependency tree, you need to upgrade them before using this version of Rust.

23 months agoSkip unstable fields when suggesting wrapping expression in structs
Maybe Waffle [Sun, 31 Jul 2022 15:12:53 +0000 (19:12 +0400)]
Skip unstable fields when suggesting wrapping expression in structs

23 months ago--bless tests
Maybe Waffle [Sun, 31 Jul 2022 14:09:39 +0000 (18:09 +0400)]
--bless tests

23 months agoRefactor wrap suggestion code (just a bit)
Maybe Waffle [Sun, 31 Jul 2022 13:53:47 +0000 (17:53 +0400)]
Refactor wrap suggestion code (just a bit)

23 months agoFix compat.rs for `cfg(miri)`
Chris Denton [Sun, 31 Jul 2022 13:45:26 +0000 (14:45 +0100)]
Fix compat.rs for `cfg(miri)`

23 months agoSuggest wrapping expressions in single-field record variants
Maybe Waffle [Sun, 31 Jul 2022 13:38:28 +0000 (17:38 +0400)]
Suggest wrapping expressions in single-field record variants

23 months agoAuto merge of #99979 - Dylan-DPC:rollup-ikkejgy, r=Dylan-DPC
bors [Sun, 31 Jul 2022 13:26:27 +0000 (13:26 +0000)]
Auto merge of #99979 - Dylan-DPC:rollup-ikkejgy, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #99186 (Use LocalDefId for closures more)
 - #99741 (Use `impl`'s generics when suggesting fix on bad `impl Copy`)
 - #99844 (Introduce an ArchiveBuilderBuilder)
 - #99921 (triagebot.yml: CC Enselic when rustdoc-json-types changes)
 - #99974 (Suggest removing a semicolon and boxing the expressions for if-else)

Failed merges:

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

23 months agoRemove Clean trait implementation for hir::TypeBindingKind
Guillaume Gomez [Sun, 31 Jul 2022 12:24:13 +0000 (14:24 +0200)]
Remove Clean trait implementation for hir::TypeBindingKind

23 months agoreorder fields in Laout debug output
Ralf Jung [Sun, 31 Jul 2022 01:39:15 +0000 (21:39 -0400)]
reorder fields in Laout debug output

23 months agoRemove Clean trait implementation for hir::TypeBinding
Guillaume Gomez [Sun, 31 Jul 2022 12:21:07 +0000 (14:21 +0200)]
Remove Clean trait implementation for hir::TypeBinding

23 months agoRemove Clean trait implementation for hir::Path
Guillaume Gomez [Sun, 31 Jul 2022 12:17:23 +0000 (14:17 +0200)]
Remove Clean trait implementation for hir::Path

23 months agoRollup merge of #99974 - TaKO8Ki:suggest-removing-semicolon-and-boxing-the-expression...
Dylan DPC [Sun, 31 Jul 2022 12:06:44 +0000 (17:36 +0530)]
Rollup merge of #99974 - TaKO8Ki:suggest-removing-semicolon-and-boxing-the-expressions, r=compiler-errors

Suggest removing a semicolon and boxing the expressions for if-else

`InferCtxt::suggest_remove_semi_or_return_binding` was not working well, so I fixed it and added a ui test.

23 months agoRollup merge of #99921 - Enselic:cc-enselic, r=GuillaumeGomez
Dylan DPC [Sun, 31 Jul 2022 12:06:43 +0000 (17:36 +0530)]
Rollup merge of #99921 - Enselic:cc-enselic, r=GuillaumeGomez

triagebot.yml: CC Enselic when rustdoc-json-types changes

Being the maintainer of [cargo-public-api](https://github.com/Enselic/cargo-public-api) which relies on [rustdoc JSON](https://github.com/rust-lang/rust/issues/76578) means I have high stakes in the rustdoc JSON format itself. Would be great if I could be pinged when the format is about to change.

I hope this is OK. Big thanks in advance.

23 months agoRollup merge of #99844 - bjorn3:archive_builder_interface_refactor, r=nagisa
Dylan DPC [Sun, 31 Jul 2022 12:06:42 +0000 (17:36 +0530)]
Rollup merge of #99844 - bjorn3:archive_builder_interface_refactor, r=nagisa

Introduce an ArchiveBuilderBuilder

This avoids monomorphizing all linker code for each codegen backend and will allow passing in extra information to the archive builder from the codegen backend. I'm going to use this in https://github.com/rust-lang/rust/pull/97485 to allow passing in the right function to extract symbols from object files to a generic archive builder to be used by cg_llvm, cg_clif and cg_gcc.

23 months agoRollup merge of #99741 - compiler-errors:copy-impl-impl-generics, r=fee1-dead
Dylan DPC [Sun, 31 Jul 2022 12:06:41 +0000 (17:36 +0530)]
Rollup merge of #99741 - compiler-errors:copy-impl-impl-generics, r=fee1-dead

Use `impl`'s generics when suggesting fix on bad `impl Copy`

See the UI test for a more complicated example, but we weren't correctly suggesting to add bounds given a manual `impl` whose generics didn't match the struct generics.

```rust
#[derive(Clone)]
struct Wrapper<T>(T);

impl<S> Copy for Wrapper<S> {}
```

Coincidentally this fix didn't cause any regressions for `derive(Copy)` impls, I think because those use the same spans in the impl generics as the struct generics, so the machinery still applies the same change.

23 months agoRollup merge of #99186 - camsteffen:closure-localdefid, r=cjgillot
Dylan DPC [Sun, 31 Jul 2022 12:06:40 +0000 (17:36 +0530)]
Rollup merge of #99186 - camsteffen:closure-localdefid, r=cjgillot

Use LocalDefId for closures more

23 months agoAuto merge of #99553 - ChrisDenton:lazy-compat-fn, r=Mark-Simulacrum
bors [Sun, 31 Jul 2022 10:44:11 +0000 (10:44 +0000)]
Auto merge of #99553 - ChrisDenton:lazy-compat-fn, r=Mark-Simulacrum

Rewrite Windows `compat_fn` macro

This allows using most delay loaded functions before the init code initializes them. It also only preloads a select few functions, rather than all functions.

This is optimized for the common case where a function is used after already being loaded (or failed to load). The only change in codegen at the call site is to use an atomic load instead of a plain load, which should have negligible or no impact.

I've split the old `compat_fn` macro in two so as not to mix two different use cases. If/when Windows 7 support is dropped `compat_fn_optional` can be removed entirely.

r? rust-lang/libs

23 months agoAdd issue reference
bjorn3 [Sun, 31 Jul 2022 10:10:58 +0000 (10:10 +0000)]
Add issue reference

23 months agoRemove workarounds for issue 59998
bjorn3 [Sun, 31 Jul 2022 10:03:44 +0000 (10:03 +0000)]
Remove workarounds for issue 59998

23 months agocheck 'size multiple of align' for all layouts
Ralf Jung [Thu, 28 Jul 2022 20:59:55 +0000 (16:59 -0400)]
check 'size multiple of align' for all layouts

23 months agoAuto merge of #99529 - Milo123459:stage-1-test, r=jyn514
bors [Sun, 31 Jul 2022 08:03:26 +0000 (08:03 +0000)]
Auto merge of #99529 - Milo123459:stage-1-test, r=jyn514

Run `x test --stage 1` in CI

Fixes #99135

r? `@jyn514`

23 months agoadd a test to check if `suggest_remove_semi_or_return_binding` is working well for...
Takayuki Maeda [Sun, 31 Jul 2022 02:36:04 +0000 (11:36 +0900)]
add a test to check if `suggest_remove_semi_or_return_binding` is working well for if-else

23 months agouse appropriate `HirID` for finding `else_span`
Takayuki Maeda [Sun, 31 Jul 2022 02:33:01 +0000 (11:33 +0900)]
use appropriate `HirID` for finding `else_span`

23 months agoAuto merge of #99959 - cuviper:niche-size, r=eddyb
bors [Sat, 30 Jul 2022 23:47:51 +0000 (23:47 +0000)]
Auto merge of #99959 - cuviper:niche-size, r=eddyb

Fix the size of niche enums with ZST alignment

For enums with an aligned ZST variant, like `[T; 0]`, the niche layout
was not computing a sufficient size to be consistent with alignment. Now
we pad that size up to the alignment, and also make sure to only use the
niche variant's ABI when the size and alignment still match.

Fixes #99836
r? `@eddyb`

23 months agodont run stage1 tests in pr
Milo [Sat, 30 Jul 2022 22:10:26 +0000 (22:10 +0000)]
dont run stage1 tests in pr

23 months agoadd to full test-suite
Milo [Sat, 30 Jul 2022 21:56:53 +0000 (21:56 +0000)]
add to full test-suite

23 months agoAuto merge of #99964 - matthiaskrgr:rollup-jr836e2, r=matthiaskrgr
bors [Sat, 30 Jul 2022 21:01:42 +0000 (21:01 +0000)]
Auto merge of #99964 - matthiaskrgr:rollup-jr836e2, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #99650 (Support `x --keep-stage 0 check`)
 - #99873 (rustdoc: align invalid-html-tags lint with commonmark spec)
 - #99889 (Remove `parent_pat` from `TopInfo`)
 - #99890 (Do not allow bad projection term to leak into the type checker)
 - #99937 (Reset directory iteration in remove_dir_all)
 - #99950 (Remove more Clean trait implementations)
 - #99956 (Also gate AllocatedPointer and AllocAlign definitions by LLVM_VERSION_GE)
 - #99962 (Discover channel for LLVM download)

Failed merges:

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

23 months agoUse LocalDefId for closures more
Cameron Steffen [Tue, 12 Jul 2022 14:10:22 +0000 (09:10 -0500)]
Use LocalDefId for closures more

23 months agoRollup merge of #99962 - Mark-Simulacrum:detect-ci-artifact-channel, r=jyn514
Matthias Krüger [Sat, 30 Jul 2022 20:51:03 +0000 (22:51 +0200)]
Rollup merge of #99962 - Mark-Simulacrum:detect-ci-artifact-channel, r=jyn514

Discover channel for LLVM download

r? `@jyn514`
cc `@RalfJung`

Reported on Zulip: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/No.20prebuilt.20LLVM.20for.20the.20beta.20branch.3F

23 months agoRollup merge of #99956 - est31:fix_llvm_wrapper_warning, r=cuviper
Matthias Krüger [Sat, 30 Jul 2022 20:51:02 +0000 (22:51 +0200)]
Rollup merge of #99956 - est31:fix_llvm_wrapper_warning, r=cuviper

Also gate AllocatedPointer and AllocAlign definitions by LLVM_VERSION_GE

Fixes a warning:

```
warning: llvm-wrapper/RustWrapper.cpp:159:11: warning: enumeration values 'AllocatedPointer' and 'AllocAlign' not handled in switch [-Wswitch]
warning:   switch (Kind) {
warning:           ^
```

Which was fall out from 130a1df71ea73ab9d66d3cb8fc9cdb43155d514b.

Fixes #99955

23 months agoRollup merge of #99950 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC
Matthias Krüger [Sat, 30 Jul 2022 20:51:01 +0000 (22:51 +0200)]
Rollup merge of #99950 - GuillaumeGomez:rm-clean-impls, r=Dylan-DPC

Remove more Clean trait implementations

This time it even allowed to remove a function.

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

r? `@notriddle`