]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoMake `From` impls of NonZero integer const.
woppopo [Wed, 20 Oct 2021 03:04:58 +0000 (12:04 +0900)]
Make `From` impls of NonZero integer const.
I also changed the feature gate added to `From` impls of Atomic integer to `const_num_from_num` from `const_convert`.

2 years agoAuto merge of #90067 - JohnTitor:rollup-afrjulz, r=JohnTitor
bors [Tue, 19 Oct 2021 22:14:21 +0000 (22:14 +0000)]
Auto merge of #90067 - JohnTitor:rollup-afrjulz, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #86479 (Automatic exponential formatting in Debug)
 - #87404 (Add support for artifact size profiling)
 - #87769 (Alloc features cleanup)
 - #88789 (remove unnecessary bound on Zip specialization impl)
 - #88860 (Deduplicate panic_fmt)
 - #90009 (Make more `From` impls `const` (libcore))
 - #90018 (Fix rustdoc UI for very long type names)
 - #90025 (Revert #86011 to fix an incorrect bound check)
 - #90036 (Remove border-bottom from most docblocks.)
 - #90060 (Update RELEASES.md)

Failed merges:

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

2 years agoRollup merge of #90060 - vincentdephily:patch-1, r=Mark-Simulacrum
Yuki Okushi [Tue, 19 Oct 2021 19:35:18 +0000 (04:35 +0900)]
Rollup merge of #90060 - vincentdephily:patch-1, r=Mark-Simulacrum

Update RELEASES.md

Fix typo.

2 years agoRollup merge of #90036 - jsha:less-rule, r=GuillaumeGomez
Yuki Okushi [Tue, 19 Oct 2021 19:35:17 +0000 (04:35 +0900)]
Rollup merge of #90036 - jsha:less-rule, r=GuillaumeGomez

Remove border-bottom from most docblocks.

Headings in the top-doc docblock still get a border-bottom due to a rule
that covers all h2, h3, and h4. Method docblocks are generally h5, and
so don't get a border-bottom anymore.

This fixes a problem where a sub-sub-heading within a method would have
a line that went all the way across the page, creating a division that
made that sub-sub-heading look much more important than it really is.

Fixes #90033

Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html

r? ``@GuillaumeGomez``

2 years agoRollup merge of #90025 - JohnTitor:revert-86011, r=estebank
Yuki Okushi [Tue, 19 Oct 2021 19:35:17 +0000 (04:35 +0900)]
Rollup merge of #90025 - JohnTitor:revert-86011, r=estebank

Revert #86011 to fix an incorrect bound check

This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing
changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.

Fixes #89935
r? ``@estebank``

2 years agoRollup merge of #90018 - GuillaumeGomez:too-long-item-names, r=jsha
Yuki Okushi [Tue, 19 Oct 2021 19:35:15 +0000 (04:35 +0900)]
Rollup merge of #90018 - GuillaumeGomez:too-long-item-names, r=jsha

Fix rustdoc UI for very long type names

Fixes #89972.

While working on it, I also discovered that when the item name is too long, it also breaks the flow of the page.

To make things right, I also renamed the `type-decl` CSS class into `item-decl` (because this PR also generates it for more than type declarations).

So here are the before/after screenshots:

