]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoavoid many `&str` to `String` conversions with `MultiSpan::push_span_label`
Takayuki Maeda [Wed, 29 Jun 2022 12:16:43 +0000 (21:16 +0900)]
avoid many `&str` to `String` conversions with `MultiSpan::push_span_label`

2 years agoAuto merge of #98521 - JohnTitor:rollup-tl9sblx, r=JohnTitor
bors [Sun, 26 Jun 2022 07:12:16 +0000 (07:12 +0000)]
Auto merge of #98521 - JohnTitor:rollup-tl9sblx, r=JohnTitor

Rollup of 8 pull requests

Successful merges:

 - #98371 (Fix printing `impl trait` under binders)
 - #98385 (Work around llvm 12's memory ordering restrictions.)
 - #98474 (x.py: Support systems with only `python3` not `python`)
 - #98488 (Bump RLS to latest master on rust-lang/rls)
 - #98491 (Fix backtrace UI test when panic=abort is used)
 - #98502 (Fix source sidebar hover in ayu theme)
 - #98509 (diagnostics: consider parameter count when suggesting smart pointers)
 - #98513 (Fix LLVM rebuild with download-ci-llvm.)

Failed merges:

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

2 years agoRollup merge of #98513 - ehuss:rebuild-llvm-download, r=Mark-Simulacrum
Yuki Okushi [Sun, 26 Jun 2022 04:15:03 +0000 (13:15 +0900)]
Rollup merge of #98513 - ehuss:rebuild-llvm-download, r=Mark-Simulacrum

Fix LLVM rebuild with download-ci-llvm.

This fixes an issue where updating a local checkout that includes a change in `src/version` causes a linking failure.

The cause is that the `rustc_llvm` build script uses `rerun-if-changed` of `llvm-config` to know if it needs to rerun. Cargo only compares the timestamp of the last time the build script to the file. However, extracting the tar files retains the timestamps in the tarball which may be some time in the past. Since `src/version` is included in the LLVM `.so` filename, `rustc` attempts to load the wrong shared library since the `rustc_llvm` build script doesn't rerun.

https://github.com/rust-lang/cargo/issues/10791 contains a more detailed explanation.

The solution here is a hack which updates the timestamp of `llvm-config` to the current time when it is extracted.

This is a bit of a hack, but seems to be the best solution I can think of until https://github.com/rust-lang/cargo/issues/10791 is fixed. There are likely several other situations where this is a problem (such as using system LLVM), and this isn't really a complete fix.

Note that apple platforms are not directly affected by this problem because they don't have a version in the dylib filename.

How to test this:

1. On a linux host, enable download-ci-llvm
2. Check out 7036449c774860a5b348dbbe01c20704c557382e (the commit just before the last version bump)
3. `./x.py build library/std`
4. Check out 5f015a24f99f52ea9b67beb420aff24f82acf1af (the commit that bumped the version)
5. `./x.py build library/std`

Fixes #98495

2 years agoRollup merge of #98509 - rust-lang:notriddle/precise-pin-diag, r=compiler-errors
Yuki Okushi [Sun, 26 Jun 2022 04:15:02 +0000 (13:15 +0900)]
Rollup merge of #98509 - rust-lang:notriddle/precise-pin-diag, r=compiler-errors

diagnostics: consider parameter count when suggesting smart pointers

Fixes #96834

2 years agoRollup merge of #98502 - GuillaumeGomez:source-sidebar-hover, r=notriddle
Yuki Okushi [Sun, 26 Jun 2022 04:15:01 +0000 (13:15 +0900)]
Rollup merge of #98502 - GuillaumeGomez:source-sidebar-hover, r=notriddle

Fix source sidebar hover in ayu theme

In the screenshot below, `rc.rs` should be orange:

![Screenshot from 2022-06-25 22-24-06](https://user-images.githubusercontent.com/3050060/175789532-99e8781d-2e62-43f7-bbd9-1b1151e1f8c1.png)

It's because the CSS selector was not precise enough and was "overloaded" with another one. This PR fixes it and adds a test for the colors in the source sidebar.

cc `@jsha`
r? `@notriddle`

2 years agoRollup merge of #98491 - antoyo:fix/ui-test-backtrace-panic-abort, r=Dylan-DPC
Yuki Okushi [Sun, 26 Jun 2022 04:15:00 +0000 (13:15 +0900)]
Rollup merge of #98491 - antoyo:fix/ui-test-backtrace-panic-abort, r=Dylan-DPC

Fix backtrace UI test when panic=abort is used

The function `contains_verbose_expected` is only used when the panic strategy is not abort, so it caused a warning when it was abort, which made the UI test failed on stderr comparison.

2 years agoRollup merge of #98488 - Mark-Simulacrum:bump-rls, r=pietroalbini
Yuki Okushi [Sun, 26 Jun 2022 04:14:59 +0000 (13:14 +0900)]
Rollup merge of #98488 - Mark-Simulacrum:bump-rls, r=pietroalbini

Bump RLS to latest master on rust-lang/rls

Of primary interest, this merges
rust-lang/rls@ece09b88c0365947af79c0ffdeea02bc6c1eec25 into rust-lang/rust,
which brings in the changes that fix RLS tests broken by #97853. #97853 already
introduced that commit's changes (under
rust-lang/rls@27f4044df03d15c7c38a483c3e4635cf4f51807d) but without putting those changes on
rust-lang/rls as a branch, so we ended up with an orphan commit that caused
trouble when updating submodules in rust-lang/rust.

This commit, once merged into rust-lang/rust, should continue to let RLS tests
to pass on rust-lang/rust's side and move us back into a healthy state where tip
of the submodule points to a valid master commit in the rust-lang/rls
repository.

cc https://github.com/rust-lang/rust/issues/98451, but not marking as fixed as I believe we need to add verification to prevent future oversights.

2 years agoRollup merge of #98474 - dtolnay:python3, r=Mark-Simulacrum
Yuki Okushi [Sun, 26 Jun 2022 04:14:58 +0000 (13:14 +0900)]
Rollup merge of #98474 - dtolnay:python3, r=Mark-Simulacrum

x.py: Support systems with only `python3` not `python`

Fixes #71818 without the pitfalls so far described in previous attempts.

2 years agoRollup merge of #98385 - m-ou-se:llvm-12-memory-order, r=petrochenkov
Yuki Okushi [Sun, 26 Jun 2022 04:14:57 +0000 (13:14 +0900)]
Rollup merge of #98385 - m-ou-se:llvm-12-memory-order, r=petrochenkov

Work around llvm 12's memory ordering restrictions.

Older llvm has the pre-C++17 restriction on success and failure memory ordering, requiring the former to be at least as strong as the latter. So, for llvm 12, this upgrades the success ordering to a stronger one if necessary.

See https://github.com/rust-lang/rust/issues/68464

