]> git.lizzy.rs Git - rust.git/log
rust.git
19 months agoRollup merge of #100633 - estebank:must_use_async_fn_return, r=tmandry
Dylan DPC [Fri, 11 Nov 2022 15:21:38 +0000 (20:51 +0530)]
Rollup merge of #100633 - estebank:must_use_async_fn_return, r=tmandry

Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`

No longer lint against `#[must_use] async fn foo()`.

When encountering a statement that awaits on a `Future`, check if the
`Future`'s parent item is annotated with `#[must_use]` and emit a lint
if so. This effectively makes `must_use` an annotation on the
`Future::Output` instead of only the `Future` itself.

Fix #78149.

19 months agoAuto merge of #103898 - Nilstrieb:match-macro, r=nnethercote
bors [Fri, 11 Nov 2022 04:54:59 +0000 (04:54 +0000)]
Auto merge of #103898 - Nilstrieb:match-macro, r=nnethercote

Retry failed macro matching for diagnostics

When a declarative macro fails to match, retry the matching to collect diagnostic info instead of collecting it on the fly in the hot path. Split out of #103439.

You made a bunch of changes to declarative macro matching, so
r? `@nnethercote`

This change should produce a few small perf wins: https://github.com/rust-lang/rust/pull/103439#issuecomment-1294249602

19 months agoFix tests after rebase
Esteban Küber [Fri, 11 Nov 2022 03:01:33 +0000 (19:01 -0800)]
Fix tests after rebase

19 months agoAuto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank
bors [Fri, 11 Nov 2022 02:07:52 +0000 (02:07 +0000)]
Auto merge of #99918 - WaffleLapkin:fnFnfun, r=estebank

Recover wrong-cased keywords that start items