![Screenshot from 2021-10-18 16-58-03](https://user-images.githubusercontent.com/3050060/137757247-637fcf04-4406-49c6-8a8a-18c2074aacd9.png)
![Screenshot from 2021-10-18 16-58-26](https://user-images.githubusercontent.com/3050060/137757252-17935e63-53b3-449f-a535-7be91ff0e257.png)

![Screenshot from 2021-10-18 16-58-07](https://user-images.githubusercontent.com/3050060/137757278-8b12e348-2980-4fc4-8853-bef99d58981f.png)
![Screenshot from 2021-10-18 16-58-28](https://user-images.githubusercontent.com/3050060/137757282-534a0e1b-3016-49ba-b3ac-e45bdb9035cb.png)

r? ``@jsha``

2 years agoRollup merge of #90009 - woppopo:const_from_more, r=dtolnay
Yuki Okushi [Tue, 19 Oct 2021 19:35:15 +0000 (04:35 +0900)]
Rollup merge of #90009 - woppopo:const_from_more, r=dtolnay

Make more `From` impls `const` (libcore)

Adding `const` to `From` implementations in the core. `rustc_const_unstable` attribute is not added to unstable implementations.

Tracking issue: #88674

<details>
<summary>Done</summary><div>

- `T` from `T`
- `T` from `!`
- `Option<T>` from `T`
- `Option<&T>` from `&Option<T>`
- `Option<&mut T>` from `&mut Option<T>`
- `Cell<T>` from `T`
- `RefCell<T>` from `T`
- `UnsafeCell<T>` from `T`
- `OnceCell<T>` from `T`
- `Poll<T>` from `T`
- `u32` from `char`
- `u64` from `char`
- `u128` from `char`
- `char` from `u8`
- `AtomicBool` from `bool`
- `AtomicPtr<T>` from `*mut T`
- `AtomicI(bits)` from `i(bits)`
- `AtomicU(bits)` from `u(bits)`
- `i(bits)` from `NonZeroI(bits)`
- `u(bits)` from `NonZeroU(bits)`
- `NonNull<T>` from `Unique<T>`
- `NonNull<T>` from `&T`
- `NonNull<T>` from `&mut T`
- `Unique<T>` from `&mut T`
- `Infallible` from `!`
- `TryIntError` from `!`
- `TryIntError` from `Infallible`
- `TryFromSliceError` from `Infallible`
- `FromResidual for Option<T>`
</div></details>

<details>
<summary>Remaining</summary><dev>

- `NonZero` from `NonZero`
These can't be made const at this time because these use Into::into.
https://github.com/rust-lang/rust/blob/master/library/core/src/convert/num.rs#L393

- `std`, `alloc`
There may still be many implementations that can be made `const`.
</div></details>

2 years agoRollup merge of #88860 - nbdd0121:panic, r=m-ou-se
Yuki Okushi [Tue, 19 Oct 2021 19:35:14 +0000 (04:35 +0900)]
Rollup merge of #88860 - nbdd0121:panic, r=m-ou-se

Deduplicate panic_fmt

std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.

2 years agoRollup merge of #88789 - the8472:rm-zip-bound, r=JohnTitor
Yuki Okushi [Tue, 19 Oct 2021 19:35:13 +0000 (04:35 +0900)]
Rollup merge of #88789 - the8472:rm-zip-bound, r=JohnTitor

remove unnecessary bound on Zip specialization impl

I originally added this bound in an attempt to make the specialization
sound for owning iterators but it was never correct here and the correct
and [already implemented](https://github.com/rust-lang/rust/blob/497ee321af3b8496eaccd7af7b437f18bab81abf/library/alloc/src/vec/into_iter.rs#L220-L232) solution is is to place it on the IntoIter
implementation.

2 years agoRollup merge of #87769 - m-ou-se:alloc-features-cleanup, r=yaahc,dtolnay
Yuki Okushi [Tue, 19 Oct 2021 19:35:12 +0000 (04:35 +0900)]
Rollup merge of #87769 - m-ou-se:alloc-features-cleanup, r=yaahc,dtolnay

Alloc features cleanup

This sorts and categorizes the `#![features]` in `alloc` and removes unused ones.

This is part of #87766

The following feature attributes were unnecessary and are removed:

```diff
// Library features:
-#![feature(cow_is_borrowed)]
-#![feature(maybe_uninit_uninit_array)]
-#![feature(slice_partition_dedup)]

// Language features:
-#![feature(arbitrary_self_types)]
-#![feature(auto_traits)]
-#![feature(box_patterns)]
-#![feature(decl_macro)]
-#![feature(nll)]
```

2 years agoRollup merge of #87404 - rylev:artifact-size-profiling, r=wesleywiser
Yuki Okushi [Tue, 19 Oct 2021 19:35:11 +0000 (04:35 +0900)]
Rollup merge of #87404 - rylev:artifact-size-profiling, r=wesleywiser

Add support for artifact size profiling

This adds support for profiling artifact file sizes (incremental compilation artifacts and query cache to begin with).

Eventually we want to track this in perf.rlo so we can ensure that file sizes do not change dramatically on each pull request.

This relies on support in measureme: https://github.com/rust-lang/measureme/pull/169. Once that lands we can update this PR to not point to a git dependency.

This was worked on together with `@michaelwoerister.`

r? `@wesleywiser`

2 years agoRollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
Yuki Okushi [Tue, 19 Oct 2021 19:35:10 +0000 (04:35 +0900)]
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc

Automatic exponential formatting in Debug

Context: See [this comment from the libs team](https://github.com/rust-lang/rfcs/pull/2729#issuecomment-853454204)

---

Makes `"{:?}"` switch to exponential for floats based on magnitude. The libs team suggested exploring this idea in the discussion thread for RFC rust-lang/rfcs#2729. (**note:** this is **not** an implementation of the RFC; it is an implementation of one of the alternatives)

Thresholds chosen were 1e-4 and 1e16.  Justification described [here](https://github.com/rust-lang/rfcs/pull/2729#issuecomment-864482954).

**This will require a crater run.**

---

As mentioned in the commit message of 8731d4dfb47, this behavior will not apply when a precision is supplied, because I wanted to preserve the following existing and useful behavior of `{:.PREC?}` (which recursively applies `{:.PREC}` to floats in a struct):

```rust
assert_eq!(
    format!("{:.2?}", [100.0, 0.000004]),
    "[100.00, 0.00]",
)
```

I looked around and am not sure where there are any tests that actually use this in the test suite, though?

All things considered, I'm surprised that this change did not seem to break even a single existing test in `x.py test --stage 2`.  (even when I tried a smaller threshold of 1e6)

2 years agoUpdate RELEASES.md
Vincent de Phily [Tue, 19 Oct 2021 14:50:27 +0000 (15:50 +0100)]
Update RELEASES.md

Fix typo.

2 years agoAuto merge of #89933 - est31:let_else, r=michaelwoerister
bors [Tue, 19 Oct 2021 14:41:39 +0000 (14:41 +0000)]
Auto merge of #89933 - est31:let_else, r=michaelwoerister

Adopt let_else across the compiler

This performs a substitution of code following the pattern:

```
let <id> = if let <pat> = ... { identity } else { ... : ! };
```

To simplify it to:

```
let <pat> = ... { identity } else { ... : ! };
```

By adopting the `let_else` feature (cc #87335).

The PR also updates the syn crate because the currently used version of the crate doesn't support `let_else` syntax yet.

Note: Generally I'm the person who *removes* usages of unstable features from the compiler, not adds more usages of them, but in this instance I think it hopefully helps the feature get stabilized sooner and in a better state. I have written a [comment](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205) on the tracking issue about my experience and what I feel could be improved before stabilization of `let_else`.

2 years agoRemove begin_panic_fmt from clippy
Gary Guo [Tue, 19 Oct 2021 12:58:58 +0000 (13:58 +0100)]
Remove begin_panic_fmt from clippy

2 years agoDeduplicate panic_fmt
Gary Guo [Sat, 11 Sep 2021 02:44:02 +0000 (03:44 +0100)]
Deduplicate panic_fmt

std's begin_panic_fmt and core's panic_fmt are duplicates.
Merge them to declutter code and remove a lang item.

2 years agoReenable feature(nll) in alloc.
Mara Bos [Tue, 19 Oct 2021 12:54:35 +0000 (14:54 +0200)]
Reenable feature(nll) in alloc.

2 years agoRemove unused language #![feature]s from alloc.
Mara Bos [Wed, 4 Aug 2021 17:17:35 +0000 (19:17 +0200)]
Remove unused language #![feature]s from alloc.

2 years agoRemove unused library #![feature]s from alloc.
Mara Bos [Wed, 4 Aug 2021 17:17:35 +0000 (19:17 +0200)]
Remove unused library #![feature]s from alloc.

2 years agoSort and categorize #![feature]s in alloc.
Mara Bos [Wed, 4 Aug 2021 17:00:46 +0000 (19:00 +0200)]
Sort and categorize #![feature]s in alloc.

2 years agoAuto merge of #90039 - ehuss:update-cargo, r=ehuss
bors [Tue, 19 Oct 2021 11:19:54 +0000 (11:19 +0000)]
Auto merge of #90039 - ehuss:update-cargo, r=ehuss

Update cargo

6 commits in c7957a74bdcf3b11e7154c1a9401735f23ebd484..7fbbf4e8f23e3c24b8afff541dcb17e53eb5ff88
2021-10-11 20:17:07 +0000 to 2021-10-19 02:16:48 +0000
- Make future-incompat-report output more user-friendly (rust-lang/cargo#9953)
- Fix fetching git repos after a force push. (rust-lang/cargo#9979)
- Add rustc-link-args to doctest build (rust-lang/cargo#9916)
- Add the start of a basic benchmarking suite. (rust-lang/cargo#9955)
- Use forms for issue templates. (rust-lang/cargo#9970)
- Add rust_metadata to SerializedPackage (rust-lang/cargo#9967)

2 years agoAuto merge of #90040 - nbdd0121:issue-90038, r=oli-obk
bors [Tue, 19 Oct 2021 08:13:35 +0000 (08:13 +0000)]
Auto merge of #90040 - nbdd0121:issue-90038, r=oli-obk

Fix wrong niche calculation when 2+ niches are placed at the start

When the niche is at the start, existing code incorrectly uses 1 instead of count for subtraction.

Fix #90038

`@rustbot` label: T-compiler

2 years agoFix issue 90038
Gary Guo [Tue, 19 Oct 2021 05:42:44 +0000 (06:42 +0100)]
Fix issue 90038

2 years agoAuto merge of #90037 - matthiaskrgr:rollup-cdfhxtn, r=matthiaskrgr
bors [Tue, 19 Oct 2021 05:04:38 +0000 (05:04 +0000)]
Auto merge of #90037 - matthiaskrgr:rollup-cdfhxtn, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #89766 (RustWrapper: adapt for an LLVM API change)
 - #89867 (Fix macro_rules! duplication when reexported in the same module)
 - #89941 (removing TLS support in x86_64-unknown-none-hermitkernel)
 - #89956 (Suggest a case insensitive match name regardless of levenshtein distance)
 - #89988 (Do not promote values with const drop that need to be dropped)
 - #89997 (Add test for issue #84957 - `str.as_bytes()` in a `const` expression)
 - #90002 (:arrow_up: rust-analyzer)
 - #90034 (Tiny tweak to Iterator::unzip() doc comment example.)

Failed merges:

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

2 years agoUpdate cargo
Eric Huss [Tue, 19 Oct 2021 04:22:09 +0000 (21:22 -0700)]
Update cargo

2 years agoReduce margin on h5 and h6
Jacob Hoffman-Andrews [Tue, 19 Oct 2021 04:04:38 +0000 (21:04 -0700)]
Reduce margin on h5 and h6

2 years agoRollup merge of #90034 - moxian:unzip-doc, r=cuviper
Matthias Krüger [Tue, 19 Oct 2021 03:40:56 +0000 (05:40 +0200)]
Rollup merge of #90034 - moxian:unzip-doc, r=cuviper

Tiny tweak to Iterator::unzip() doc comment example.

It's easier to figure out what it's doing and which output elements map to which input ones if the matrix we are dealing with is rectangular 2x3 rather than square 2x2.

2 years agoRollup merge of #90002 - lnicola:rust-analyzer-2021-10-18, r=lnicola
Matthias Krüger [Tue, 19 Oct 2021 03:40:55 +0000 (05:40 +0200)]
Rollup merge of #90002 - lnicola:rust-analyzer-2021-10-18, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``

2 years agoRollup merge of #89997 - cameron1024:const-str-as-bytes-ice, r=JohnTitor
Matthias Krüger [Tue, 19 Oct 2021 03:40:54 +0000 (05:40 +0200)]
Rollup merge of #89997 - cameron1024:const-str-as-bytes-ice, r=JohnTitor

Add test for issue #84957 - `str.as_bytes()` in a `const` expression

Hi, this PR adds a test for issue #84957 . I'm quite new to rustc so let me know if there's anything else that needs doing 😄

Closes #84957

2 years agoRollup merge of #89988 - tmiasko:unpromote-const-drop, r=oli-obk
Matthias Krüger [Tue, 19 Oct 2021 03:40:54 +0000 (05:40 +0200)]
Rollup merge of #89988 - tmiasko:unpromote-const-drop, r=oli-obk

Do not promote values with const drop that need to be dropped

Changes from #88558 allowed using `~const Drop` in constants by
introducing a new `NeedsNonConstDrop` qualif.

The new qualif was also used for promotion purposes, and allowed
promotion to happen for values that needs to be dropped but which
do have a const drop impl.

Since for promoted the drop implementation is never executed,
this lead to observable change in behaviour. For example:

```rust

struct Panic();

impl const Drop for Panic {
    fn drop(&mut self) {
        panic!();
    }
}

fn main() {
    let _ = &Panic();
}
```

Restore the use of `NeedsDrop` qualif during promotion to avoid the issue.

2 years agoRollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank
Matthias Krüger [Tue, 19 Oct 2021 03:40:53 +0000 (05:40 +0200)]
Rollup merge of #89956 - JohnTitor:suggest-case-insensitive-match-names, r=estebank

Suggest a case insensitive match name regardless of levenshtein distance

Fixes #86170

Currently, `find_best_match_for_name` only returns a case insensitive match name depending on a Levenshtein distance. It's a bit unfortunate that that hides some suggestions for typos like `Bar` -> `BAR`. That idea is from https://github.com/rust-lang/rust/pull/46347#discussion_r153701834, but I think it still makes some sense to show a candidate when we find a case insensitive match name as it's more like a typo.
Skipped the `candidate != lookup` check because the current (i.e, `levenshtein_match`) returns the exact same `Symbol` anyway but it doesn't seem to confuse anything on UI tests.

r? ``@estebank``

2 years agoRollup merge of #89941 - hermitcore:kernel, r=joshtriplett
Matthias Krüger [Tue, 19 Oct 2021 03:40:52 +0000 (05:40 +0200)]
Rollup merge of #89941 - hermitcore:kernel, r=joshtriplett

removing TLS support in x86_64-unknown-none-hermitkernel

HermitCore's kernel itself doesn't support TLS. Consequently, the entries in x86_64-unknown-none-hermitkernel should be removed. This commit should help to finalize #89062.

2 years agoRollup merge of #89867 - Urgau:fix-double-definition, r=GuillaumeGomez
Matthias Krüger [Tue, 19 Oct 2021 03:40:51 +0000 (05:40 +0200)]
Rollup merge of #89867 - Urgau:fix-double-definition, r=GuillaumeGomez

Fix macro_rules! duplication when reexported in the same module

This can append if within the same module a `#[macro_export] macro_rules!`
is declared but also a reexport of itself producing two export of the same
macro in the same module. In that case we only want to document it once.

Before:
```
Module {
    is_crate: true,
    items: [
        Id("0:4"),   // pub use crate::repro as repro2;
        Id("0:3"),   // macro_rules! repro
        Id("0:3"),   // duplicate, same as above
    ],
}
```

After:
```
Module {
    is_crate: true,
    items: [
        Id("0:4"),   // pub use crate::repro as repro2;
        Id("0:3"),   // macro_rules! repro
    ],
}
```

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

2 years agoRollup merge of #89766 - krasimirgg:llvm-14-targetregistrty, r=nagisa
Matthias Krüger [Tue, 19 Oct 2021 03:40:50 +0000 (05:40 +0200)]
Rollup merge of #89766 - krasimirgg:llvm-14-targetregistrty, r=nagisa

RustWrapper: adapt for an LLVM API change

No functional changes intended.

The LLVM commit
https://github.com/llvm/llvm-project/commit/89b57061f7b769e9ea9bf6ed686e284f3e55affe
moved TargetRegistry.(h|cpp) from Support to MC.
This adapts RustWrapper accordingly.

2 years agoRemove border-bottom from most docblocks.
Jacob Hoffman-Andrews [Tue, 19 Oct 2021 03:24:41 +0000 (20:24 -0700)]
Remove border-bottom from most docblocks.

Headings in the top-doc docblock still get a border-bottom due to a rule
that covers all h2, h3, and h4. Method docblocks are generally h5, and
so don't get a border-bottom anymore.

This fixes a problem where a sub-sub-heading within a method would have
a line that went all the way across the page, creating a division that
made that sub-sub-heading look much more important than it really is.

2 years agoAuto merge of #89905 - matthiaskrgr:rev_89709_entirely, r=michaelwoerister
bors [Tue, 19 Oct 2021 02:03:21 +0000 (02:03 +0000)]
Auto merge of #89905 - matthiaskrgr:rev_89709_entirely, r=michaelwoerister

Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions…

…_2, r=petrochenkov"

The PR had some unforseen perf regressions that are not as easy to find.
Revert the PR for now.

This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing
changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef.

2 years agoTiny tweak to Iterator::unzip() doc comment example.
moxian [Tue, 19 Oct 2021 00:03:51 +0000 (00:03 +0000)]
Tiny tweak to Iterator::unzip() doc comment example.

It's easier to figure out what it's doing and which output
elements map to which input ones if the matrix we are dealing
with is rectangular 2x3 rather than square 2x2.

2 years agoAuto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726
bors [Mon, 18 Oct 2021 23:02:53 +0000 (23:02 +0000)]
Auto merge of #89229 - oli-obk:i_love_inferctxt, r=jackh726

Remove redundant member-constraint check

impl trait will, for each lifetime in the hidden type, register a "member constraint" that says the lifetime must be equal or outlive one of the lifetimes of the impl trait. These member constraints will be solved by borrowck

But, as you can see in the big red block of removed code, there was an ad-hoc check for member constraints happening at the site where they get registered. This check had some minor effects on diagnostics, but will fall down on its feet with my big type alias impl trait refactor. So we removed it and I pulled the removal out into a (hopefully) reviewable PR that works on master directly.

2 years agoDo not promote values with const drop that need to be dropped
Tomasz Miąsko [Sun, 17 Oct 2021 00:00:00 +0000 (00:00 +0000)]
Do not promote values with const drop that need to be dropped

Changes from #88558 allowed using `~const Drop` in constants by
introducing a new `NeedsNonConstDrop` qualif.

The new qualif was also used for promotion purposes, and allowed
promotion to happen for values that needs to be dropped but which
do have a const drop impl.

Since for promoted the drop implementation is never executed,
this lead to observable change in behaviour. For example:

```rust

struct Panic();

impl const Drop for Panic {
    fn drop(&mut self) {
        panic!();
    }
}

fn main() {
    let _ = &Panic();
}
```

Restore the use of `NeedsDrop` qualif during promotion to avoid the issue.

2 years agoAuto merge of #89124 - cjgillot:owner-info, r=michaelwoerister
bors [Mon, 18 Oct 2021 19:53:05 +0000 (19:53 +0000)]
Auto merge of #89124 - cjgillot:owner-info, r=michaelwoerister

Index and hash HIR as part of lowering

Part of https://github.com/rust-lang/rust/pull/88186
~Based on https://github.com/rust-lang/rust/pull/88880 (see merge commit).~

Once HIR is lowered, it is later indexed by the `index_hir` query and hashed for `crate_hash`. This PR moves those post-processing steps to lowering itself. As a side objective, the HIR crate data structure is refactored as an `IndexVec<LocalDefId, Option<OwnerInfo<'hir>>>` where `OwnerInfo` stores all the relevant information for an HIR owner.

r? `@michaelwoerister`
cc `@petrochenkov`

2 years agoRename `needs_drop` to `needs_non_const_drop`
Tomasz Miąsko [Sun, 17 Oct 2021 00:00:00 +0000 (00:00 +0000)]
Rename `needs_drop` to `needs_non_const_drop`

2 years agoAdd a regression test for #89935
Yuki Okushi [Mon, 18 Oct 2021 17:43:54 +0000 (02:43 +0900)]
Add a regression test for #89935

2 years agoRevert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"
Yuki Okushi [Mon, 18 Oct 2021 17:33:38 +0000 (02:33 +0900)]
Revert "Rollup merge of #86011 - tlyu:correct-sized-bound-spans, r=estebank"

This reverts commit 36a1076d24697621a3bb67ef654b4eb79647aa54, reversing
changes made to e1e9319d93aea755c444c8f8ff863b0936d7a4b6.

2 years agoMember constraints already covered all of E0482 already, so that error never occurred...
Oli Scherer [Sat, 16 Oct 2021 13:54:08 +0000 (13:54 +0000)]
Member constraints already covered all of E0482 already, so that error never occurred anymore

2 years agoGuarding a loop with a check that it never runs is useless
Oli Scherer [Thu, 30 Sep 2021 15:11:05 +0000 (15:11 +0000)]
Guarding a loop with a check that it never runs is useless

2 years agoRemove unused enum variant
Oli Scherer [Sat, 25 Sep 2021 12:06:29 +0000 (12:06 +0000)]
Remove unused enum variant

2 years agoRemove regionck member constraint handling and leave it to mir borrowck
Oli Scherer [Sat, 25 Sep 2021 11:49:14 +0000 (11:49 +0000)]
Remove regionck member constraint handling and leave it to mir borrowck

2 years agoAdd test to ensure that the docblock elements left margin is as expected
Guillaume Gomez [Mon, 18 Oct 2021 14:50:31 +0000 (16:50 +0200)]
Add test to ensure that the docblock elements left margin is as expected

2 years agoAdd GUI overflow tests for constant and typedef
Guillaume Gomez [Mon, 18 Oct 2021 14:15:09 +0000 (16:15 +0200)]
Add GUI overflow tests for constant and typedef

2 years agoPrevent documentation page title to grow too big
Guillaume Gomez [Mon, 18 Oct 2021 13:30:03 +0000 (15:30 +0200)]
Prevent documentation page title to grow too big

2 years ago* Remove left margin on items declaration at the top of their documentation page
Guillaume Gomez [Mon, 18 Oct 2021 12:49:25 +0000 (14:49 +0200)]
* Remove left margin on items declaration at the top of their documentation page
* Rename "type-decl" into "item-decl" to reflect the change of usage

2 years agoMake more `From` impls `const`
woppopo [Mon, 18 Oct 2021 10:19:28 +0000 (19:19 +0900)]
Make more `From` impls `const`

2 years agoRustWrapper: adapt for an LLVM API change
Krasimir Georgiev [Mon, 11 Oct 2021 10:31:43 +0000 (12:31 +0200)]
RustWrapper: adapt for an LLVM API change

No functional changes intended.

The LLVM commit
https://github.com/llvm/llvm-project/commit/89b57061f7b769e9ea9bf6ed686e284f3e55affe
moved TargetRegistry.(h|cpp) from Support to MC.
This adapts RustWrapper accordingly.

2 years agoadd test for issue 84957
cameron [Mon, 18 Oct 2021 07:41:18 +0000 (08:41 +0100)]
add test for issue 84957

2 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Mon, 18 Oct 2021 07:23:58 +0000 (10:23 +0300)]
:arrow_up: rust-analyzer

2 years agoAuto merge of #90000 - matthiaskrgr:rollup-vj7wwur, r=matthiaskrgr
bors [Mon, 18 Oct 2021 06:46:03 +0000 (06:46 +0000)]
Auto merge of #90000 - matthiaskrgr:rollup-vj7wwur, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #89950 (bootstrap: tweak verbosity settings)
 - #89965 (Fix ICE with `let...else` and `ref mut`)
 - #89974 (Nicer error message if the user attempts to do let...else if)
 - #89987 (Check implementing type for `#[doc(hidden)]`)
 - #89989 (rustdoc: Add static size assertion for `clean::Type`)
 - #89990 (rustc_span: `Ident::invalid` -> `Ident::empty`)
 - #89993 (Remove dead code from `compiletest::json`)
 - #89996 (Bump backtrace)

Failed merges:

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

2 years agoRollup merge of #89996 - winterqt:bump-backtrace, r=Mark-Simulacrum
Matthias Krüger [Mon, 18 Oct 2021 06:13:32 +0000 (08:13 +0200)]
Rollup merge of #89996 - winterqt:bump-backtrace, r=Mark-Simulacrum

Bump backtrace

https://github.com/rust-lang/backtrace-rs/pull/446 allows binaries built with Nix on macOS to be symbolized.

2 years agoRollup merge of #89993 - pierwill:patch-1, r=Mark-Simulacrum
Matthias Krüger [Mon, 18 Oct 2021 06:13:31 +0000 (08:13 +0200)]
Rollup merge of #89993 - pierwill:patch-1, r=Mark-Simulacrum

Remove dead code from `compiletest::json`

Currently getting a dead code warning on master. Might make sense to remove.

2 years agoRollup merge of #89990 - petrochenkov:idempty, r=wesleywiser
Matthias Krüger [Mon, 18 Oct 2021 06:13:30 +0000 (08:13 +0200)]
Rollup merge of #89990 - petrochenkov:idempty, r=wesleywiser

rustc_span: `Ident::invalid` -> `Ident::empty`

The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s as well.

2 years agoRollup merge of #89989 - camelid:type-size, r=jyn514
Matthias Krüger [Mon, 18 Oct 2021 06:13:29 +0000 (08:13 +0200)]
Rollup merge of #89989 - camelid:type-size, r=jyn514

rustdoc: Add static size assertion for `clean::Type`

r? `@jyn514`

2 years agoRollup merge of #89987 - pierwill:fix-85526-docs-hidden-assoc, r=GuillaumeGomez
Matthias Krüger [Mon, 18 Oct 2021 06:13:28 +0000 (08:13 +0200)]
Rollup merge of #89987 - pierwill:fix-85526-docs-hidden-assoc, r=GuillaumeGomez

Check implementing type for `#[doc(hidden)]`

Closes #85526.

2 years agoRollup merge of #89974 - est31:let_else_if_error, r=nagisa
Matthias Krüger [Mon, 18 Oct 2021 06:13:27 +0000 (08:13 +0200)]
Rollup merge of #89974 - est31:let_else_if_error, r=nagisa

Nicer error message if the user attempts to do let...else if

Gives a nice "conditional `else if` is not supported for `let...else`" error when encountering a `let...else if` pattern, as suggested in the [let...else tracking issue](https://github.com/rust-lang/rust/issues/87335#issuecomment-944846205).

2 years agoRollup merge of #89965 - JohnTitor:fix-let-else-ice-with-ref-mut, r=petrochenkov
Matthias Krüger [Mon, 18 Oct 2021 06:13:26 +0000 (08:13 +0200)]
Rollup merge of #89965 - JohnTitor:fix-let-else-ice-with-ref-mut, r=petrochenkov

Fix ICE with `let...else` and `ref mut`

Fixes #89960, opened for review.
I'm not satisfied with the current diagnostics, any ideas?

2 years agoRollup merge of #89950 - infinity0:master, r=Mark-Simulacrum
Matthias Krüger [Mon, 18 Oct 2021 06:13:25 +0000 (08:13 +0200)]
Rollup merge of #89950 - infinity0:master, r=Mark-Simulacrum

bootstrap: tweak verbosity settings

Currently the verbosity settings are:
- 2: RUSTC-SHIM envvars get spammed on every invocation, O(30) lines
     cargo is passed -v which outputs CLI invocations, O(5) lines
- 3: cargo is passed -vv which outputs build script output, O(0-10) lines

This commit changes it to:

- 1: cargo is passed -v, O(5) lines
- 2: cargo is passed -vv, O(10) lines
- 3: RUSTC-SHIM envvars get spammed, O(30) lines

2 years agobump backtrace
Winter [Mon, 18 Oct 2021 01:20:18 +0000 (21:20 -0400)]
bump backtrace

https://github.com/rust-lang/backtrace-rs/pull/446 allows binaries built
with Nix on macOS to be symbolized.

2 years agoRemove dead code from `compiletest::json`
pierwill [Sun, 17 Oct 2021 22:50:35 +0000 (17:50 -0500)]
Remove dead code from `compiletest::json`

2 years agoAuto merge of #89499 - Mark-Simulacrum:with-llvm-13, r=nikic
bors [Sun, 17 Oct 2021 22:29:31 +0000 (22:29 +0000)]
Auto merge of #89499 - Mark-Simulacrum:with-llvm-13, r=nikic

Split out LLVM PGO step and use clang 13 to compile LLVM

We're seeing a PGO version mismatch error in CI logs:

    LLVM Profile Error: Runtime and instrumentation version mismatch : expected 5, but get 7

which is likely due to the version bumped here differing from that used by
rustc.

This PR fixes this by splitting out the PGO step for LLVM into a separate phase of the pgo.sh script, which nets no change to performance (see [these results](https://perf.rust-lang.org/compare.html?start=c34ac8747ca96d09cb08b8f5adddead826e77c06&end=e272c2af45f40c74dab83948235903ffbe3ad57f)). Then, it follows that up with an upgrade to LLVM/clang version 13 as our bootstrap compiler, which yields the performance improvements for this PR -- around 5%. This depends on the first step here, because otherwise we end up somehow clobbering or otherwise hurting our ability to effectively collect performance data, yielding reductions in performance for a subset of benchmarks -- it is not clear what the cause here was precisely, but the split only costs ~10 minutes and seems worthwhile.

2 years agoCheck implementing type for `#[doc(hidden)]`
pierwill [Sun, 17 Oct 2021 19:31:52 +0000 (14:31 -0500)]
Check implementing type for `#[doc(hidden)]`

Closes #85526.

2 years agoAdd static size assertion for `clean::Type`
Noah Lev [Sun, 17 Oct 2021 20:20:43 +0000 (13:20 -0700)]
Add static size assertion for `clean::Type`

2 years agoNicer error message if the user attempts to do let...else if
est31 [Sun, 17 Oct 2021 05:02:52 +0000 (07:02 +0200)]
Nicer error message if the user attempts to do let...else if

2 years agorustc_span: `Ident::invalid` -> `Ident::empty`
Vadim Petrochenkov [Sun, 17 Oct 2021 20:20:30 +0000 (23:20 +0300)]
rustc_span: `Ident::invalid` -> `Ident::empty`

The equivalent for `Symbol`s was renamed some time ago (`kw::Invalid` -> `kw::Empty`), and it makes sense to do the same thing for `Ident`s.

2 years agoAuto merge of #89984 - matthiaskrgr:rollup-ikmyhmx, r=matthiaskrgr
bors [Sun, 17 Oct 2021 19:18:18 +0000 (19:18 +0000)]
Auto merge of #89984 - matthiaskrgr:rollup-ikmyhmx, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #89738 (ty::pretty: prevent infinite recursion for `extern crate` paths.)
 - #89888 (Make `llvm.download-ci-llvm="if-available"` work for tier 2 targets with host tools)
 - #89945 (Remove a mention to `copy_from_slice` from `clone_from_slice` doc)
 - #89946 (Fix an ICE with TAITs and Future)
 - #89963 (Some "parenthesis" and "parentheses" fixes)
 - #89975 (Add a regression test for #85921)
 - #89977 (Make Result::as_mut const)

Failed merges:

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

2 years agoRollup merge of #89977 - woppopo:result_const_as_mut, r=oli-obk
Matthias Krüger [Sun, 17 Oct 2021 16:19:00 +0000 (18:19 +0200)]
Rollup merge of #89977 - woppopo:result_const_as_mut, r=oli-obk

Make Result::as_mut const

Adding `const` for `Result::as_mut`.

Tracking issue: #82814

2 years agoRollup merge of #89975 - JohnTitor:gats-tests-85921, r=jackh726
Matthias Krüger [Sun, 17 Oct 2021 16:18:59 +0000 (18:18 +0200)]
Rollup merge of #89975 - JohnTitor:gats-tests-85921, r=jackh726

Add a regression test for #85921

Closes #85921
r? `@jackh726`

2 years agoRollup merge of #89963 - r00ster91:parenthesisparentheses, r=nagisa
Matthias Krüger [Sun, 17 Oct 2021 16:18:59 +0000 (18:18 +0200)]
Rollup merge of #89963 - r00ster91:parenthesisparentheses, r=nagisa

Some "parenthesis" and "parentheses" fixes

"Parenthesis" is the singular (e.g. one `(` or one `)`) and "parentheses" is the plural (multiple `(` or `)`s) and this is not hard to mix up so here are some fixes for that.

Inspired by #89958

2 years agoRollup merge of #89946 - JohnTitor:fix-89686, r=petrochenkov
Matthias Krüger [Sun, 17 Oct 2021 16:18:58 +0000 (18:18 +0200)]
Rollup merge of #89946 - JohnTitor:fix-89686, r=petrochenkov

Fix an ICE with TAITs and Future

Fixes #89686

2 years agoRollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
Matthias Krüger [Sun, 17 Oct 2021 16:18:57 +0000 (18:18 +0200)]
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472

Remove a mention to `copy_from_slice` from `clone_from_slice` doc

Fixes #84736
I think removing it would be the best but I'm happy to clarify it instead if someone would like.

2 years agoRollup merge of #89888 - rusticstuff:download-ci-llvm-apple-arm64, r=Mark-Simulacrum
Matthias Krüger [Sun, 17 Oct 2021 16:18:56 +0000 (18:18 +0200)]
Rollup merge of #89888 - rusticstuff:download-ci-llvm-apple-arm64, r=Mark-Simulacrum

Make `llvm.download-ci-llvm="if-available"` work for tier 2 targets with host tools

`llvm.download-ci-llvm="if-available"` is used for most profiles configured via `x.py setup`. It allows downloading prebuilt LLVM tarballs from the CI artifacts for a configured list of platforms. Currently this list is restricted to tier 1 targets but it makes sense for all tier 2 targets with host tools.

2 years agoRollup merge of #89738 - eddyb:extern-crate-recursion, r=nagisa
Matthias Krüger [Sun, 17 Oct 2021 16:18:55 +0000 (18:18 +0200)]
Rollup merge of #89738 - eddyb:extern-crate-recursion, r=nagisa

ty::pretty: prevent infinite recursion for `extern crate` paths.

Fixes #55779, fixes #87932.

This fix is based on `@estebank's` idea in https://github.com/rust-lang/rust/issues/55779#issuecomment-614758510 - but instead of trying to get `try_print_visible_def_path_recur`'s cycle detection to work in this case, this PR "just" disables the "visible path" feature when printing the path to an `extern crate`, so that the old recursion chain of `try_print_visible_def_path -> print_def_path -> try_print_visible_def_path`, is now impossible.

Both tests have been confirmed to crash `rustc` because of a stack overflow, without the fix.

2 years agoAuto merge of #89981 - pietroalbini:1.56-version-bump, r=pietroalbini
bors [Sun, 17 Oct 2021 15:35:28 +0000 (15:35 +0000)]
Auto merge of #89981 - pietroalbini:1.56-version-bump, r=pietroalbini

Bump version to Rust 1.58.0

cc `@Mark-Simulacrum`
r? `@ghost`

2 years agobump version to rust 1.58.0
Pietro Albini [Sun, 17 Oct 2021 14:04:44 +0000 (16:04 +0200)]
bump version to rust 1.58.0

2 years agoAuto merge of #89514 - davidtwco:polymorphize-shims-and-predicates, r=lcnr
bors [Sun, 17 Oct 2021 12:33:12 +0000 (12:33 +0000)]
Auto merge of #89514 - davidtwco:polymorphize-shims-and-predicates, r=lcnr

polymorphization: shims and predicates

Supersedes #75737 and #75414. This pull request includes up some changes to polymorphization which hadn't landed previously and gets stage2 bootstrapping and the test suite passing when polymorphization is enabled. There are still issues with `type_id` and polymorphization to investigate but this should get polymorphization in a reasonable state to work on.

- #75737 and #75414 both worked but were blocked on having the rest of the test suite pass (with polymorphization enabled) with and without the PRs. It makes more sense to just land these so that the changes are in.
- #75737's changes remove the restriction of `InstanceDef::Item` on polymorphization, so that shims can now be polymorphized. This won't have much of an effect until polymorphization's analysis is more advanced, but it doesn't hurt.
- #75414's changes remove all logic which marks parameters as used based on their presence in predicates - given #75675, this will enable more polymorphization and avoid the symbol clashes that predicate logic previously sidestepped.
- Polymorphization now explicitly checks (and skips) foreign items, this is necessary for stage2 bootstrapping to work when polymorphization is enabled.
- The conditional determining the emission of a note adding context to a post-monomorphization error has been modified. Polymorphization results in `optimized_mir` running for shims during collection where that wouldn't happen previously, some errors are emitted during `optimized_mir` and these were considered post-monomorphization errors with the existing logic (more errors and shims have a `DefId` coming from the std crate, not the local crate), adding a note that resulted in tests failing. It isn't particularly feasible to change where polymorphization runs or prevent it from using `optimized_mir`, so it seemed more reasonable to not change the conditional.
- `characteristic_def_id_of_type` was being invoked during partitioning for self types of impl blocks which had projections that depended on the value of unused generic parameters of a function - this caused a ICE in a debuginfo test. If partitioning is enabled and the instance needs substitution then this is skipped. That test still fails for me locally, but not with an ICE, but it fails in a fresh checkout too, so 🤷‍♂️.

r? `@lcnr`

2 years agoSome "parenthesis" and "parentheses" fixes
r00ster91 [Sun, 17 Oct 2021 10:04:01 +0000 (12:04 +0200)]
Some "parenthesis" and "parentheses" fixes

2 years agoMake Result::as_mut const
woppopo [Sat, 16 Oct 2021 16:18:00 +0000 (01:18 +0900)]
Make Result::as_mut const

2 years agoAuto merge of #88652 - AGSaidi:linux-aarch64-should-be-actually-monotonic, r=yaahc
bors [Sun, 17 Oct 2021 09:30:30 +0000 (09:30 +0000)]
Auto merge of #88652 - AGSaidi:linux-aarch64-should-be-actually-monotonic, r=yaahc

linux/aarch64 Now() should be actually_monotonic()

While issues have been seen on arm64 platforms the Arm architecture requires
that the counter monotonically increases and that it must provide a uniform
view of system time (e.g. it must not be possible for a core to receive a
message from another core with a time stamp and observe time going backwards
(ARM DDI 0487G.b D11.1.2). While there have been a few 64bit SoCs that have
bugs (#49281, #56940) which cause time to not monotonically increase, these have
been fixed in the Linux kernel and we shouldn't penalize all Arm SoCs for those
who refuse to update their kernels:
SUN50I_ERRATUM_UNKNOWN1 - Allwinner A64 / Pine A64 - fixed in 5.1
FSL_ERRATUM_A008585 - Freescale LS2080A/LS1043A - fixed in 4.10
HISILICON_ERRATUM_161010101 - Hisilicon 1610 - fixed in 4.11
ARM64_ERRATUM_858921 - Cortex A73 - fixed in 4.12

255a3f3e183 std: Force `Instant::now()` to be monotonic added a Mutex to work around
this problem and a small test program using glommio shows the majority of time spent
acquiring and releasing this Mutex. 3914a7b0da8 tries to improve this, but actually
makes it worse on big systems as for 128b atomics a ldxp/stxp pair (and successful loop)
for v8.4 systems that don't support FEAT_LSE2 is required which is expensive as a lock
and because of how the load/store-exclusives scale on large Arm systems is both unfair
to threads and tends to go backwards in performance.

A small sample program using glommio improves by 70x on a 32 core Graviton2
system with this change.

2 years agoAdd a regression test for #85921
Yuki Okushi [Sun, 17 Oct 2021 07:09:49 +0000 (16:09 +0900)]
Add a regression test for #85921

2 years agoAuto merge of #89968 - JohnTitor:rollup-z51n967, r=JohnTitor
bors [Sun, 17 Oct 2021 06:27:08 +0000 (06:27 +0000)]
Auto merge of #89968 - JohnTitor:rollup-z51n967, r=JohnTitor

Rollup of 7 pull requests

Successful merges:

 - #89507 (Add `#[repr(i8)]` to `Ordering`)
 - #89849 (CI: Selecting the Xcode version no longer needed with the macos-11 runners.)
 - #89886 (Update the wasi-libc built with the wasm32-wasi target)
 - #89907 (Remove FIXME since there is nothing to be fixed)
 - #89943 (clippy::complexity fixes)
 - #89953 (Make Option::as_mut const)
 - #89958 (Correct small typo)

Failed merges:

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

2 years agoRollup merge of #89958 - nhamovitz:patch-1, r=nagisa
Yuki Okushi [Sat, 16 Oct 2021 22:52:22 +0000 (07:52 +0900)]
Rollup merge of #89958 - nhamovitz:patch-1, r=nagisa

Correct small typo

2 years agoRollup merge of #89953 - woppopo:option_const_as_mut, r=oli-obk
Yuki Okushi [Sat, 16 Oct 2021 22:52:21 +0000 (07:52 +0900)]
Rollup merge of #89953 - woppopo:option_const_as_mut, r=oli-obk

Make Option::as_mut const

Adding `const` for `Option::as_mut`.

Tracking issue: #67441

2 years agoRollup merge of #89943 - matthiaskrgr:clpcompl, r=oli-obk
Yuki Okushi [Sat, 16 Oct 2021 22:52:20 +0000 (07:52 +0900)]
Rollup merge of #89943 - matthiaskrgr:clpcompl, r=oli-obk

clippy::complexity fixes

2 years agoRollup merge of #89907 - GuillaumeGomez:correctly-emit-errors, r=camelid
Yuki Okushi [Sat, 16 Oct 2021 22:52:19 +0000 (07:52 +0900)]
Rollup merge of #89907 - GuillaumeGomez:correctly-emit-errors, r=camelid

Remove FIXME since there is nothing to be fixed

Resolves #88593.

The errors are deduplicated when displayed to users. They only appear
multiple times in UI tests.

cc ``@jyn514``
r? ``@camelid``

2 years agoRollup merge of #89886 - alexcrichton:update-wasi-libc, r=kennytm
Yuki Okushi [Sat, 16 Oct 2021 22:52:18 +0000 (07:52 +0900)]
Rollup merge of #89886 - alexcrichton:update-wasi-libc, r=kennytm

Update the wasi-libc built with the wasm32-wasi target

This commit updates the wasi-libc that we include with the wasm32-wasi
target, which brings in various misc fixes such as musl updates and some
math tweaks.

2 years agoRollup merge of #89849 - rusticstuff:remove-xcode-select, r=Mark-Simulacrum
Yuki Okushi [Sat, 16 Oct 2021 22:52:18 +0000 (07:52 +0900)]
Rollup merge of #89849 - rusticstuff:remove-xcode-select, r=Mark-Simulacrum

CI: Selecting the Xcode version no longer needed with the macos-11 runners.

It does nothing nowadays since `/Applications/Xcode_12.2.app` does not exist in the GH runner environment and
automatically using the latest version selected by the GH environment is better anyway.

2 years agoRollup merge of #89507 - lopopolo:lopopolo/ordering-repr-i8, r=joshtriplett
Yuki Okushi [Sat, 16 Oct 2021 22:52:17 +0000 (07:52 +0900)]
Rollup merge of #89507 - lopopolo:lopopolo/ordering-repr-i8, r=joshtriplett

Add `#[repr(i8)]` to `Ordering`

Followup to #89491 to allow `Ordering` to auto-derive `AsRepr` once the proposal to add `AsRepr` (#81642) lands.

cc ``@joshtriplett``

2 years agoFix ICE with `let...else` and `ref mut`
Yuki Okushi [Sat, 16 Oct 2021 22:12:22 +0000 (07:12 +0900)]
Fix ICE with `let...else` and `ref mut`

2 years agoCorrect typo
nhamovitz [Sat, 16 Oct 2021 20:36:05 +0000 (13:36 -0700)]
Correct typo

2 years agoRemove FIXME since there is nothing to be fixed.
Guillaume Gomez [Fri, 15 Oct 2021 19:37:31 +0000 (21:37 +0200)]
Remove FIXME since there is nothing to be fixed.

The errors are deduplicated when displayed to users. They only appear
multiple times in UI tests.

2 years agoSuggest a case insensitive match name regardless of levenshtein distance
Yuki Okushi [Sat, 16 Oct 2021 19:51:22 +0000 (04:51 +0900)]
Suggest a case insensitive match name regardless of levenshtein distance

2 years agoAuto merge of #89860 - camsteffen:macro-semi, r=petrochenkov
bors [Sat, 16 Oct 2021 18:20:20 +0000 (18:20 +0000)]
Auto merge of #89860 - camsteffen:macro-semi, r=petrochenkov

Remove trailing semicolon from macro call span

Macro call site spans are now less surprising/more consistent since they no longer contain a semicolon after the macro call.

The downside is that we need to do a little guesswork to get the semicolon in diagnostics. But this should not be noticeable since it is rare for the semicolon to not immediately follow the macro call.

2 years agoclippy::complexity changes
Matthias Krüger [Sat, 16 Oct 2021 08:18:17 +0000 (10:18 +0200)]
clippy::complexity changes