2 years agoRollup merge of #98371 - compiler-errors:better-opaque-printing, r=oli-obk
Yuki Okushi [Sun, 26 Jun 2022 04:14:56 +0000 (13:14 +0900)]
Rollup merge of #98371 - compiler-errors:better-opaque-printing, r=oli-obk

Fix printing `impl trait` under binders

Before, we would render `impl for<'a> Trait<'a>` like `impl Trait<for<'a> 'a>`, lol.

2 years agoAuto merge of #98140 - klensy:compiletest-strip, r=Mark-Simulacrum
bors [Sun, 26 Jun 2022 00:03:07 +0000 (00:03 +0000)]
Auto merge of #98140 - klensy:compiletest-strip, r=Mark-Simulacrum

compiletest: strip debuginfo by default for mode=ui

This reduces occupied disk space, for example for src/test/ui it drops from 1972mb to 132mb (x86_64-pc-windows-msvc).

Individual tests that require debuginfo/symbols should turn this option off (as in fixed tests).

2 years agoFix LLVM rebuild with download-ci-llvm.
Eric Huss [Sat, 25 Jun 2022 23:49:00 +0000 (16:49 -0700)]
Fix LLVM rebuild with download-ci-llvm.

2 years agodiagnostics: consider parameter count when suggesting smart pointers
Michael Howell [Sat, 25 Jun 2022 22:46:47 +0000 (15:46 -0700)]
diagnostics: consider parameter count when suggesting smart pointers

2 years agoAuto merge of #97513 - jyn514:submodule-handling, r=Mark-Simulacrum
bors [Sat, 25 Jun 2022 21:01:10 +0000 (21:01 +0000)]
Auto merge of #97513 - jyn514:submodule-handling, r=Mark-Simulacrum

Fully remove submodule handling from bootstrap.py

These submodules were previously updated in python because Cargo gives a hard error if toml files
are missing from the workspace:

```
error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls`

Caused by:
  failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml
```

However, bootstrap doesn't actually need to be part of the workspace.
Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python.

Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now.
Given that we're planning to make the main entrypoint a shell script (or rust binary),
I think this is a good tradeoff for reduced complexity in bootstrap.py.

To get this working, I also had to remove support for vendoring when using the git sources, because `cargo vendor` requires all submodules to be checked out. I think this is ok; people who care about this are likely already using the pre-vendored `rustc-src` tarball.

Fixes https://github.com/rust-lang/rust/issues/90764. Helps with #94829

2 years agoAdd test for source sidebar elements colors
Guillaume Gomez [Sat, 25 Jun 2022 20:22:35 +0000 (22:22 +0200)]
Add test for source sidebar elements colors

2 years agoFix CSS rule for selected and hovered items in the source sidebar
Guillaume Gomez [Sat, 25 Jun 2022 19:43:54 +0000 (21:43 +0200)]
Fix CSS rule for selected and hovered items in the source sidebar

2 years agoAuto merge of #98412 - calebcartwright:sync-rustfmt, r=calebcartwright
bors [Sat, 25 Jun 2022 18:00:12 +0000 (18:00 +0000)]
Auto merge of #98412 - calebcartwright:sync-rustfmt, r=calebcartwright

Sync rustfmt

We had a bug in the update we made ~1 week ago, so running a somewhat early sync to pull the fix in

2 years agoFix backtrace UI test when panic=abort is used
Antoni Boucher [Sat, 25 Jun 2022 15:48:26 +0000 (11:48 -0400)]
Fix backtrace UI test when panic=abort is used

2 years agoAuto merge of #98486 - matthiaskrgr:rollup-u7m508x, r=matthiaskrgr
bors [Sat, 25 Jun 2022 15:19:31 +0000 (15:19 +0000)]
Auto merge of #98486 - matthiaskrgr:rollup-u7m508x, r=matthiaskrgr

Rollup of 9 pull requests

Successful merges:

 - #96412 (Windows: Iterative `remove_dir_all`)
 - #98126 (Mitigate MMIO stale data vulnerability)
 - #98149 (Set relocation_model to Pic on emscripten target)
 - #98194 (Leak pthread_{mutex,rwlock}_t if it's dropped while locked.)
 - #98298 (Point to type parameter definition when not finding variant, method and associated item)
 - #98311 (Reverse folder hierarchy)
 - #98401 (Add tracking issues to `--extern` option docs.)
 - #98429 (Use correct substs in enum discriminant cast)
 - #98431 (Suggest defining variable as mutable on `&mut _` type mismatch in pats)

Failed merges:

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

2 years agoBump RLS to latest master on rust-lang/rls
Mark Rousskov [Sat, 25 Jun 2022 13:56:56 +0000 (09:56 -0400)]
Bump RLS to latest master on rust-lang/rls

Of primary interest, this merges
rust-lang/rls@ece09b88c0365947af79c0ffdeea02bc6c1eec25 into rust-lang/rust,
which brings in the changes that fix RLS tests broken by #97853. #97853 already
introduced that commit's changes (under
27f4044df03d15c7c38a483c3e4635cf4f51807d) but without putting those changes on
rust-lang/rls as a branch, so we ended up with an orphan commit that caused
trouble when updating submodules in rust-lang/rust.

This commit, once merged into rust-lang/rust, should continue to let RLS tests
to pass on rust-lang/rust's side and move us back into a healthy state where tip
of the submodule points to a valid master commit in the rust-lang/rls
repository.

2 years agoRollup merge of #98431 - WaffleLapkin:mut_pat_suggestions, r=compiler-errors
Matthias Krüger [Sat, 25 Jun 2022 13:14:14 +0000 (15:14 +0200)]
Rollup merge of #98431 - WaffleLapkin:mut_pat_suggestions, r=compiler-errors

Suggest defining variable as mutable on `&mut _` type mismatch in pats

Suggest writing `mut a` where `&mut a` was written but a non-ref type provided.

Since we still don't have "apply either one of the suggestions but not both" kind of thing, the interaction with the suggestion of removing `&[mut]` or moving it to the type is weird, and idk how to make it better..

r? ``@compiler-errors``

2 years agoRollup merge of #98429 - b-naber:use-correct-substs-discriminant-cast, r=lcnr
Matthias Krüger [Sat, 25 Jun 2022 13:14:13 +0000 (15:14 +0200)]
Rollup merge of #98429 - b-naber:use-correct-substs-discriminant-cast, r=lcnr

Use correct substs in enum discriminant cast

Fixes https://github.com/rust-lang/rust/issues/97634

r? ```@lcnr```

2 years agoRollup merge of #98401 - ehuss:extern-tracking, r=Dylan-DPC
Matthias Krüger [Sat, 25 Jun 2022 13:14:12 +0000 (15:14 +0200)]
Rollup merge of #98401 - ehuss:extern-tracking, r=Dylan-DPC

Add tracking issues to `--extern` option docs.

2 years agoRollup merge of #98311 - eggyal:reverse-folder-hierarchy, r=jackh726
Matthias Krüger [Sat, 25 Jun 2022 13:14:11 +0000 (15:14 +0200)]
Rollup merge of #98311 - eggyal:reverse-folder-hierarchy, r=jackh726

Reverse folder hierarchy

#91318 introduced a trait for infallible folders distinct from the fallible version.  For some reason (completely unfathomable to me now that I look at it with fresh eyes), the infallible trait was a supertrait of the fallible one: that is, all fallible folders were required to also be infallible.  Moreover the `Error` associated type was defined on the infallible trait!  It's so absurd that it has me questioning whether I was entirely sane.

This trait reverses the hierarchy, so that the fallible trait is a supertrait of the infallible one: all infallible folders are required to also be fallible (which is a trivial blanket implementation).  This of course makes much more sense!  It also enables the `Error` associated type to sit on the fallible trait, where it sensibly belongs.

There is one downside however: folders expose a `tcx` accessor method.  Since the blanket fallible implementation for infallible folders only has access to a generic `F: TypeFolder`, we need that trait to expose such an accessor to which we can delegate.  Alternatively it's possible to extract that accessor into a separate `HasTcx` trait (or similar) that would then be a supertrait of both the fallible and infallible folder traits: this would ensure that there's only one unambiguous `tcx` method, at the cost of a little additional boilerplate.  If desired, I can submit that as a separate PR.

r? ````@jackh726````

2 years agoRollup merge of #98298 - TaKO8Ki:point-to-type-param-definition, r=compiler-errors
Matthias Krüger [Sat, 25 Jun 2022 13:14:10 +0000 (15:14 +0200)]
Rollup merge of #98298 - TaKO8Ki:point-to-type-param-definition, r=compiler-errors

Point to type parameter definition when not finding variant, method and associated item

fixes #77391

2 years agoRollup merge of #98194 - m-ou-se:leak-locked-pthread-mutex, r=Amanieu
Matthias Krüger [Sat, 25 Jun 2022 13:14:09 +0000 (15:14 +0200)]
Rollup merge of #98194 - m-ou-se:leak-locked-pthread-mutex, r=Amanieu

Leak pthread_{mutex,rwlock}_t if it's dropped while locked.

Fixes https://github.com/rust-lang/rust/issues/85434.

2 years agoRollup merge of #98149 - hoodmane:emscripten-pic, r=petrochenkov
Matthias Krüger [Sat, 25 Jun 2022 13:14:08 +0000 (15:14 +0200)]
Rollup merge of #98149 - hoodmane:emscripten-pic, r=petrochenkov

Set relocation_model to Pic on emscripten target

So we can support dynamically linking libraries with Emscripten (otherwise we need to use nightly and `-Zbuild-std` to rebuild std with relocations).
`````@sbc100`````

2 years agoRollup merge of #98126 - fortanix:raoul/mitigate_stale_data_vulnerability, r=cuviper
Matthias Krüger [Sat, 25 Jun 2022 13:14:07 +0000 (15:14 +0200)]
Rollup merge of #98126 - fortanix:raoul/mitigate_stale_data_vulnerability, r=cuviper

Mitigate MMIO stale data vulnerability

Intel publicly disclosed the MMIO stale data vulnerability on June 14. To mitigate this vulnerability, compiler changes are required for the `x86_64-fortanix-unknown-sgx` target.
cc: ````@jethrogb````

2 years agoRollup merge of #96412 - ChrisDenton:remove-dir-all, r=thomcc
Matthias Krüger [Sat, 25 Jun 2022 13:14:06 +0000 (15:14 +0200)]
Rollup merge of #96412 - ChrisDenton:remove-dir-all, r=thomcc

Windows: Iterative `remove_dir_all`

This will allow better strategies for use of memory and File handles. However, fully taking advantage of that is left to future work.

Note to reviewer: It's probably best to view the `remove_dir_all_recursive` as a new function. The diff is not very helpful (imho).

2 years agoAuto merge of #96820 - r-raymond:master, r=cuviper
bors [Sat, 25 Jun 2022 13:03:53 +0000 (13:03 +0000)]
Auto merge of #96820 - r-raymond:master, r=cuviper

Make RwLockReadGuard covariant

Hi, first time contributor here, if anything is not as expected, please let me know.

`RwLockReadGoard`'s type constructor is invariant. Since it behaves like a smart pointer to an immutable reference, there is no reason that it should not be covariant. Take e.g.

```
fn test_read_guard_covariance() {
    fn do_stuff<'a>(_: RwLockReadGuard<'_, &'a i32>, _: &'a i32) {}
    let j: i32 = 5;
    let lock = RwLock::new(&j);
    {
        let i = 6;
        do_stuff(lock.read().unwrap(), &i);
    }
    drop(lock);
}
```
where the compiler complains that &i doesn't live long enough. If `RwLockReadGuard` is covariant, then the above code is accepted because the lifetime can be shorter than `'a`.