(_this pr was inspired by [this tweet](https://twitter.com/Azumanga/status/1552982326409367561)_)

r? `@estebank`

We've talked a bit about this recovery, but I just wanted to make sure that this is the right approach :)

For now I've only added the case insensitive recovery to `use`s, since most other items like `impl` blocks, modules, functions can start with multiple keywords which complicates the matter.

19 months agoreview comments
Esteban Küber [Wed, 17 Aug 2022 15:21:43 +0000 (08:21 -0700)]
review comments

19 months agoConsider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`
Esteban Küber [Tue, 16 Aug 2022 14:56:42 +0000 (07:56 -0700)]
Consider `#[must_use]` annotation on `async fn` as also affecting the `Future::Output`

No longer lint against `#[must_use] async fn foo()`.

When encountering a statement that awaits on a `Future`, check if the
`Future`'s parent item is annotated with `#[must_use]` and emit a lint
if so. This effectively makes `must_use` an annotation on the
`Future::Output` instead of only the `Future` itself.

Fix #78149.

19 months agoTweak span for `#[must_use]`
Esteban Küber [Tue, 16 Aug 2022 14:46:33 +0000 (07:46 -0700)]
Tweak span for `#[must_use]`

Do not point at whole statement, only at the expression (skip pointing at `;`)

19 months agoAuto merge of #104164 - cjgillot:u64-cache, r=compiler-errors
bors [Thu, 10 Nov 2022 20:13:42 +0000 (20:13 +0000)]
Auto merge of #104164 - cjgillot:u64-cache, r=compiler-errors

Use 64 bits for incremental cache in-file positions

We currently use a 32-bit integer to encode byte positions into the incremental cache.
This is not enough when the query chache file is >4GB.

As the overflow check was a `debug_assert`, it was removed in released compilers, making compilation succeed silently.
At the next compilation, cache decoding would try to read unrelated data because of garbled file position, triggering an ICE.

Fixes https://github.com/rust-lang/rust/issues/79786
(I'm closing that bug since it the original report and the subsequent questions are probably different instances. A new bug should be opened for new instances of that ICE.)

19 months agoAuto merge of #104246 - Manishearth:rollup-9o3txc7, r=Manishearth
bors [Thu, 10 Nov 2022 16:22:59 +0000 (16:22 +0000)]
Auto merge of #104246 - Manishearth:rollup-9o3txc7, r=Manishearth

Rollup of 9 pull requests

Successful merges:

 - #101939 (Add loongarch64 abi support)
 - #103863 (Use `TraitEngine` in more places, restrict visibility of `FulfillmentCtxt` constructor)
 - #104036 (Suggest `is_some` when we've found `Option` but expected `bool`)
 - #104060 (Make `Hash`, `Hasher` and `BuildHasher` `#[const_trait]` and make `Sip` const `Hasher`)
 - #104077 (Use aapcs for efiapi calling convention on arm)
 - #104186 (Tighten the 'introduce new binding' suggestion)
 - #104194 (`EarlyBinder` docs)
 - #104233 (Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor`)
 - #104235 (Use `const_error_with_guaranteed` more)

Failed merges:

 - #104078 (Print "Checking/Building ..." message even when --dry-run is passed)
 - #104169 (Migrate `:target` rules to use CSS variables)

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

19 months agoRollup merge of #104235 - compiler-errors:more-ct-guar, r=oli-obk
Manish Goregaokar [Thu, 10 Nov 2022 15:47:42 +0000 (10:47 -0500)]
Rollup merge of #104235 - compiler-errors:more-ct-guar, r=oli-obk

Use `const_error_with_guaranteed` more

Better to pass down an ErrorGuaranteed rather than making a new one out of thin air, for some usages. Also for the ones where we *do* need to delay a bug, that delayed bug will have a more descriptive message.

19 months agoRollup merge of #104233 - compiler-errors:issue-104209, r=lcnr
Manish Goregaokar [Thu, 10 Nov 2022 15:47:41 +0000 (10:47 -0500)]
Rollup merge of #104233 - compiler-errors:issue-104209, r=lcnr

Don't ICE when encountering `ConstKind::Error` in `RequiredConstsVisitor`

Fixes #104209

19 months agoRollup merge of #104194 - BoxyUwU:early_binder_docs, r=compiler-errors
Manish Goregaokar [Thu, 10 Nov 2022 15:47:41 +0000 (10:47 -0500)]
Rollup merge of #104194 - BoxyUwU:early_binder_docs, r=compiler-errors

`EarlyBinder` docs

19 months agoRollup merge of #104186 - chenyukang:yukang/fix-104086-let-binding-issue, r=oli-obk
Manish Goregaokar [Thu, 10 Nov 2022 15:47:40 +0000 (10:47 -0500)]
Rollup merge of #104186 - chenyukang:yukang/fix-104086-let-binding-issue, r=oli-obk

Tighten the 'introduce new binding' suggestion

Fixes #104086

19 months agoRollup merge of #104077 - nicholasbishop:bishop-uefi-aapcs, r=nagisa
Manish Goregaokar [Thu, 10 Nov 2022 15:47:39 +0000 (10:47 -0500)]
Rollup merge of #104077 - nicholasbishop:bishop-uefi-aapcs, r=nagisa

Use aapcs for efiapi calling convention on arm

On arm, [llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets](https://github.com/rust-lang/compiler-builtins/issues/116#issuecomment-261057422). UEFI specifies in the arm calling convention that [floating point extensions aren't used](https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention), so always translate `efiapi` to `aapcs` on arm.

https://github.com/rust-lang/rust/issues/65815

19 months agoRollup merge of #104060 - ink-feather-org:const_hash, r=fee1-dead
Manish Goregaokar [Thu, 10 Nov 2022 15:47:38 +0000 (10:47 -0500)]
Rollup merge of #104060 - ink-feather-org:const_hash, r=fee1-dead

Make `Hash`, `Hasher` and `BuildHasher` `#[const_trait]` and make `Sip` const `Hasher`

This PR enables using Hashes in const context.

r? ``@fee1-dead``

19 months agoRollup merge of #104036 - compiler-errors:option-sugg, r=petrochenkov
Manish Goregaokar [Thu, 10 Nov 2022 15:47:38 +0000 (10:47 -0500)]
Rollup merge of #104036 - compiler-errors:option-sugg, r=petrochenkov

Suggest `is_some` when we've found `Option` but expected `bool`

Thanks `@lunasorcery` for the suggestion.

19 months agoRollup merge of #103863 - compiler-errors:fulfillcx-less, r=wesleywiser
Manish Goregaokar [Thu, 10 Nov 2022 15:47:37 +0000 (10:47 -0500)]
Rollup merge of #103863 - compiler-errors:fulfillcx-less, r=wesleywiser

Use `TraitEngine` in more places, restrict visibility of `FulfillmentCtxt` constructor

Most places that are constructing a `FulfillmentContext` should be constructing a `TraitEngine` generically, so later on if/when we're transitioning it'll be easier.

Logical extension of #99746

19 months agoRollup merge of #101939 - zhaixiaojuan:loongarch64-abi, r=oli-obk
Manish Goregaokar [Thu, 10 Nov 2022 15:47:36 +0000 (10:47 -0500)]
Rollup merge of #101939 - zhaixiaojuan:loongarch64-abi, r=oli-obk

Add loongarch64 abi support

19 months agobroken links go brrrrr
Boxy [Thu, 10 Nov 2022 14:57:18 +0000 (14:57 +0000)]
broken links go brrrrr

19 months agoAuto merge of #104236 - compiler-errors:rollup-adjshd6, r=compiler-errors
bors [Thu, 10 Nov 2022 13:04:51 +0000 (13:04 +0000)]
Auto merge of #104236 - compiler-errors:rollup-adjshd6, r=compiler-errors

Rollup of 9 pull requests

Successful merges:

 - #102763 (Some diagnostic-related nits)
 - #103443 (Parser: Recover from using colon as path separator in imports)
 - #103675 (remove redundent "<>" for ty::Slice with reference type)
 - #104046 (bootstrap: add support for running Miri on a file)
 - #104115 (Migrate crate-search element to CSS variables)
 - #104190 (Ignore "Change InferCtxtBuilder from enter to build" in git blame)
 - #104201 (Add check in GUI test for file loading failure)
 - #104211 (:arrow_up: rust-analyzer)
 - #104231 (Update mailmap)

Failed merges:

 - #104169 (Migrate `:target` rules to use CSS variables)

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

19 months agoRollup merge of #104231 - ibraheemdev:patch-12, r=compiler-errors
Michael Goulet [Thu, 10 Nov 2022 05:53:38 +0000 (21:53 -0800)]
Rollup merge of #104231 - ibraheemdev:patch-12, r=compiler-errors

Update mailmap

19 months agoRollup merge of #104211 - lnicola:rust-analyzer-2022-11-09, r=lnicola
Michael Goulet [Thu, 10 Nov 2022 05:53:38 +0000 (21:53 -0800)]
Rollup merge of #104211 - lnicola:rust-analyzer-2022-11-09, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``

19 months agoRollup merge of #104201 - GuillaumeGomez:gui-test-check-file-errors, r=notriddle
Michael Goulet [Thu, 10 Nov 2022 05:53:37 +0000 (21:53 -0800)]
Rollup merge of #104201 - GuillaumeGomez:gui-test-check-file-errors, r=notriddle

Add check in GUI test for file loading failure

Since https://github.com/rust-lang/rust/pull/101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like https://github.com/rust-lang/rust/pull/104114 to happen again.

The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case.

cc ```@jsha```
r? ```@notriddle```

19 months agoRollup merge of #104190 - Nilstrieb:patch-1, r=compiler-errors
Michael Goulet [Thu, 10 Nov 2022 05:53:37 +0000 (21:53 -0800)]
Rollup merge of #104190 - Nilstrieb:patch-1, r=compiler-errors

Ignore "Change InferCtxtBuilder from enter to build" in git blame

Because it changed the indentation of many things, this commit caused a lot of diff with no functional changes, so we should ignore it.

r? ```@compiler-errors``` as you've complained about this before

The relevant commit: https://github.com/rust-lang/rust/commit/283abbf0e7d20176f76006825b5c52e9a4234e4c

19 months agoRollup merge of #104115 - GuillaumeGomez:migrate-crate-search-div, r=notriddle
Michael Goulet [Thu, 10 Nov 2022 05:53:36 +0000 (21:53 -0800)]
Rollup merge of #104115 - GuillaumeGomez:migrate-crate-search-div, r=notriddle

Migrate crate-search element to CSS variables

There should no UI changes.

r? ```@notriddle```

19 months agoRollup merge of #104046 - RalfJung:run-miri-run, r=oli-obk
Michael Goulet [Thu, 10 Nov 2022 05:53:35 +0000 (21:53 -0800)]
Rollup merge of #104046 - RalfJung:run-miri-run, r=oli-obk

bootstrap: add support for running Miri on a file

This enables:
```
./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs
```
That can be super helpful for debugging.

Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri.

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

19 months agoRollup merge of #103675 - lyming2007:issue-103271-fix, r=fee1-dead
Michael Goulet [Thu, 10 Nov 2022 05:53:35 +0000 (21:53 -0800)]
Rollup merge of #103675 - lyming2007:issue-103271-fix, r=fee1-dead

remove redundent "<>" for ty::Slice with reference type

this fix #103271

19 months agoRollup merge of #103443 - mucinoab:recover-colon-as-path-separetor, r=compiler-errors
Michael Goulet [Thu, 10 Nov 2022 05:53:34 +0000 (21:53 -0800)]
Rollup merge of #103443 - mucinoab:recover-colon-as-path-separetor, r=compiler-errors

Parser: Recover from using colon as path separator in imports

I don't know if this is the right approach, any feedback is welcome.

r? ```@compiler-errors```

Fixes #103269

19 months agoRollup merge of #102763 - compiler-errors:nits, r=cjgillot
Michael Goulet [Thu, 10 Nov 2022 05:53:34 +0000 (21:53 -0800)]
Rollup merge of #102763 - compiler-errors:nits, r=cjgillot

Some diagnostic-related nits

1. Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder<'_, T>`
2. Make `diag.span_suggestions` take an `IntoIterator` instead of `Iterator`, just to remove some `.into_iter` calls on the caller.

idk if I should add a lint to make sure people use `&mut Diagnostic` instead of `&mut DiagnosticBuilder<'_, T>` in cases where we're just, e.g., adding subdiagnostics to the diagnostic... maybe a followup.

19 months agoUse const_error_with_guaranteed more
Michael Goulet [Thu, 10 Nov 2022 05:39:06 +0000 (05:39 +0000)]
Use const_error_with_guaranteed more

19 months agoAuto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, r=jackh276,davidtwco
bors [Thu, 10 Nov 2022 05:19:10 +0000 (05:19 +0000)]
Auto merge of #103636 - chenyukang:yukang/fix-103587-sugg-if-let, r=jackh276,davidtwco

Recover from common if let syntax mistakes/typos

Fixes #103587

19 months agoDon't ICE when encountering ConstKind::Error in RequiredConstsVisitor
Michael Goulet [Thu, 10 Nov 2022 05:12:53 +0000 (05:12 +0000)]
Don't ICE when encountering ConstKind::Error in RequiredConstsVisitor

19 months agoupdate mailmap
Ibraheem Ahmed [Thu, 10 Nov 2022 04:40:06 +0000 (23:40 -0500)]
update mailmap

19 months agobless a chalk test
Michael Goulet [Thu, 10 Nov 2022 04:36:45 +0000 (04:36 +0000)]
bless a chalk test

19 months agoUse TraitEngine in more places, make FulfillmentCtxt constructor more private
Michael Goulet [Wed, 2 Nov 2022 00:54:36 +0000 (00:54 +0000)]
Use TraitEngine in more places, make FulfillmentCtxt constructor more private

19 months agoAuto merge of #101990 - clubby789:dont-machine-apply-placeholder-method, r=compiler...
bors [Thu, 10 Nov 2022 02:05:38 +0000 (02:05 +0000)]
Auto merge of #101990 - clubby789:dont-machine-apply-placeholder-method, r=compiler-errors

Fix auto-application of associated generic functions with placeholders

Fixes #101920

19 months agoremove redundent "<>" for ty::Slice with reference type
Yiming Lei [Fri, 28 Oct 2022 05:38:59 +0000 (22:38 -0700)]
remove redundent "<>" for ty::Slice with reference type
this fix #103271

19 months agoAuto merge of #104215 - Manishearth:rollup-5r957ad, r=Manishearth
bors [Wed, 9 Nov 2022 23:19:55 +0000 (23:19 +0000)]
Auto merge of #104215 - Manishearth:rollup-5r957ad, r=Manishearth

Rollup of 9 pull requests

Successful merges:

 - #101005 (Migrate rustc_codegen_llvm to SessionDiagnostics)
 - #103307 (Add context to compiler error message)
 - #103464 (Add support for custom mir)
 - #103929 (Cleanup Apple-related code in rustc_target)
 - #104015 (Remove linuxkernel targets)
 - #104020 (Limit efiapi calling convention to supported arches)
 - #104156 (Cleanups in autoderef impl)
 - #104171 (Update books)
 - #104184 (Fix `rustdoc --version` when used with download-rustc)

Failed merges:

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

19 months agoRollup merge of #104184 - jyn514:rustdoc-version, r=davidtwco
Manish Goregaokar [Wed, 9 Nov 2022 20:39:07 +0000 (15:39 -0500)]
Rollup merge of #104184 - jyn514:rustdoc-version, r=davidtwco

Fix `rustdoc --version` when used with download-rustc

Previously, rustdoc would unconditionally report the version that *rustc* was compiled with. That showed things like `nightly-2022-10-30`, which wasn't right, since this was a `dev` build compiled from source.

Fix it by changing `rustc_driver::version` to a macro expanded at invocation time.

cc https://github.com/rust-lang/rust/issues/103206#issuecomment-1284123084

19 months agoRollup merge of #104171 - ehuss:update-books, r=ehuss
Manish Goregaokar [Wed, 9 Nov 2022 20:39:06 +0000 (15:39 -0500)]
Rollup merge of #104171 - ehuss:update-books, r=ehuss

Update books

## nomicon

1 commits in 9c73283775466d22208a0b28afcab44db4c0cc10..05532356e7a4dbea2330aabb77611f5179493bb8
2022-09-30 07:31:22 +0900 to 2022-11-05 08:13:14 +0900
- Fix typos and grammatical errors (rust-lang/nomicon#384)

## reference

1 commits in 4ea7c5def38ac81df33a9e48e5637a82a5ac404d..9f0cc13ffcd27c1fbe1ab766a9491e15ddcf4d19
2022-10-25 15:14:36 -0700 to 2022-10-31 04:09:16 -0700
- Add a comma (rust-lang/reference#1289)

## book

12 commits in aa5ee485bd6bd80d205da7c82fcdd776f92fdd51..3f64052c048c6def93b94a2b514ee88bba918744
2022-10-20 16:49:55 -0400 to 2022-11-03 22:13:58 -0400
- Upgrade to Rust 1.65
- Upgrade to Rust 1.64
- Upgrade to Rust 1.63
- New ideas for the issue template to try
- Clarify that the conditional expression is the one under discussion
- Updates from copyedit of ch6
- Made Option&lt;T&gt; error explanation more clear
- Update ch06-01-defining-an-enum
- Upgrade mdbook
- Clarify that user1 can't be used as a whole instance. Fixes rust-lang/book#2978.
- Fix plural and incorrect phrase. Fixes rust-lang/book#3359.
- Updates from copyedit of ch5

## rust-by-example

4 commits in 03491f33375c5a2a1661c7fa4be671fe95ce1249..2b15c0abf2bada6e00553814336bc3e2d8399097
2022-10-21 07:30:08 -0300 to 2022-10-31 08:30:13 -0300
- Remove --edition from src/crates/using_lib.md (rust-lang/rust-by-example#1635)
- upgrade upload-artifact
- Clarify Fn in fn/closures/input_parameters.md (rust-lang/rust-by-example#1634)
- fix: erroneous white spaces in types/cast.md

## rustc-dev-guide

12 commits in 51a37ad19a15709d0601afbac6581f5aea6a45da..d0dc6c97a6486f68bac782fff135086eae6d77ec
2022-10-25 10:18:58 -0700 to 2022-11-07 16:49:22 +0200
- trans -&gt; codegen
- Remove implementation details
- Update some more things and improve wording
- Update query.md
- replace tabs with spaces (rust-lang/rustc-dev-guide#1504)
- align code blocks with their paragraphs
- Fixes some typos (rust-lang/rustc-dev-guide#1502)
- UPDATE - mention of Diagnostic derive on enums
- trans -&gt; codegen (rust-lang/rustc-dev-guide#1500)
- add note for err annotation formatting
- Remove `--bless` from pre-push hook suggestion
- Update for highfive transition.

19 months agoRollup merge of #104156 - oli-obk:autoderef, r=estebank
Manish Goregaokar [Wed, 9 Nov 2022 20:39:06 +0000 (15:39 -0500)]
Rollup merge of #104156 - oli-obk:autoderef, r=estebank

Cleanups in autoderef impl

Just something I noticed. Turns out the `overloaded_span` is not actually used separately from the main span, so I merged them.

19 months agoRollup merge of #104020 - nicholasbishop:bishop-limit-efiapi, r=nagisa
Manish Goregaokar [Wed, 9 Nov 2022 20:39:05 +0000 (15:39 -0500)]
Rollup merge of #104020 - nicholasbishop:bishop-limit-efiapi, r=nagisa

Limit efiapi calling convention to supported arches

Supported architectures in UEFI are described here:
https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions

https://github.com/rust-lang/rust/issues/65815

19 months agoRollup merge of #104015 - alex:remove-kernel, r=oli-obk
Manish Goregaokar [Wed, 9 Nov 2022 20:39:05 +0000 (15:39 -0500)]
Rollup merge of #104015 - alex:remove-kernel, r=oli-obk

Remove linuxkernel targets

These are not used by the actual Rust-for-Linux project, so they're mostly just confusing.

19 months agoRollup merge of #103929 - BlackHoleFox:apple-targets-cleanup, r=petrochenkov
Manish Goregaokar [Wed, 9 Nov 2022 20:39:04 +0000 (15:39 -0500)]
Rollup merge of #103929 - BlackHoleFox:apple-targets-cleanup, r=petrochenkov

Cleanup Apple-related code in rustc_target

While working on https://github.com/rust-lang/rust/pull/103455, the consistency of the `rustc_target` code for Apple's platforms was "kind of bad." There were two "base" files (`apple_base.rs` and `apple_sdk_base.rs`) that the targets each pulled some parts out of, each and all of them were written slightly differently, and sometimes missed comments other implementations had.

So to hopefully make future maintenance, like implementing https://github.com/rust-lang/compiler-team/issues/556, easier, this makes all of them use similar patterns and the same target base logic everywhere instead of picking bits from both. This also has some other smaller upsides like less stringly-typed functions.

19 months agoRollup merge of #103464 - JakobDegen:mir-parsing, r=oli-obk
Manish Goregaokar [Wed, 9 Nov 2022 20:39:03 +0000 (15:39 -0500)]
Rollup merge of #103464 - JakobDegen:mir-parsing, r=oli-obk

Add support for custom mir

This implements rust-lang/compiler-team#564 . Details about the design, motivation, etc. can be found in there.

r? ```@oli-obk```

19 months agoRollup merge of #103307 - b4den:master, r=estebank
Manish Goregaokar [Wed, 9 Nov 2022 20:39:02 +0000 (15:39 -0500)]
Rollup merge of #103307 - b4den:master, r=estebank

Add context to compiler error message

Changed `creates a temporary which is freed while still in use` to `creates a temporary value which is freed while still in use`.

19 months agoRollup merge of #101005 - SLASHLogin:rustc_codegen_llvm_diagnostics, r=davidtwco
Manish Goregaokar [Wed, 9 Nov 2022 20:39:02 +0000 (15:39 -0500)]
Rollup merge of #101005 - SLASHLogin:rustc_codegen_llvm_diagnostics, r=davidtwco

Migrate rustc_codegen_llvm to SessionDiagnostics

WIP: Port current implementation of diagnostics to the new SessionDiagnostics.

Part of #100717

```@rustbot``` label +A-translation

19 months agoAuto merge of #104131 - notriddle:notriddle/flate2, r=Mark-Simulacrum
bors [Wed, 9 Nov 2022 20:25:28 +0000 (20:25 +0000)]
Auto merge of #104131 - notriddle:notriddle/flate2, r=Mark-Simulacrum

Update to latest version of flate2

19 months agoSuggest is_some or let when encountering Option and bool type mismatch
Michael Goulet [Sun, 6 Nov 2022 01:38:57 +0000 (01:38 +0000)]
Suggest is_some or let when encountering Option and bool type mismatch

19 months ago:arrow_up: rust-analyzer
Laurențiu Nicola [Wed, 9 Nov 2022 19:49:10 +0000 (21:49 +0200)]
:arrow_up: rust-analyzer

19 months agorebase conflict
Michael Goulet [Sat, 5 Nov 2022 18:29:47 +0000 (18:29 +0000)]
rebase conflict

19 months agoMake span_suggestions take IntoIterator
Michael Goulet [Fri, 7 Oct 2022 02:05:57 +0000 (02:05 +0000)]
Make span_suggestions take IntoIterator

19 months agoDiagnosticBuilder -> Diagnostic
Michael Goulet [Thu, 6 Oct 2022 21:39:37 +0000 (21:39 +0000)]
DiagnosticBuilder -> Diagnostic

19 months agoAuto merge of #104192 - Dylan-DPC:rollup-jjo1o80, r=Dylan-DPC
bors [Wed, 9 Nov 2022 16:54:02 +0000 (16:54 +0000)]
Auto merge of #104192 - Dylan-DPC:rollup-jjo1o80, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #103570 (Stabilize integer logarithms)
 - #103694 (Add documentation examples for `pointer::mask`)
 - #103919 (Unescaping cleanups)
 - #103933 (Promote {aarch64,i686,x86_64}-unknown-uefi to Tier 2)
 - #103952 (Don't intra linkcheck reference)
 - #104111 (rustdoc: Add mutable to the description)
 - #104125 (Const Compare for Tuples)

Failed merges:

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

19 months agoadd 'is_assign_rhs' to avoid weird suggesting 'let'
yukang [Wed, 9 Nov 2022 14:00:22 +0000 (22:00 +0800)]
add 'is_assign_rhs' to avoid weird suggesting 'let'

19 months agoUpdate to new browser-ui-test version
Guillaume Gomez [Wed, 9 Nov 2022 16:00:05 +0000 (17:00 +0100)]
Update to new browser-ui-test version

19 months agoAdd new option to prevent CORS failures
Guillaume Gomez [Tue, 8 Nov 2022 14:00:48 +0000 (15:00 +0100)]
Add new option to prevent CORS failures

19 months agoUpdate browser-ui-test version to 0.13.1
Guillaume Gomez [Tue, 8 Nov 2022 14:00:34 +0000 (15:00 +0100)]
Update browser-ui-test version to 0.13.1

19 months agoExtend crate-search div GUI tests
Guillaume Gomez [Mon, 7 Nov 2022 17:08:24 +0000 (18:08 +0100)]
Extend crate-search div GUI tests

19 months agoMigrate crate-search element to CSS variables
Guillaume Gomez [Mon, 7 Nov 2022 17:08:14 +0000 (18:08 +0100)]
Migrate crate-search element to CSS variables

19 months agodocs
Boxy [Wed, 9 Nov 2022 14:25:08 +0000 (14:25 +0000)]
docs

19 months agoAdd missing `emitted_at` to the `Diagnostic`
SLASHLogin [Wed, 9 Nov 2022 14:14:58 +0000 (15:14 +0100)]
Add missing `emitted_at` to the `Diagnostic`

19 months agoAdd constructor for `Diagnostic` that takes `Vec<(DiagnosticMessage, Style)>`
SLASHLogin [Wed, 9 Nov 2022 12:47:46 +0000 (13:47 +0100)]
Add constructor for `Diagnostic` that takes `Vec<(DiagnosticMessage, Style)>`

19 months agoUpdate compiler/rustc_codegen_llvm/src/back/archive.rs
SLASHLogin [Tue, 8 Nov 2022 19:32:09 +0000 (20:32 +0100)]
Update compiler/rustc_codegen_llvm/src/back/archive.rs

Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
19 months agoUse `LayoutError`'s implementation of `IntoDiagnostic`
SLASHLogin [Fri, 4 Nov 2022 19:08:01 +0000 (20:08 +0100)]
Use `LayoutError`'s implementation of `IntoDiagnostic`

19 months agoFormatting
SLASHLogin [Thu, 3 Nov 2022 12:41:54 +0000 (13:41 +0100)]
Formatting

19 months agoAdd `replace_args` method for `rustc_errors::diagnostic::Diagnostic`
SLASHLogin [Thu, 3 Nov 2022 12:09:25 +0000 (13:09 +0100)]
Add `replace_args` method for `rustc_errors::diagnostic::Diagnostic`

19 months agoDelay diagnostic translation in `rustc_codegen_ssa`
SLASHLogin [Wed, 2 Nov 2022 18:23:05 +0000 (19:23 +0100)]
Delay diagnostic translation in `rustc_codegen_ssa`

19 months agoSimplify existing Diagnostic implementations
SLASHLogin [Sun, 30 Oct 2022 18:26:12 +0000 (19:26 +0100)]
Simplify existing Diagnostic implementations

19 months agoPort diagnostics created by `Handler`
SLASHLogin [Sun, 30 Oct 2022 15:07:04 +0000 (16:07 +0100)]
Port diagnostics created by `Handler`

19 months agoFlatten diagnostic structs
SLASHLogin [Sun, 30 Oct 2022 13:33:27 +0000 (14:33 +0100)]
Flatten diagnostic structs

19 months agoCorrect tests to match errors
SLASHLogin [Tue, 30 Aug 2022 10:22:08 +0000 (12:22 +0200)]
Correct tests to match errors

19 months agoFix CI
SLASHLogin [Sat, 27 Aug 2022 08:05:50 +0000 (10:05 +0200)]
Fix CI
Add missing 'the' to the error en-US translation

19 months agoPort `MissingFeatures` and `TargetFeatureDisableOrEnable`
SLASHLogin [Fri, 26 Aug 2022 19:27:17 +0000 (21:27 +0200)]
Port `MissingFeatures` and `TargetFeatureDisableOrEnable`

19 months agoPort `UnknownArchiveKind`
SLASHLogin [Fri, 26 Aug 2022 17:42:29 +0000 (19:42 +0200)]
Port `UnknownArchiveKind`

19 months agoPort `DlltoolFailImportLibrary` and implement `IntoDiagnosticArg` for `Cow<'a, str>`
SLASHLogin [Fri, 26 Aug 2022 17:01:22 +0000 (19:01 +0200)]
Port `DlltoolFailImportLibrary` and implement `IntoDiagnosticArg` for `Cow<'a, str>`

19 months agoPort ErrorCallingDllTool
SLASHLogin [Fri, 26 Aug 2022 12:29:33 +0000 (14:29 +0200)]
Port ErrorCallingDllTool

19 months agoImport ErrorWritingDEFFile
SLASHLogin [Fri, 26 Aug 2022 12:17:15 +0000 (14:17 +0200)]
Import ErrorWritingDEFFile

19 months agoPort ArchiveBuildFailure
SLASHLogin [Fri, 26 Aug 2022 12:11:47 +0000 (14:11 +0200)]
Port ArchiveBuildFailure

19 months agoPort SanitizerMemtagRequiresMte
SLASHLogin [Fri, 26 Aug 2022 10:19:10 +0000 (12:19 +0200)]
Port SanitizerMemtagRequiresMte

19 months agoReuse SymbolAlreadyDefined
SLASHLogin [Fri, 26 Aug 2022 09:48:35 +0000 (11:48 +0200)]
Reuse SymbolAlreadyDefined

19 months agoPort LinkageConstOrMutType error
SLASHLogin [Fri, 26 Aug 2022 08:40:48 +0000 (10:40 +0200)]
Port LinkageConstOrMutType error

19 months agoPort InvalidMinimumAlignment
SLASHLogin [Fri, 26 Aug 2022 08:30:43 +0000 (10:30 +0200)]
Port InvalidMinimumAlignment

19 months agoPort layout size overflow
SLASHLogin [Fri, 26 Aug 2022 08:14:15 +0000 (10:14 +0200)]
Port layout size overflow

19 months agoFormatting
SLASHLogin [Thu, 25 Aug 2022 22:08:05 +0000 (00:08 +0200)]
Formatting

19 months agoPort branch protection on aarch64
SLASHLogin [Thu, 25 Aug 2022 22:03:53 +0000 (00:03 +0200)]
Port branch protection on aarch64

19 months agoFix diag() and formatting
SLASHLogin [Thu, 25 Aug 2022 21:47:11 +0000 (23:47 +0200)]
Fix diag() and formatting

19 months agoPort `symbol_already_defined` error
SLASHLogin [Thu, 25 Aug 2022 21:30:17 +0000 (23:30 +0200)]
Port `symbol_already_defined` error

19 months agoPort Instrument coverage requires llvm 12 to the new struct
SLASHLogin [Thu, 25 Aug 2022 21:08:18 +0000 (23:08 +0200)]
Port Instrument coverage requires llvm 12 to the new struct

19 months agoImport `error creating import library`
SLASHLogin [Thu, 25 Aug 2022 19:01:36 +0000 (21:01 +0200)]
Import `error creating import library`

19 months agoMissing lifetime parameter and formatting
SLASHLogin [Thu, 25 Aug 2022 17:23:55 +0000 (19:23 +0200)]
Missing lifetime parameter and formatting

19 months agoChange String in structs to &'a str
SLASHLogin [Thu, 25 Aug 2022 16:36:15 +0000 (18:36 +0200)]
Change String in structs to &'a str

19 months agoTrailing whitespaces
SLASHLogin [Thu, 25 Aug 2022 14:18:06 +0000 (16:18 +0200)]
Trailing whitespaces

19 months agolocales formatting
SLASHLogin [Thu, 25 Aug 2022 14:15:03 +0000 (16:15 +0200)]
locales formatting

19 months agoFormatting
SLASHLogin [Thu, 25 Aug 2022 13:42:20 +0000 (15:42 +0200)]
Formatting

19 months agoPort unknown feature diagnostic to the new framework
SLASHLogin [Thu, 25 Aug 2022 13:34:30 +0000 (15:34 +0200)]
Port unknown feature diagnostic to the new framework

19 months agoRollup merge of #104125 - ink-feather-org:const_cmp_tuples, r=fee1-dead
Dylan DPC [Wed, 9 Nov 2022 13:51:25 +0000 (19:21 +0530)]
Rollup merge of #104125 - ink-feather-org:const_cmp_tuples, r=fee1-dead

Const Compare for Tuples

Makes the impls for Tuples of ~const `PartialEq` types also `PartialEq`, impls for Tuples of ~const `PartialOrd` types also `PartialOrd`, for Tuples of ~const `Ord` types also `Ord`.

behind the `#![feature(const_cmp)]` gate.

~~Do not merge before #104113 is merged because I want to use this feature to clean up the new test that I added there.~~

r? ``@fee1-dead``

19 months agoRollup merge of #104111 - yancyribbens:add-mutable-to-the-description-for-as-simd...
Dylan DPC [Wed, 9 Nov 2022 13:51:24 +0000 (19:21 +0530)]
Rollup merge of #104111 - yancyribbens:add-mutable-to-the-description-for-as-simd-mut, r=scottmcm

rustdoc: Add mutable to the description

Add mutable the description to differentiate [as_simd](https://github.com/rust-lang/rust/blob/master/library/core/src/slice/mod.rs#L3654) from [as_simd_mut](https://github.com/rust-lang/rust/blob/master/library/core/src/slice/mod.rs#L3654).

19 months agoRollup merge of #103952 - ehuss:dont-intra-linkcheck-reference, r=Mark-Simulacrum
Dylan DPC [Wed, 9 Nov 2022 13:51:24 +0000 (19:21 +0530)]
Rollup merge of #103952 - ehuss:dont-intra-linkcheck-reference, r=Mark-Simulacrum

Don't intra linkcheck reference

This removes the reference from the intra-doc link checks. This causes problems if any of the reference content needs to change, it causes the linkchecker to break. The reference has its own broken link check (https://github.com/rust-lang/reference/tree/master/style-check) which uses pulldown-cmark on the source to find actual broken links (instead of false-positives like this regex does).

I think the intra-doc link check could potentially be removed completely, since I think rustdoc is now checking for them well enough. However, it may serve as a decent regression check.

19 months agoRollup merge of #103933 - nicholasbishop:bishop-uefi-tier-2, r=JohnTitor
Dylan DPC [Wed, 9 Nov 2022 13:51:23 +0000 (19:21 +0530)]
Rollup merge of #103933 - nicholasbishop:bishop-uefi-tier-2, r=JohnTitor

Promote {aarch64,i686,x86_64}-unknown-uefi to Tier 2

MCP: https://github.com/rust-lang/compiler-team/issues/555

CC `@dvdhrm`