In order for `RwLockReadGuard` to be covariant, it can't contain a full reference to the `RwLock`, which can never be covariant (because it exposes a mutable reference to the underlying data structure). By reducing the data structure to the required pieces of `RwLock`, the rest falls in place.

If there is a better way to do a test that tests successful compilation, please let me know.

Fixes #80392

2 years agoAuto merge of #93700 - rossmacarthur:ft/iter-next-chunk, r=m-ou-se
bors [Sat, 25 Jun 2022 09:40:54 +0000 (09:40 +0000)]
Auto merge of #93700 - rossmacarthur:ft/iter-next-chunk, r=m-ou-se

Add `Iterator::next_chunk`

See also https://github.com/rust-lang/rust/pull/92393

### Prior art

-  [`Itertools::next_tuple()`](https://docs.rs/itertools/latest/itertools/trait.Itertools.html#method.next_tuple)

### Unresolved questions

- Should we also add `next_chunk_back` to `DoubleEndedIterator`?
- Should we rather call this `next_array()` or `next_array_chunk`?

2 years agox.py: Support systems with only `python3` not `python`
David Tolnay [Sat, 25 Jun 2022 00:55:40 +0000 (17:55 -0700)]
x.py: Support systems with only `python3` not `python`

2 years agoAuto merge of #98459 - pietroalbini:pa-1.64, r=pietroalbini
bors [Fri, 24 Jun 2022 23:27:05 +0000 (23:27 +0000)]
Auto merge of #98459 - pietroalbini:pa-1.64, r=pietroalbini

Bump version to 1.64.0

r? `@ghost`

2 years agoUse write! instead of p! to avoid having to use weird scoping
Michael Goulet [Wed, 22 Jun 2022 17:21:24 +0000 (10:21 -0700)]
Use write! instead of p! to avoid having to use weird scoping

2 years agoFix printing impl trait under binders
Michael Goulet [Wed, 22 Jun 2022 04:27:15 +0000 (21:27 -0700)]
Fix printing impl trait under binders

2 years agoimprove wording of a suggestion
Maybe Waffle [Fri, 24 Jun 2022 17:18:26 +0000 (21:18 +0400)]
improve wording of a suggestion

2 years agotake advantage of a labelled block
Waffle Maybe [Fri, 24 Jun 2022 17:05:02 +0000 (21:05 +0400)]
take advantage of a labelled block

Co-authored-by: Michael Goulet <michael@errs.io>
2 years agobump version to 1.64.0
Pietro Albini [Fri, 24 Jun 2022 15:27:24 +0000 (17:27 +0200)]
bump version to 1.64.0

2 years agofmt
b-naber [Fri, 24 Jun 2022 14:43:38 +0000 (16:43 +0200)]
fmt

2 years agoSet relocation_model to Pic on emscripten target
Hood Chatham [Wed, 15 Jun 2022 21:49:48 +0000 (14:49 -0700)]
Set relocation_model to Pic on emscripten target

2 years agoAuto merge of #98397 - RalfJung:miri, r=RalfJung
bors [Fri, 24 Jun 2022 12:58:32 +0000 (12:58 +0000)]
Auto merge of #98397 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/98366
r? `@ghost` Cc `@rust-lang/miri`

2 years agoaddress review
b-naber [Fri, 24 Jun 2022 11:43:56 +0000 (13:43 +0200)]
address review

2 years agosmall refactor
b-naber [Fri, 24 Jun 2022 11:19:23 +0000 (13:19 +0200)]
small refactor

2 years agoAuto merge of #98447 - JohnTitor:rollup-pponoo3, r=JohnTitor
bors [Fri, 24 Jun 2022 10:35:00 +0000 (10:35 +0000)]
Auto merge of #98447 - JohnTitor:rollup-pponoo3, r=JohnTitor

Rollup of 9 pull requests

Successful merges:

 - #91264 (Add macro support in jump to definition feature)
 - #96955 (Remove (transitive) reliance on sorting by DefId in pretty-printer)
 - #97633 (Session object: Set OS/ABI)
 - #98039 (Fix `panic` message for `BTreeSet`'s `range` API and document `panic` cases)
 - #98214 (rustc_target: Remove some redundant target properties)
 - #98280 (Improve suggestion for calling fn-like expr on type mismatch)
 - #98394 (Fixup missing renames from `#[main]` to `#[rustc_main]`)
 - #98411 (Update tendril)
 - #98419 (Remove excess rib while resolving closures)

Failed merges:

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

2 years agouse correct substs in enum discriminant hack
b-naber [Thu, 23 Jun 2022 15:34:17 +0000 (17:34 +0200)]
use correct substs in enum discriminant hack

2 years agoadd test
b-naber [Thu, 23 Jun 2022 15:34:34 +0000 (17:34 +0200)]
add test

2 years agoRollup merge of #98419 - WaffleLapkin:remove_excess_rib, r=compiler-errors
Yuki Okushi [Fri, 24 Jun 2022 07:43:49 +0000 (16:43 +0900)]
Rollup merge of #98419 - WaffleLapkin:remove_excess_rib, r=compiler-errors

Remove excess rib while resolving closures

I've mentioned this on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60ClosureOrAsyncRibKind.60.20weirdness/near/286982959), in `rustc_resolve`, while resolving closures we add an excess `ClosureOrAsyncRibKind`. It's excess because we later add another one in `visit_fn`.

I couldn't find a way in which removing this will break anything, all test seem to pass, etc.

r? ``@compiler-errors``
cc ``@davidtwco``

2 years agoRollup merge of #98411 - ehuss:update-tendril, r=Mark-Simulacrum
Yuki Okushi [Fri, 24 Jun 2022 07:43:48 +0000 (16:43 +0900)]
Rollup merge of #98411 - ehuss:update-tendril, r=Mark-Simulacrum

Update tendril

The 0.4.1 version of `tendril` (used by mdbook) triggers the `unaligned_references` lint which is now reported as a future-compatibility warning as of #95372. This updates it to 0.4.3 which does not trigger the warning. This update also triggered the update of `futf` from 0.1.4 to 0.1.5.

tendril changes: https://github.com/servo/tendril/compare/v0.4.1...v0.4.3
futf changes: https://github.com/servo/futf/compare/v0.1.4...v0.1.5

2 years agoRollup merge of #98394 - Enselic:fixup-rustc_main-renames, r=petrochenkov
Yuki Okushi [Fri, 24 Jun 2022 07:43:47 +0000 (16:43 +0900)]
Rollup merge of #98394 - Enselic:fixup-rustc_main-renames, r=petrochenkov

Fixup missing renames from `#[main]` to `#[rustc_main]`

In #84217 `#[main]` was removed and replaced with `#[rustc_main]`. In some places the rename was forgotten, which makes the current code confusing, because at first glance it seems that `#[main]` is still around. Perform the renames also in these places.

I noticed this (after first being confused by it) when working on #97802.

r? `@petrochenkov`

(since you reviewed the other PR)

2 years agoRollup merge of #98280 - compiler-errors:better-call-closure-on-type-err, r=estebank
Yuki Okushi [Fri, 24 Jun 2022 07:43:46 +0000 (16:43 +0900)]
Rollup merge of #98280 - compiler-errors:better-call-closure-on-type-err, r=estebank

Improve suggestion for calling fn-like expr on type mismatch

1.) Suggest calling values of with RPIT types (and probably TAIT) when we expect `Ty` and have `impl Fn() -> Ty`
2.) Suggest calling closures even when they're not assigned to a local variable first
3.) Drive-by fix of a pretty-printing bug (`impl Fn()-> Ty` => `impl Fn() -> Ty`)

r? ```@estebank```

2 years agoRollup merge of #98214 - petrochenkov:islike, r=compiler-errors
Yuki Okushi [Fri, 24 Jun 2022 07:43:45 +0000 (16:43 +0900)]
Rollup merge of #98214 - petrochenkov:islike, r=compiler-errors

rustc_target: Remove some redundant target properties

`is_like_emscripten` is equivalent to `os == "emscripten"`, so it's removed.
`is_like_fuchsia` is equivalent to `os == "fuchsia"`, so it's removed.
`is_like_osx` also falls into the same category and is equivalent to `vendor == "apple"`, but it's commonly used so I kept it as is for now.

`is_like_(solaris,windows,wasm)` are combinations of different operating systems or architectures (see compiler/rustc_target/src/spec/tests/tests_impl.rs) so they are also kept as is.

I think `is_like_wasm` (and maybe `is_like_osx`) are sufficiently closed sets, so we can remove these fields as well and replace them with methods like `fn is_like_wasm() { arch == "wasm32" || arch == "wasm64" }`.
On other hand, `is_like_solaris` and `is_like_windows` are sufficiently open and I can imagine custom targets introducing other values for `os`.
This is kind of a gray area.

2 years agoRollup merge of #98039 - tnballo:master, r=thomcc
Yuki Okushi [Fri, 24 Jun 2022 07:43:44 +0000 (16:43 +0900)]
Rollup merge of #98039 - tnballo:master, r=thomcc

Fix `panic` message for `BTreeSet`'s `range` API and document `panic` cases

Currently, the `panic` cases for [`BTreeSet`'s `range` API](https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.range) are undocumented and produce a slightly wrong `panic` message (says `BTreeMap` instead of `BTreeSet`).

Panic case 1 code:

```rust
use std::collections::BTreeSet;
use std::ops::Bound::Excluded;

fn main() {
    let mut set = BTreeSet::new();
    set.insert(3);
    set.insert(5);
    set.insert(8);

    for &elem in set.range((Excluded(&3), Excluded(&3))) {
        println!("{elem}");
    }
}
```

Panic case 1 message:

```
thread 'main' panicked at 'range start and end are equal and excluded in BTreeMap', /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/alloc/src/collections/btree/search.rs:105:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

Panic case 2 code:

```rust
use std::collections::BTreeSet;
use std::ops::Bound::Included;

fn main() {
    let mut set = BTreeSet::new();
    set.insert(3);
    set.insert(5);
    set.insert(8);

    for &elem in set.range((Included(&8), Included(&3))) {
        println!("{elem}");
    }
}
```

Panic case 2:

```
thread 'main' panicked at 'range start is greater than range end in BTreeMap', /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/alloc/src/collections/btree/search.rs:110:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

This PR fixes the output messages to say `BTreeSet`, adds the relevant unit tests, and updates the documentation for the API.

2 years agoRollup merge of #97633 - mkroening:object-osabi, r=petrochenkov
Yuki Okushi [Fri, 24 Jun 2022 07:43:43 +0000 (16:43 +0900)]
Rollup merge of #97633 - mkroening:object-osabi, r=petrochenkov

Session object: Set OS/ABI

Closes https://github.com/rust-lang/rust/issues/97535.

This depends on
* https://github.com/gimli-rs/object/pull/438

This adapts LLVM's behavior of [`MCELFObjectTargetWriter::getOSABI`](https://github.com/llvm/llvm-project/blob/8c8a2679a20f621994fa904bcfc68775e7345edc/llvm/include/llvm/MC/MCELFObjectWriter.h#L72-L86).

2 years agoRollup merge of #96955 - Aaron1011:pretty-print-sort, r=petrochenkov
Yuki Okushi [Fri, 24 Jun 2022 07:43:42 +0000 (16:43 +0900)]
Rollup merge of #96955 - Aaron1011:pretty-print-sort, r=petrochenkov

Remove (transitive) reliance on sorting by DefId in pretty-printer

This moves us a step closer to removing the `PartialOrd/`Ord` impls
for `DefId`. See #90317

2 years agoRollup merge of #91264 - GuillaumeGomez:macro-jump-to-def, r=jsha
Yuki Okushi [Fri, 24 Jun 2022 07:43:41 +0000 (16:43 +0900)]
Rollup merge of #91264 - GuillaumeGomez:macro-jump-to-def, r=jsha

Add macro support in jump to definition feature

Fixes #91174.

To do so, I check if the span comes from an expansion, and if so, I infer the original macro `DefId` or `Span` depending if it's a defined in the current crate or not.

There is one limitation due to macro expansion though:

```rust
macro_rules! yolo { () => {}}

fn foo() {
    yolo!();
}
```

In `foo`, `yolo!` won't be linked because after expansion, it is replaced by nothing (which seems logical). So I can't get an item from the `Visitor` from which I could tell if its `Span` comes from an expansion.

I added a test for this specific limitation alongside others.

Demo: https://rustdoc.crud.net/imperio/macro-jump-to-def/src/foo/check-source-code-urls-to-def-std.rs.html

As for the empty macro issue that cannot create a jump to definition, you can see it [here](https://rustdoc.crud.net/imperio/macro-jump-to-def/src/foo/check-source-code-urls-to-def-std.rs.html#35).

r? ```@jyn514```

2 years agoAuto merge of #98109 - nikomatsakis:issue-98095, r=jackh726
bors [Fri, 24 Jun 2022 07:39:28 +0000 (07:39 +0000)]
Auto merge of #98109 - nikomatsakis:issue-98095, r=jackh726

fix universes in the NLL type tests

In the NLL code, we were not accommodating universes in the
`type_test` logic.

Fixes #98095.

r? `@compiler-errors`

This breaks some tests, however, so the purpose of this branch is more explanatory and perhaps to do a crater run.

2 years agoAuto merge of #98395 - arlosi:update-cargo, r=ehuss
bors [Fri, 24 Jun 2022 04:37:14 +0000 (04:37 +0000)]
Auto merge of #98395 - arlosi:update-cargo, r=ehuss

Update cargo

8 commits in 03a849043e25104e8b7ad0d4a96c525787b69379..a5e08c4703f202e30cdaf80ca3e7c00baa59c496
2022-06-20 14:47:36 +0000 to 2022-06-23 20:12:03 +0000
- Fix tests due to change in dead_code diagnostic. (rust-lang/cargo#10785)
- Stabilize config-cli (rust-lang/cargo#10755)
- Restrict duplicate deps warning only to published packages (rust-lang/cargo#10767)
- Use fingerprint_hash when computing fingerprints for custom targets (rust-lang/cargo#10746)
- Add preloading for workspace packages in `resolve_with_previous` (rust-lang/cargo#10761)
- capitalise, for consistency (rust-lang/cargo#10772)
- remove unused dependency from benchsuite (rust-lang/cargo#10774)
- docs(contrib): Add documentation for ui tests (rust-lang/cargo#10758)

2 years agoAuto merge of #98438 - compiler-errors:rollup-fudubjn, r=compiler-errors
bors [Fri, 24 Jun 2022 02:08:52 +0000 (02:08 +0000)]
Auto merge of #98438 - compiler-errors:rollup-fudubjn, r=compiler-errors

Rollup of 16 pull requests

Successful merges:

 - #96173 (Fix documentation for  `with_capacity` and `reserve` families of methods)
 - #98184 (Give name if anonymous region appears in impl signature)
 - #98259 (Greatly improve error reporting for futures and generators in `note_obligation_cause_code`)
 - #98269 (Provide a `PathSegment.res` in more cases)
 - #98283 (Point at private fields in struct literal)
 - #98305 (prohibit_generics: don't alloc error string if no error emitted)
 - #98310 (rustdoc: optimize loading of source sidebar)
 - #98353 (Migrate two diagnostics from the `rustc_builtin_macros` crate)
 - #98355 (Update no_default_libraries handling for emscripten target)
 - #98364 (clarify Arc::clone overflow check comment)
 - #98365 (Address review comments from #98259)
 - #98388 (implement `iter_projections` function on `PlaceRef`)
 - #98390 (Fixes handling of keywords in rustdoc json output)
 - #98409 (triagebot.toml: Allow applying nominated labels)
 - #98410 (Update books)
 - #98422 (Update browser-ui-test version to 0.9.6)

Failed merges:

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

2 years agoFix BTreeSet's range API panic message, document
tnballo [Thu, 23 Jun 2022 23:12:24 +0000 (19:12 -0400)]
Fix BTreeSet's range API panic message, document

2 years agoUpdate cargo
Arlo Siemsen [Thu, 23 Jun 2022 22:21:35 +0000 (15:21 -0700)]
Update cargo

8 commits in 03a849043e25104e8b7ad0d4a96c525787b69379..a5e08c4703f202e30cdaf80ca3e7c00baa59c496
2022-06-20 14:47:36 +0000 to 2022-06-23 20:12:03 +0000
- Fix tests due to change in dead_code diagnostic. (rust-lang/cargo#10785)
- Stabilize config-cli (rust-lang/cargo#10755)
- Restrict duplicate deps warning only to published packages (rust-lang/cargo#10767)
- Use fingerprint_hash when computing fingerprints for custom targets (rust-lang/cargo#10746)
- Add preloading for workspace packages in `resolve_with_previous` (rust-lang/cargo#10761)
- capitalise, for consistency (rust-lang/cargo#10772)
- remove unused dependency from benchsuite (rust-lang/cargo#10774)
- docs(contrib): Add documentation for ui tests (rust-lang/cargo#10758)

2 years agoRollup merge of #98422 - GuillaumeGomez:browser-ui-test-update, r=Dylan-DPC
Michael Goulet [Thu, 23 Jun 2022 21:39:19 +0000 (14:39 -0700)]
Rollup merge of #98422 - GuillaumeGomez:browser-ui-test-update, r=Dylan-DPC

Update browser-ui-test version to 0.9.6

This update provides a better error message when chromium crashes.

cc ``@jsha``
r? ``@Dylan-DPC``

2 years agoRollup merge of #98410 - ehuss:update-books, r=ehuss
Michael Goulet [Thu, 23 Jun 2022 21:39:18 +0000 (14:39 -0700)]
Rollup merge of #98410 - ehuss:update-books, r=ehuss

Update books

## reference

6 commits in 683bfe5cd64d589c6a1645312ab5f93b6385ccbb..9fce337a55ee4a4629205f6094656195cecad231
2022-05-27 11:54:20 -0700 to 2022-06-22 13:59:28 -0700
- Remove outdated restriction on recursive types (rust-lang/reference#1231)
- Clarify "string continue" for (byte) string literals (rust-lang/reference#1042)
- Add a note to the turbofish section about impl Trait (rust-lang/reference#1212)
- modify confusing variance example (rust-lang/reference#1224)
- Add stable references of `macro_metavar_expr` (rust-lang/reference#1192)
- Document native library modifier `bundle` (rust-lang/reference#1210)

## book

33 commits in 396fdb69de7fb18f24b15c7ad13491b1c1fa7231..efbafdba3618487fbc9305318fcab9775132ac15
2022-06-08 10:02:35 -0400 to 2022-06-19 21:06:50 -0400
- Propagate tech review edits to appendices to src
- Tech review comments and further edits to the appendices
- Duplicate fragment "mutation and borrowing"
- Propagate ch20 tech review edits to src
- Edits in response to tech review of chapter 20
- Comments from tech review on chapter 20
- Propagate ch7 tech review edits to src
- Responding to tech review of ch7
- Tech review comments on ch7
- Propagate ch19 tech review edits to src
- Responses to tech review of ch19
- Tech review comments on ch 19
- Update ch03-01-variables-and-mutability.md
- Add more explanation to CONTRIBUTING about the nostarch directory
- Duplicate sentence
- Missing period
- Regenerate ch09-02 error messages
- Change some print formatting styles in ch18
- Propagate tech review ch18 edits to src
- Responses to tech review comments of chapter 18
- Chapter 18 from tech review
- Snapshot of introduction for nostarch
- Propagate edits of ch1 to src
- Edits to edits to chapter 1
- Edits from nostarch for chapter 1
- Update Visual Studio instructions for 2022
- bugfix/typo-ch10-01 Fix typo in chapter ch10-01
- Tweak rustfmt slightly for these listings
- Propagate edits to ch13 to src
- Responses to nostarch edits to ch13
- Edits to ch13 from nostarch
- Apply complex Clippy recommendation
- Apply Clippy recommendations: `cargo clippy --fix`

## rust-by-example

4 commits in dbb7e5e2345ee26199ffba218156b6009016a20c..1095df2a5850f2d345fad43a30633133365875ba
2022-06-02 16:30:51 -0300 to 2022-06-18 21:47:12 -0300
- Add example for `array.get()` (rust-lang/rust-by-example#1554)
- Example improvements (rust-lang/rust-by-example#1552)
- Fix for a set of typos (rust-lang/rust-by-example#1551)
- Make guard examples clearer around `_` (rust-lang/rust-by-example#1550)

## rustc-dev-guide

11 commits in 6e4d6435db89bcc027b1bba9742e4f59666f5412..048d925f0a955aac601c4160c0e7f05771bcf63b
2022-06-08 08:06:32 +0900 to 2022-06-21 22:25:34 +0900
- not obvious what Ex is, so rather get rid (rust-lang/rustc-dev-guide#1372)
- small improves (rust-lang/rustc-dev-guide#1371)
- make clear that other versions can work (rust-lang/rustc-dev-guide#1373)
- Fix small `src/diagnostics.md` typo (rust-lang/rustc-dev-guide#1370)
- Add an "is" and rearange "We next" to "Next, we" (rust-lang/rustc-dev-guide#1369)
- diagnostics: add translation documentation
- diagnostics: line wrapping/heading changes
- later -&gt; latter
- Remove mention of -Zborrowck=mir with Polonius. (rust-lang/rustc-dev-guide#1367)
- Remove nll compare mode. (rust-lang/rustc-dev-guide#1366)
- add section on user types (rust-lang/rustc-dev-guide#1359)

## embedded-book

1 commits in cbb494f96da3268c2925bdadc65ca83d42f2d4ef..e17dcef5e96346ee3d7fa56820ddc7e5c39636bc
2022-05-26 06:58:43 +0000 to 2022-06-19 10:28:00 +0000
- Fix a typo  (rust-embedded/book#319)

2 years agoRollup merge of #98409 - joshtriplett:triagebot-nominated, r=Mark-Simulacrum
Michael Goulet [Thu, 23 Jun 2022 21:39:17 +0000 (14:39 -0700)]
Rollup merge of #98409 - joshtriplett:triagebot-nominated, r=Mark-Simulacrum

triagebot.toml: Allow applying nominated labels

2 years agoRollup merge of #98390 - GuillaumeGomez:keyword-rustdoc-json, r=notriddle
Michael Goulet [Thu, 23 Jun 2022 21:39:16 +0000 (14:39 -0700)]
Rollup merge of #98390 - GuillaumeGomez:keyword-rustdoc-json, r=notriddle

Fixes handling of keywords in rustdoc json output

Fixes #98002.

Instead of panicking, we just filter them out.

cc ```@matthiaskrgr```
r? ```@notriddle```

2 years agoRollup merge of #98388 - rosehuds:master, r=davidtwco
Michael Goulet [Thu, 23 Jun 2022 21:39:15 +0000 (14:39 -0700)]
Rollup merge of #98388 - rosehuds:master, r=davidtwco

implement `iter_projections` function on `PlaceRef`

this makes the api more flexible. the original function now calls the PlaceRef
version to avoid duplicating the code.

2 years agoRollup merge of #98365 - jyn514:improve-obligation-errors-review-comments, r=eholk
Michael Goulet [Thu, 23 Jun 2022 21:39:14 +0000 (14:39 -0700)]
Rollup merge of #98365 - jyn514:improve-obligation-errors-review-comments, r=eholk

Address review comments from #98259

It got approved so fast I didn't have time to make changes xD

r? ``@eholk``

2 years agoRollup merge of #98364 - RalfJung:arc-clone, r=Mark-Simulacrum
Michael Goulet [Thu, 23 Jun 2022 21:39:13 +0000 (14:39 -0700)]
Rollup merge of #98364 - RalfJung:arc-clone, r=Mark-Simulacrum

clarify Arc::clone overflow check comment

I had to read this twice to realize that this is explaining that the code is technically unsound, so move that into a dedicated paragraph and make the wording a bit more explicit.

2 years agoRollup merge of #98355 - hoodmane:emscripten-no-default, r=petrochenkov
Michael Goulet [Thu, 23 Jun 2022 21:39:12 +0000 (14:39 -0700)]
Rollup merge of #98355 - hoodmane:emscripten-no-default, r=petrochenkov

Update no_default_libraries handling for emscripten target

```@sbc100``` says:

> `-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=[]` is almost certainly wrong/out-of-date.   This setting defaults to the empty list anyway these days so its redundant.  Also we now support `-nodefaultlibs` so you can use that, as with other toolchains.

https://github.com/rust-lang/rust/issues/98303#issuecomment-1162163684

2 years agoRollup merge of #98353 - beetrees:builtin-macros-cfg-diag, r=davidtwco
Michael Goulet [Thu, 23 Jun 2022 21:39:11 +0000 (14:39 -0700)]
Rollup merge of #98353 - beetrees:builtin-macros-cfg-diag, r=davidtwco

Migrate two diagnostics from the `rustc_builtin_macros` crate

Migrate two diagnostics to use the struct derive and be translatable.

r? ```@davidtwco```

2 years agoRollup merge of #98310 - jsha:defer-source-sidebar, r=GuillaumeGomez
Michael Goulet [Thu, 23 Jun 2022 21:39:10 +0000 (14:39 -0700)]
Rollup merge of #98310 - jsha:defer-source-sidebar, r=GuillaumeGomez

rustdoc: optimize loading of source sidebar

The source sidebar has a setting to remember whether it should be open or
closed. Previously, this setting was handled in source-script.js, which
is loaded with `defer`, meaning it is often run after the document is rendered.
Since CSS renders the source sidebar as closed by default, changing this
after the initial render results in a relayout.

Instead, handle the setting in storage.js, which is the first script to load
and is the only script that blocks render. This avoids a relayout and means
navigating between files with the sidebar open is faster.

Demo: https://rustdoc.crud.net/jsha/defer-source-sidebar/src/alloc/ffi/c_str.rs.html

r? ````@GuillaumeGomez````

2 years agoRollup merge of #98305 - klensy:no-err-alloc, r=compiler-errors
Michael Goulet [Thu, 23 Jun 2022 21:39:09 +0000 (14:39 -0700)]
Rollup merge of #98305 - klensy:no-err-alloc, r=compiler-errors

prohibit_generics: don't alloc error string if no error emitted

Noticed unreaded allocs in DHAT.

2 years agoRollup merge of #98283 - TaKO8Ki:point-at-private-fields-in-struct-literal, r=compile...
Michael Goulet [Thu, 23 Jun 2022 21:39:08 +0000 (14:39 -0700)]
Rollup merge of #98283 - TaKO8Ki:point-at-private-fields-in-struct-literal, r=compiler-errors

Point at private fields in struct literal

closes #95872

2 years agoRollup merge of #98269 - compiler-errors:provide-more-segment-res, r=petrochenkov
Michael Goulet [Thu, 23 Jun 2022 21:39:07 +0000 (14:39 -0700)]
Rollup merge of #98269 - compiler-errors:provide-more-segment-res, r=petrochenkov

Provide a `PathSegment.res` in more cases

I find that in many cases, the `res` associated with a `PathSegment` is `Res::Err` even though the path was fully resolved. A few diagnostics use this `res` and their error messages suffer because of the lack of resolved segment.

This fixes it a bit, but it's obviously not complete and I'm not exactly sure if it's correct.

2 years agoRollup merge of #98259 - jyn514:improve-obligation-errors, r=estebank
Michael Goulet [Thu, 23 Jun 2022 21:39:06 +0000 (14:39 -0700)]
Rollup merge of #98259 - jyn514:improve-obligation-errors, r=estebank

Greatly improve error reporting for futures and generators in `note_obligation_cause_code`

Most futures don't go through this code path, because they're caught by
`maybe_note_obligation_cause_for_async_await`. But all generators do,
and `maybe_note` is imperfect and doesn't catch all futures. Improve the error message for those it misses.

At some point, we may want to consider unifying this with the code for `maybe_note_async_await`,
so that `async_await` notes all parent constraints, and `note_obligation` can point to yield points.
But both functions are quite complicated, and it's not clear to me how to combine them;
this seems like a good incremental improvement.

Helps with https://github.com/rust-lang/rust/issues/97332.

r? ``@estebank`` cc ``@eholk`` ``@compiler-errors``

2 years agoRollup merge of #98184 - compiler-errors:elided-lifetime-in-impl-nll, r=cjgillot
Michael Goulet [Thu, 23 Jun 2022 21:39:06 +0000 (14:39 -0700)]
Rollup merge of #98184 - compiler-errors:elided-lifetime-in-impl-nll, r=cjgillot

Give name if anonymous region appears in impl signature

Fixes #98170

We probably should remove the two unwraps in [`report_general_error`](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_borrowck/diagnostics/region_errors.rs.html#683-685), but I have no idea what to provide if those regions are missing, so I've kept those in. Let me know if I should try harder to remove those.

2 years agoRollup merge of #96173 - jmaargh:jmaargh/with-capacity-doc-fix, r=Dylan-DPC
Michael Goulet [Thu, 23 Jun 2022 21:39:05 +0000 (14:39 -0700)]
Rollup merge of #96173 - jmaargh:jmaargh/with-capacity-doc-fix, r=Dylan-DPC

Fix documentation for  `with_capacity` and `reserve` families of methods

Fixes #95614

Documentation for the following methods
 - `with_capacity`
 - `with_capacity_in`
 - `with_capacity_and_hasher`
 - `reserve`
 - `reserve_exact`
 - `try_reserve`
 - `try_reserve_exact`

was inconsistent and often not entirely correct where they existed on the following types
- `Vec`
- `VecDeque`
- `String`
- `OsString`
- `PathBuf`
- `BinaryHeap`
- `HashSet`
- `HashMap`
- `BufWriter`
- `LineWriter`

since the allocator is allowed to allocate more than the requested capacity in all such cases, and will frequently "allocate" much more in the case of zero-sized types (I also checked `BufReader`, but there the docs appear to be accurate as it appears to actually allocate the exact capacity).

Some effort was made to make the documentation more consistent between types as well.

2 years agoadd regression tests found in crater
Niko Matsakis [Thu, 23 Jun 2022 21:16:47 +0000 (17:16 -0400)]
add regression tests found in crater

2 years agorun `x.py fmt`
Niko Matsakis [Thu, 23 Jun 2022 21:00:46 +0000 (17:00 -0400)]
run `x.py fmt`

2 years agoremove misleading comment
Niko Matsakis [Thu, 23 Jun 2022 20:56:43 +0000 (16:56 -0400)]
remove misleading comment

per aliemjay's suggestion

2 years agotry to clarify confusing comment
Niko Matsakis [Thu, 23 Jun 2022 20:54:55 +0000 (16:54 -0400)]
try to clarify confusing comment

2 years agonormalize if-eq bounds before testing
Niko Matsakis [Thu, 23 Jun 2022 20:53:44 +0000 (16:53 -0400)]
normalize if-eq bounds before testing

Hat-tip: aliemjay

2 years agoapply suggestions from oli-obk
Niko Matsakis [Thu, 23 Jun 2022 20:40:06 +0000 (16:40 -0400)]
apply suggestions from oli-obk

Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2 years agocoallesce docs
Niko Matsakis [Thu, 23 Jun 2022 20:38:24 +0000 (16:38 -0400)]
coallesce docs

2 years agorename IfEqBound to IfEq
Niko Matsakis [Thu, 23 Jun 2022 20:35:47 +0000 (16:35 -0400)]
rename IfEqBound to IfEq

2 years agoremove VerifyBound::IfEq variant
Niko Matsakis [Thu, 23 Jun 2022 20:28:46 +0000 (16:28 -0400)]
remove VerifyBound::IfEq variant

2 years agoAuto merge of #98423 - ehuss:ci-submodule-no-archive, r=compiler-errors
bors [Thu, 23 Jun 2022 18:00:16 +0000 (18:00 +0000)]
Auto merge of #98423 - ehuss:ci-submodule-no-archive, r=compiler-errors

Temporarily disable submodule archive downloads.

The `llvm-project` `/archive/` download has been timing out with a 504 error since yesterday. This changes it so that it uses a normal submodule clone, but also uses `--depth 1` since GitHub now supports `allowReachableSHA1InWant` which allows for fetching a specific revision. That should be reasonably fast (but not as fast as an archive download) to unstick CI.

2 years agoTemporarily disable submodule archive downloads.
Eric Huss [Thu, 23 Jun 2022 13:57:21 +0000 (06:57 -0700)]
Temporarily disable submodule archive downloads.

2 years agoSuggest defining variable as mutable on `&mut _` type mismatch in pats
Maybe Waffle [Thu, 23 Jun 2022 16:33:40 +0000 (20:33 +0400)]
Suggest defining variable as mutable on `&mut _` type mismatch in pats

2 years agoUpdate browser-ui-test version to 0.9.6
Guillaume Gomez [Thu, 23 Jun 2022 11:04:29 +0000 (13:04 +0200)]
Update browser-ui-test version to 0.9.6

This update provides a better error message when chromium crashes

2 years agoSession object: Set OS/ABI
Martin Kröning [Wed, 1 Jun 2022 22:16:00 +0000 (00:16 +0200)]
Session object: Set OS/ABI

This adapts LLVM's behavior of MCELFObjectTargetWriter::getOSABI [1].

[1]: https://github.com/llvm/llvm-project/blob/8c8a2679a20f621994fa904bcfc68775e7345edc/llvm/include/llvm/MC/MCELFObjectWriter.h#L72-L86

2 years agoRemove excess rib while resolving closures
Maybe Waffle [Thu, 23 Jun 2022 08:21:23 +0000 (12:21 +0400)]
Remove excess rib while resolving closures

2 years agoupdate rustfmt
Caleb Cartwright [Thu, 23 Jun 2022 03:16:58 +0000 (22:16 -0500)]
update rustfmt

2 years agoMerge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
Caleb Cartwright [Thu, 23 Jun 2022 03:14:32 +0000 (22:14 -0500)]
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt

2 years agochore: prep v1.5.1 release
Caleb Cartwright [Thu, 23 Jun 2022 02:19:00 +0000 (21:19 -0500)]
chore: prep v1.5.1 release

2 years agoMerge pull request #5405 from calebcartwright/subtree-sync-2022-06-22
Caleb Cartwright [Thu, 23 Jun 2022 01:57:46 +0000 (20:57 -0500)]
Merge pull request #5405 from calebcartwright/subtree-sync-2022-06-22

Subtree sync 2022 06 22

2 years agoSet no_default_libraries: false in wasm32_emscripten target
Hood Chatham [Thu, 23 Jun 2022 00:43:10 +0000 (17:43 -0700)]
Set no_default_libraries: false in wasm32_emscripten target

2 years agochore: bump toolchain
Caleb Cartwright [Thu, 23 Jun 2022 00:36:53 +0000 (19:36 -0500)]
chore: bump toolchain

2 years agoRevert "Memoize format_expr"
Caleb Cartwright [Thu, 23 Jun 2022 00:29:38 +0000 (19:29 -0500)]
Revert "Memoize format_expr"

This reverts commit a37d3ab0e1c7c05f1a6410fb7ddf5539f0d030f8.

2 years agoMerge remote-tracking branch 'upstream/master' into subtree-sync-2022-06-22
Caleb Cartwright [Thu, 23 Jun 2022 00:28:27 +0000 (19:28 -0500)]
Merge remote-tracking branch 'upstream/master' into subtree-sync-2022-06-22

2 years agoUpdate tendril
Eric Huss [Wed, 22 Jun 2022 23:49:24 +0000 (16:49 -0700)]
Update tendril