]> git.lizzy.rs Git - rust.git/log
rust.git
17 months agoRollup merge of #106072 - eopb:dyn-derive, r=estebank
Matthias Krüger [Sun, 15 Jan 2023 00:01:36 +0000 (01:01 +0100)]
Rollup merge of #106072 - eopb:dyn-derive, r=estebank

fix: misleading "add dyn keyword before derive macro" suggestion

Fixes #106071

17 months agoAuto merge of #106866 - matthiaskrgr:rollup-r063s44, r=matthiaskrgr
bors [Sat, 14 Jan 2023 20:53:37 +0000 (20:53 +0000)]
Auto merge of #106866 - matthiaskrgr:rollup-r063s44, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #105526 (libcore: make result of iter::from_generator Clone)
 - #106563 (Fix `unused_braces` on generic const expr macro call)
 - #106661 (Stop probing for statx unless necessary)
 - #106820 (Deprioritize fulfillment errors that come from expansions.)
 - #106828 (rustdoc: remove `docblock` class from notable trait popover)
 - #106849 (Allocate one less vec while parsing arrays)
 - #106855 (rustdoc: few small cleanups)
 - #106860 (Remove various double spaces in the libraries.)

Failed merges:

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

17 months agoRollup merge of #106860 - anden3:doc-double-spaces, r=Dylan-DPC
Matthias Krüger [Sat, 14 Jan 2023 17:45:29 +0000 (18:45 +0100)]
Rollup merge of #106860 - anden3:doc-double-spaces, r=Dylan-DPC

Remove various double spaces in the libraries.

I was just pretty bothered by this when reading the source for a function, and was suggested to check if this happened elsewhere.

17 months agoRollup merge of #106855 - klensy:rd-s, r=notriddle
Matthias Krüger [Sat, 14 Jan 2023 17:45:28 +0000 (18:45 +0100)]
Rollup merge of #106855 - klensy:rd-s, r=notriddle

rustdoc: few small cleanups

17 months agoRollup merge of #106849 - WaffleLapkin:unvec, r=Nilstrieb
Matthias Krüger [Sat, 14 Jan 2023 17:45:28 +0000 (18:45 +0100)]
Rollup merge of #106849 - WaffleLapkin:unvec, r=Nilstrieb

Allocate one less vec while parsing arrays

Probably does not matter, but imo a little bit nicer.

17 months agoRollup merge of #106828 - notriddle:notriddle/notable-trait-docblock, r=GuillaumeGomez
Matthias Krüger [Sat, 14 Jan 2023 17:45:27 +0000 (18:45 +0100)]
Rollup merge of #106828 - notriddle:notriddle/notable-trait-docblock, r=GuillaumeGomez

rustdoc: remove `docblock` class from notable trait popover

This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes the `docblock` class from the All Items page, and 9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class from the item decl.

Fixes #92974

17 months agoRollup merge of #106820 - m-ou-se:macro-type-error-thing, r=estebank
Matthias Krüger [Sat, 14 Jan 2023 17:45:27 +0000 (18:45 +0100)]
Rollup merge of #106820 - m-ou-se:macro-type-error-thing, r=estebank

Deprioritize fulfillment errors that come from expansions.

Fixes (part of?) #69455

17 months agoRollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
Matthias Krüger [Sat, 14 Jan 2023 17:45:26 +0000 (18:45 +0100)]
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum

Stop probing for statx unless necessary

As is the current toy program:
fn main() -> std::io::Result<()> {
    use std::fs;

    let metadata = fs::metadata("foo.txt")?;

    assert!(!metadata.is_dir());
    Ok(())
}

... observed under strace will issue:
[snip]
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address) statx(AT_FDCWD, "foo.txt", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0

While statx is not necessarily always present, checking for it can be delayed to the first error condition. Said condition may very well never happen, in which case the check got avoided altogether.

Note this is still suboptimal as there still will be programs issuing it, but bulk of the problem is removed.

Tested by forbidding the syscall for the binary and observing it correctly falls back to newfstatat.

While here tidy up the commentary, in particular by denoting some problems with the current approach.

17 months agoRollup merge of #106563 - clubby789:gce-macro-braces, r=TaKO8Ki
Matthias Krüger [Sat, 14 Jan 2023 17:45:26 +0000 (18:45 +0100)]
Rollup merge of #106563 - clubby789:gce-macro-braces, r=TaKO8Ki

Fix `unused_braces` on generic const expr macro call

Fixes #106545

`@rustbot` label +A-const-generics +A-lint

17 months agoRollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm
Matthias Krüger [Sat, 14 Jan 2023 17:45:25 +0000 (18:45 +0100)]
Rollup merge of #105526 - Xiretza:iter-from-generator-derive, r=scottmcm

libcore: make result of iter::from_generator Clone

`@rustbot` label +A-generators

17 months agoAuto merge of #106696 - kylematsuda:early-binder, r=lcnr
bors [Sat, 14 Jan 2023 17:44:30 +0000 (17:44 +0000)]
Auto merge of #106696 - kylematsuda:early-binder, r=lcnr

Switch to `EarlyBinder` for `const_param_default` and `impl_trait_ref` queries

Part of the work to close #105779 and implement https://github.com/rust-lang/types-team/issues/78.

Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This PR adds `EarlyBinder` to the return type of  `const_param_default` and `impl_trait_ref`, and removes their `bound_X` variants.

r? `@lcnr`

17 months agoFix some missed double spaces.
André Vennberg [Sat, 14 Jan 2023 17:26:38 +0000 (18:26 +0100)]
Fix some missed double spaces.

17 months agoRemove various double spaces in source comments.
André Vennberg [Sat, 14 Jan 2023 15:33:11 +0000 (16:33 +0100)]
Remove various double spaces in source comments.

17 months agoFix `unused_braces` on generic const expr macro call
clubby789 [Sat, 7 Jan 2023 15:41:32 +0000 (15:41 +0000)]
Fix `unused_braces` on generic const expr macro call

17 months agoAuto merge of #106851 - matthiaskrgr:rollup-d9dz3yp, r=matthiaskrgr
bors [Sat, 14 Jan 2023 14:50:53 +0000 (14:50 +0000)]
Auto merge of #106851 - matthiaskrgr:rollup-d9dz3yp, r=matthiaskrgr

Rollup of 10 pull requests

Successful merges:

 - #106046 (Fix mir-opt tests for big-endian platforms)
 - #106470 (tidy: Don't include wasm32 in compiler dependency check)
 - #106566 (Emit a single error for contiguous sequences of unknown tokens)
 - #106644 (Update the wasi-libc used for the wasm32-wasi target)
 - #106665 (Add note when `FnPtr` vs. `FnDef` impl trait)
 - #106752 (Emit a hint for bad call return types due to generic arguments)
 - #106788 (Tweak E0599 and elaborate_predicates)
 - #106831 (Use GitHub yaml templates for ICE, Docs and Diagnostics tickets)
 - #106846 (Improve some comments and names in parser)
 - #106848 (Fix wrong path in triage bot autolabel for wg-trait-solver-refactor)

Failed merges:

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

17 months agoDeprioritize fulfillment errors that come from expansions.
Mara Bos [Fri, 13 Jan 2023 00:27:58 +0000 (01:27 +0100)]
Deprioritize fulfillment errors that come from expansions.

17 months agofix: misleading add `dyn` to derive macro suggestion
Ethan Brierley [Fri, 23 Dec 2022 00:13:47 +0000 (00:13 +0000)]
fix: misleading add `dyn` to derive macro suggestion

17 months agoRollup merge of #106848 - BoxyUwU:correct_triagebot_path, r=WaffleLapkin
Matthias Krüger [Sat, 14 Jan 2023 12:04:28 +0000 (13:04 +0100)]
Rollup merge of #106848 - BoxyUwU:correct_triagebot_path, r=WaffleLapkin

Fix wrong path in triage bot autolabel for wg-trait-solver-refactor

17 months agoRollup merge of #106846 - WaffleLapkin:pico_parse_ref, r=TaKO8Ki
Matthias Krüger [Sat, 14 Jan 2023 12:04:27 +0000 (13:04 +0100)]
Rollup merge of #106846 - WaffleLapkin:pico_parse_ref, r=TaKO8Ki

Improve some comments and names in parser

Just a tiny drive-by cleanup.

17 months agoRollup merge of #106831 - estebank:tickets_yaml, r=Mark-Simulacrum
Matthias Krüger [Sat, 14 Jan 2023 12:04:27 +0000 (13:04 +0100)]
Rollup merge of #106831 - estebank:tickets_yaml, r=Mark-Simulacrum

Use GitHub yaml templates for ICE, Docs and Diagnostics tickets

The GitHub yaml templates allow us to define HTML forms with validation for issue templates, instead of the current markdown based templates which only let us introduce text into the user editable text area. The form lets us make some fields mandatory, as well as add text that won't pollute the user's text and titles that won't be interfered with by enterprising users.

17 months agoRollup merge of #106788 - estebank:elaborate_pred_E0599, r=compiler-errors
Matthias Krüger [Sat, 14 Jan 2023 12:04:26 +0000 (13:04 +0100)]
Rollup merge of #106788 - estebank:elaborate_pred_E0599, r=compiler-errors

Tweak E0599 and elaborate_predicates

CC https://github.com/rust-lang/rust/issues/86377.

17 months agoRollup merge of #106752 - sulami:master, r=estebank
Matthias Krüger [Sat, 14 Jan 2023 12:04:26 +0000 (13:04 +0100)]
Rollup merge of #106752 - sulami:master, r=estebank

Emit a hint for bad call return types due to generic arguments

When the return type of a function call depends on the type of an argument, e.g.

```
fn foo<T>(x: T) -> T {
    x
}
```

and the expected type is set due to either an explicitly typed binding, or because the call to the function is in a tail position without semicolon, the current error implies that the argument in the call has the wrong type.

This new hint highlights that the expected type doesn't match the returned type, which matches the argument type, and that that's why we're flagging the argument type.

Fixes #43608.

17 months agoRollup merge of #106665 - JulianKnodt:better_fn_trait_note, r=cjgillot
Matthias Krüger [Sat, 14 Jan 2023 12:04:25 +0000 (13:04 +0100)]
Rollup merge of #106665 - JulianKnodt:better_fn_trait_note, r=cjgillot

Add note when `FnPtr` vs. `FnDef` impl trait

I encountered an instance where an `FnPtr` implemented a trait, but I was passing an `FnDef`. I was confused for an hour and to examine the source code of the trait's crate's tests in order to understand how to cast it properly (it didn't help that it was behind a reference). To the end user, it might not be immediately obvious that they are different and how to convert from an `FnDef` to an `FnPtr`, but it is necessary to cast to the generic function in order to compile. It is thus useful to suggest `as` in the help note, (even if the `Fn` output implements the trait).

17 months agoRollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
Matthias Krüger [Sat, 14 Jan 2023 12:04:25 +0000 (13:04 +0100)]
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper

Update the wasi-libc used for the wasm32-wasi target

This commit updates the wasi-libc revision used to build with the wasm32-wasi target. This notably pulls in WebAssembly/wasi-libc#377 which is needed to fix a use case I've been working on recently. This should be a relatively small update hopefully and is not expected to have any user impact.

17 months agoRollup merge of #106566 - clubby789:contiguous-weird-unicode, r=cjgillot
Matthias Krüger [Sat, 14 Jan 2023 12:04:24 +0000 (13:04 +0100)]
Rollup merge of #106566 - clubby789:contiguous-weird-unicode, r=cjgillot

Emit a single error for contiguous sequences of unknown tokens

Closes #106101

On encountering a sequence of identical source characters which are unknown tokens, note the amount of subsequent characters and advance past them silently. The old behavior was to emit an error and 'help' note for every single one.

`@rustbot` label +A-diagnostics +A-parser

17 months agoRollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum
Matthias Krüger [Sat, 14 Jan 2023 12:04:24 +0000 (13:04 +0100)]
Rollup merge of #106470 - ehuss:tidy-no-wasm, r=Mark-Simulacrum

tidy: Don't include wasm32 in compiler dependency check

This changes the tidy compiler dependency check so that it does not include wasm32-unknown-unknown dependencies in the PERMITTED_RUSTC_DEPENDENCIES. This just helps keep the list cleaner under the assumption that the compiler will never work on wasm32-unknown-unknown.

This also fixes a bug in the check to verify there are no unused dependencies in the PERMITTED_RUSTC_DEPENDENCIES. Previously the check was verifying that the dependency was used *anywhere* in the workspace, when it should have been checking if it was used for the compiler.

There's also just a little general cleanup here. For example, the old `normal_deps_of_r` function was changed a while ago to return *all* dependencies, but the function name and description wasn't updated to remove `normal_`.

17 months agoRollup merge of #106046 - uweigand:s390x-test-bigendian-mir, r=Mark-Simulacrum
Matthias Krüger [Sat, 14 Jan 2023 12:04:23 +0000 (13:04 +0100)]
Rollup merge of #106046 - uweigand:s390x-test-bigendian-mir, r=Mark-Simulacrum

Fix mir-opt tests for big-endian platforms

The test cases src/test/mir-opt/building/custom/consts.rs and src/test/mir-opt/const_prop/mutable_variable_no_prop.rs are currently failing on big-endian platforms as the binary encoding of some constants is hard-coded in the MIR test files.  Fix this by choosing constant values that have the same encoding on big- and little-endian platforms.

The test case src/test/mir-opt/issues/issue_75439.rs is failing as well, but since the purpose of the test is to validate handling of big-endian integer encodings on a little-endian platform, it does not make much sense to run it on big-endian platforms in the first place - we can just ignore it there.

Fixed part of https://github.com/rust-lang/rust/issues/105383.

17 months agoa
Boxy [Sat, 14 Jan 2023 11:44:37 +0000 (11:44 +0000)]
a

17 months agoAllocate one less vec in `parser/expr.rs`
Maybe Waffle [Sat, 14 Jan 2023 11:44:25 +0000 (11:44 +0000)]
Allocate one less vec in `parser/expr.rs`

17 months agoImprove comments in `parser/expr.rs`
Maybe Waffle [Sat, 14 Jan 2023 11:29:22 +0000 (11:29 +0000)]
Improve comments in `parser/expr.rs`

17 months agoMake `LhsExpr::AlreadyParsed` a named struct
Maybe Waffle [Sat, 14 Jan 2023 11:28:14 +0000 (11:28 +0000)]
Make `LhsExpr::AlreadyParsed` a named struct

17 months agoAdd note when `FnPtr` vs. `FnDef` impl trait
kadmin [Tue, 10 Jan 2023 06:08:18 +0000 (06:08 +0000)]
Add note when `FnPtr` vs. `FnDef` impl trait

I encountered an instance where an `FnPtr` implemented a trait, but I was passing an `FnDef`. To
the end user, there is really no way to differentiate each of them, but it is necessary to cast
to the generic function in order to compile. It is thus useful to suggest `as` in the help note,
(even if the Fn output implements the trait).

17 months agoAuto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
bors [Sat, 14 Jan 2023 08:33:09 +0000 (08:33 +0000)]
Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum

Fix aarch64-unknown-linux-gnu_ilp32 target

This was broken because the synthetic object files produced by rustc were for 64-bit AArch64, which caused link failures when combined with 32-bit ILP32 object files.

This PR updates the object crate to 0.30.1 which adds support for generating ILP32 AArch64 object files.

17 months agofix various subst_identity vs skip_binder
Kyle Matsuda [Wed, 11 Jan 2023 18:32:33 +0000 (11:32 -0700)]
fix  various subst_identity vs skip_binder

17 months agochange impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query...
Kyle Matsuda [Tue, 10 Jan 2023 21:57:22 +0000 (14:57 -0700)]
change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata

17 months agochange usages of impl_trait_ref to bound_impl_trait_ref
Kyle Matsuda [Tue, 10 Jan 2023 21:22:52 +0000 (14:22 -0700)]
change usages of impl_trait_ref to bound_impl_trait_ref

17 months agochange const_param_default query to return EarlyBinder; remove bound_const_param_defa...
Kyle Matsuda [Tue, 10 Jan 2023 19:27:41 +0000 (12:27 -0700)]
change const_param_default query to return EarlyBinder; remove bound_const_param_default query; add EarlyBinder to const_param_default in metadata

17 months agochange usages of const_param_default query to bound_const_param_default
Kyle Matsuda [Tue, 10 Jan 2023 19:20:15 +0000 (12:20 -0700)]
change usages of const_param_default query to bound_const_param_default

17 months agoadd EarlyBinder::subst_identity; impl ParameterizedOverTcx (needed for rustc_metadat...
Kyle Matsuda [Tue, 10 Jan 2023 18:53:35 +0000 (11:53 -0700)]
add EarlyBinder::subst_identity; impl  ParameterizedOverTcx (needed for rustc_metadata) and Value for EarlyBinder

17 months agoAuto merge of #106833 - JohnTitor:rollup-z8398jk, r=JohnTitor
bors [Sat, 14 Jan 2023 05:51:55 +0000 (05:51 +0000)]
Auto merge of #106833 - JohnTitor:rollup-z8398jk, r=JohnTitor

Rollup of 13 pull requests

Successful merges:

 - #104965 (reword Option::as_ref and Option::map examples)
 - #105172 (Added error documentation for write_fmt)
 - #106605 (rustdoc: fix outdated lint section of the book)
 - #106670 (Check compiler docs in PR CI)
 - #106692 (mv binary_heap.rs binary_heap/mod.rs)
 - #106693 (rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle)
 - #106707 (Remove duplicate sha-1 dependency)
 - #106762 (Add `AtomicPtr::as_mut_ptr`)
 - #106766 (Remove dead code in rustdoc stripper)
 - #106775 (Remove stale reference to the test suite location)
 - #106799 (Stop having unused lifetimes on some `impl`s)
 - #106816 (Update `rental` hack to work with remapped paths.)
 - #106819 (rustdoc: remove unnecessary DOM class `h1.fqn`)

Failed merges:

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

17 months agoAuto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrum
bors [Sat, 14 Jan 2023 03:04:40 +0000 (03:04 +0000)]
Auto merge of #106520 - ehuss:update-mdbook, r=Mark-Simulacrum

Update mdbook

This updates mdbook from 0.4.21 to 0.4.25. The list of changes is [here](https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0425). The only user-visible changes are some changes around the theme picker, and change to the copy-to-clipboard ignoring hidden lines.

Internally there were some dependency updates and small fixes.

This also updates `clap` from 4.0.15 to 4.0.32 whose changelog is [here](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#4032---2022-12-22). This impacts tools like cargo. I don't see anything particularly noteworthy there, though there are some small user-visible changes.

Unfortunately this required adding a hack for building `rustix` with a bootstrap tool. The comment explains why. I am unable to think of some other workaround (or even a cleaner way to set the rustflag). Ideas are welcome if you can think of alternatives. I'm struggling to even think of a long-term solution, other than asking projects not to do auto-nightly feature detection.

One medium-term solution is to avoid the clap dependency for the mdbook library (which is how rustix gets pulled in). That is one of my goals for the 0.5 release of mdbook, but that probably won't happen until later this year. It would also require dropping clap from `rustbook` and using some other means to parse arguments (there's only two options, so it can probably be done manually).

17 months agoRollup merge of #106819 - notriddle:notriddle/rm-h1-fqn, r=GuillaumeGomez
Yuki Okushi [Sat, 14 Jan 2023 03:04:37 +0000 (12:04 +0900)]
Rollup merge of #106819 - notriddle:notriddle/rm-h1-fqn, r=GuillaumeGomez

rustdoc: remove unnecessary DOM class `h1.fqn`

It's misleading. The main heading sometimes isn't an fully qualified name at all.

It's also redundant. It's always a child of `div.main-heading`, so just use that.

17 months agoRollup merge of #106816 - TimNN:rental-remap, r=oli-obj
Yuki Okushi [Sat, 14 Jan 2023 03:04:37 +0000 (12:04 +0900)]
Rollup merge of #106816 - TimNN:rental-remap, r=oli-obj

Update `rental` hack to work with remapped paths.

This PR simply switches to an already-existing helper instead of hard-coding a specific enum variant. The new revision of the test fails without the other changes in this PR.

Context: I'm exploring running UI tests with remapped paths by default in #105924 and the rental test was one of the ones that failed.

This may also be useful in the context of https://github.com/rust-lang/rfcs/pull/3127 ("New rustc and Cargo options to allow path sanitisation by default").

17 months agoRollup merge of #106799 - scottmcm:remove-unused-generics, r=cuviper
Yuki Okushi [Sat, 14 Jan 2023 03:04:36 +0000 (12:04 +0900)]
Rollup merge of #106799 - scottmcm:remove-unused-generics, r=cuviper

Stop having unused lifetimes on some `impl`s

See <https://doc.rust-lang.org/nightly/std/cmp/trait.PartialOrd.html#impl-PartialOrd%3COsStr%3E-for-PathBuf>, where these lifetimes show up even though they're not needed:
![image](https://user-images.githubusercontent.com/18526288/212257802-da275167-38f9-4e2c-aafc-d44f0fc6a7c6.png)

With this PR, the unneeded lifetimes are no longer there:
![image](https://user-images.githubusercontent.com/18526288/212257938-0097c4bf-1247-4c91-8445-5bf0dde1b501.png)

17 months agoRollup merge of #106775 - albertlarsan68:patch-1, r=Mark-Simulacrum
Yuki Okushi [Sat, 14 Jan 2023 03:04:36 +0000 (12:04 +0900)]
Rollup merge of #106775 - albertlarsan68:patch-1, r=Mark-Simulacrum

Remove stale reference to the test suite location

17 months agoRollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
Yuki Okushi [Sat, 14 Jan 2023 03:04:35 +0000 (12:04 +0900)]
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle

Remove dead code in rustdoc stripper

No changes when this code is removed.

cc `@aDotInTheVoid`
r? `@notriddle`

17 months agoRollup merge of #106762 - WaffleLapkin:atomicptr+as_mut_ptr, r=m-ou-se
Yuki Okushi [Sat, 14 Jan 2023 03:04:35 +0000 (12:04 +0900)]
Rollup merge of #106762 - WaffleLapkin:atomicptr+as_mut_ptr, r=m-ou-se

Add `AtomicPtr::as_mut_ptr`

See https://github.com/rust-lang/rust/issues/66893#issuecomment-720125447

r? thomcc

17 months agoRollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
Yuki Okushi [Sat, 14 Jan 2023 03:04:34 +0000 (12:04 +0900)]
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum

Remove duplicate sha-1 dependency

[`sha-1`](https://crates.io/crates/sha-1) is more or less a duplicate of [`sha1`](https://crates.io/crates/sha1). The `sha-1` is deprecated and no longer updated. This updates the dependencies to use the new name.

Some other dependencies that got updated as a consequence:
* The updated pest dependencies are currently only used by mdbook, and shouldn't have any issues.
* ucd-trie 0.1.3 to 0.1.5: No changelog, but looks like some tables were updated for new unicode versions: https://github.com/BurntSushi/ucd-generate/commits/master/ucd-trie. This is only used by pest (and thus mdbook).
* thiserror 1.33 to 1.38: Nothing significant in the notes at https://github.com/dtolnay/thiserror/releases.

17 months agoRollup merge of #106693 - notriddle:notriddle/toggle-trunc, r=GuillaumeGomez
Yuki Okushi [Sat, 14 Jan 2023 03:04:34 +0000 (12:04 +0900)]
Rollup merge of #106693 - notriddle:notriddle/toggle-trunc, r=GuillaumeGomez

rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle

This swaps things around so that the class that gets used more often has the shorter name.

17 months agoRollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
Yuki Okushi [Sat, 14 Jan 2023 03:04:33 +0000 (12:04 +0900)]
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum

mv binary_heap.rs binary_heap/mod.rs

I confess this request is somewhat selfish, as it's made in order to ease synchronisation with my [copse](https://crates.io/crates/copse) crate (see eggyal/copse#6 for explanation). I wholly understand that such grounds may be insufficient to justify merging this request—but no harm in asking, right?

17 months agoRollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
Yuki Okushi [Sat, 14 Jan 2023 03:04:33 +0000 (12:04 +0900)]
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum

Check compiler docs in PR CI

Fixes #106624

17 months agoRollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
Yuki Okushi [Sat, 14 Jan 2023 03:04:32 +0000 (12:04 +0900)]
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez

rustdoc: fix outdated lint section of the book

17 months agoRollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
Yuki Okushi [Sat, 14 Jan 2023 03:04:32 +0000 (12:04 +0900)]
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm

Added error documentation for write_fmt

This continuation of work at rust-lang#98861

17 months agoRollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
Yuki Okushi [Sat, 14 Jan 2023 03:04:31 +0000 (12:04 +0900)]
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm

reword Option::as_ref and Option::map examples

The description for the examples of `Option::as_ref` and `Option::map` imply that the example is only doing type conversion, when it is actually finding the length of a string.

Changes the wording to imply that some operation is being run on the value contained in the `Option`

closes #104476

17 months agoUse GitHub yaml templates for ICE, Docs and Diagnostics tickets
Esteban Küber [Sat, 14 Jan 2023 01:17:18 +0000 (01:17 +0000)]
Use GitHub yaml templates for ICE, Docs and Diagnostics tickets

17 months agoAuto merge of #106825 - weihanglo:update-cargo, r=weihanglo
bors [Sat, 14 Jan 2023 00:20:36 +0000 (00:20 +0000)]
Auto merge of #106825 - weihanglo:update-cargo, r=weihanglo

Update cargo

8 commits in d992ab4e9034930e7809749f04077045af8f4d79..1cd6d3803dfb0b342272862a8590f5dfc9f72573 2023-01-10 14:36:41 +0100 to 2023-01-12 18:40:36 +0000

- Fix for rust-lang/cargo#11555 (rust-lang/cargo#11568)
- chore: Fix typos (rust-lang/cargo#11561)
- fix(docs): fix typo learm =&gt; learn in cargo tree docs (rust-lang/cargo#11560)
- Add fix for CVE-2022-46176 (rust-lang/cargo#11556)
- Fix panic on target dependency errors. (rust-lang/cargo#11541)
- Fix some doc links (rust-lang/cargo#11538)
- Cargo by default saves credentials to `.cargo/credentials.toml` (rust-lang/cargo#11533)
- Fix a typo in the registries documentation. (rust-lang/cargo#11535)

17 months agorustdoc: remove `docblock` class from notable trait popover
Michael Howell [Fri, 13 Jan 2023 22:42:29 +0000 (15:42 -0700)]
rustdoc: remove `docblock` class from notable trait popover

This commit builds on b72de9be74dd5ac1d8b23d5ece03a7690274a14c, which removes
the `docblock` class from the All Items page, and
9457380ac902db3febf92077c5b645db55998ad4, which removes the `docblock` class
from the item decl.

Fixes #92974

17 months agoAuto merge of #106822 - matthiaskrgr:rollup-46bi4pi, r=matthiaskrgr
bors [Fri, 13 Jan 2023 21:25:50 +0000 (21:25 +0000)]
Auto merge of #106822 - matthiaskrgr:rollup-46bi4pi, r=matthiaskrgr

Rollup of 10 pull requests

Successful merges:

 - #104645 (Add log-backtrace option to show backtraces along with logging)
 - #106465 (Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow)
 - #106489 (Fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang))
 - #106585 (When suggesting writing a fully qualified path probe for appropriate types)
 - #106641 (Provide help on closures capturing self causing borrow checker errors)
 - #106678 (Warn when using panic-strategy abort for proc-macro crates)
 - #106701 (Fix `mpsc::SyncSender` spinning behavior)
 - #106793 (Normalize test output more thoroughly)
 - #106797 (riscv: Fix ELF header flags)
 - #106813 (Remove redundant session field)

Failed merges:

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

17 months agoUpdate the wasi-libc used for the wasm32-wasi target
Alex Crichton [Mon, 9 Jan 2023 17:00:09 +0000 (09:00 -0800)]
Update the wasi-libc used for the wasm32-wasi target

This commit updates the wasi-libc revision used to build with the
wasm32-wasi target. This notably pulls in WebAssembly/wasi-libc#377
which is needed to fix a use case I've been working on recently. This
should be a relatively small update hopefully and is not expected to
have any user impact.

17 months agoDo not incorrectly suggest restricting implied bounds
Esteban Küber [Fri, 13 Jan 2023 20:50:34 +0000 (20:50 +0000)]
Do not incorrectly suggest restricting implied bounds

When we have already suggested bounds that imply the about to be
suggested bound, skip them.

17 months agoUpdate `rental` hack to work with remapped paths.
Tim Neumann [Fri, 6 Jan 2023 10:37:53 +0000 (10:37 +0000)]
Update `rental` hack to work with remapped paths.

17 months agoUpdate cargo
Weihang Lo [Fri, 13 Jan 2023 19:59:28 +0000 (19:59 +0000)]
Update cargo

8 commits in d992ab4e9034930e7809749f04077045af8f4d79..1cd6d3803dfb0b342272862a8590f5dfc9f72573
2023-01-10 14:36:41 +0100 to 2023-01-12 18:40:36 +0000

- Fix for rust-lang/cargo#11555 (rust-lang/cargo#11568)
- chore: Fix typos (rust-lang/cargo#11561)
- fix(docs): fix typo learm =&gt; learn in cargo tree docs (rust-lang/cargo#11560)
- Add fix for CVE-2022-46176 (rust-lang/cargo#11556)
- Fix panic on target dependency errors. (rust-lang/cargo#11541)
- Fix some doc links (rust-lang/cargo#11538)
- Cargo by default saves credentials to `.cargo/credentials.toml` (rust-lang/cargo#11533)
- Fix a typo in the registries documentation. (rust-lang/cargo#11535)

17 months agorustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle
Michael Howell [Tue, 10 Jan 2023 18:35:37 +0000 (11:35 -0700)]
rustdoc: rename CSS rustdoc-toggle -> toggle and toggle -> settings-toggle

This swaps things around so that the class that gets used more often has
the shorter name.

17 months agoAdd tests
Esteban Küber [Thu, 12 Jan 2023 21:48:07 +0000 (21:48 +0000)]
Add tests

17 months agoKeep obligation chain when elaborating obligations
Esteban Küber [Thu, 12 Jan 2023 21:32:06 +0000 (21:32 +0000)]
Keep obligation chain when elaborating obligations

17 months agoElaborate unmet obligations in E0599 for more context
Esteban Küber [Thu, 12 Jan 2023 19:53:01 +0000 (19:53 +0000)]
Elaborate unmet obligations in E0599 for more context

17 months agoRollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petrochenkov
Matthias Krüger [Fri, 13 Jan 2023 18:16:45 +0000 (19:16 +0100)]
Rollup merge of #106813 - oli-obk:sess_cleanup, r=GuillaumeGomez,petrochenkov

Remove redundant session field

There was already a session available in the resolver, so we access that session.

17 months agoRollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
Matthias Krüger [Fri, 13 Jan 2023 18:16:45 +0000 (19:16 +0100)]
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3

riscv: Fix ELF header flags

The previous version added both `EF_RISCV_FLOAT_ABI_DOUBLE` and `EF_RISCV_RVC` if the "D" extension was enabled on riscv64 targets. riscv32 targets were not accounted for. This patch changes this so that:

- Only add `EF_RISCV_RVC` if the "C" extension is enabled
- Add `EF_RISCV_FLOAT_ABI_SINGLE` if the "F" extension is enabled and the "D" extension is not
- Add these ELF flags for riscv32 as well

Fixes #104284

r? rust-lang/risc-v

17 months agoRollup merge of #106793 - Mark-Simulacrum:normalize-test, r=compiler-errors
Matthias Krüger [Fri, 13 Jan 2023 18:16:44 +0000 (19:16 +0100)]
Rollup merge of #106793 - Mark-Simulacrum:normalize-test, r=compiler-errors

Normalize test output more thoroughly

This prevents differences in local environments, which may (for example) end up with a longer backtrace with more digits in the backtrace prefix, as happened to me. While we're at it, clean more of the output up, including the exact location of the error in the compiler.

cc https://github.com/rust-lang/rust/pull/106521 which introduced this test

17 months agoRollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
Matthias Krüger [Fri, 13 Jan 2023 18:16:44 +0000 (19:16 +0100)]
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu

Fix `mpsc::SyncSender` spinning behavior

Resolves https://github.com/rust-lang/rust/issues/106668.

17 months agoRollup merge of #106678 - Veykril:proc-macro-panic-abort, r=eholk
Matthias Krüger [Fri, 13 Jan 2023 18:16:43 +0000 (19:16 +0100)]
Rollup merge of #106678 - Veykril:proc-macro-panic-abort, r=eholk

Warn when using panic-strategy abort for proc-macro crates

See https://github.com/rust-lang/rust/issues/82320, this simply warns for now as that seems like the best step that can be immediately taken (opposed to straight up rejecting or ignoring)

17 months agoRollup merge of #106641 - chenyukang:yukang/fix-105761-segguest-this, r=estebank
Matthias Krüger [Fri, 13 Jan 2023 18:16:43 +0000 (19:16 +0100)]
Rollup merge of #106641 - chenyukang:yukang/fix-105761-segguest-this, r=estebank

Provide help on closures capturing self causing borrow checker errors

Fixes #105761

r? ````@estebank````

17 months agoRollup merge of #106585 - estebank:issue-46585, r=compiler-errors
Matthias Krüger [Fri, 13 Jan 2023 18:16:42 +0000 (19:16 +0100)]
Rollup merge of #106585 - estebank:issue-46585, r=compiler-errors

When suggesting writing a fully qualified path probe for appropriate types

Address the more common part of #46585.

17 months agoRollup merge of #106489 - jschwe:fix_linker_detection, r=petrochenkov
Matthias Krüger [Fri, 13 Jan 2023 18:16:42 +0000 (19:16 +0100)]
Rollup merge of #106489 - jschwe:fix_linker_detection, r=petrochenkov

Fix linker detection for linker (drivers) with a version postfix (e.g. clang-12 instead of clang)

Linker (drivers) such as clang / gcc or lld often have a version postfix matching the regex "-\d+$".
Previously, linker detection did not account for the possible version postfix and the fallback value was used, which can cause linker errors due to wrong arguments.
Also remove the check for `-clang`, since there are no architecture specific variants of clang (to my knowledge).

Fixes #106454

17 months agoRollup merge of #106465 - compiler-errors:bump-IMPLIED_BOUNDS_ENTAILMENT, r=lcnr
Matthias Krüger [Fri, 13 Jan 2023 18:16:41 +0000 (19:16 +0100)]
Rollup merge of #106465 - compiler-errors:bump-IMPLIED_BOUNDS_ENTAILMENT, r=lcnr

Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow

https://github.com/rust-lang/rust/pull/105575#issuecomment-1357201969

> and then later in the same cycle increase the lint to `deny` and change it to `FutureCompatReportNow` in this nightly cycle.

r? ```@lcnr``` when they're back from holiday :smile:

17 months agoRollup merge of #104645 - yukiomoto:log-backtrace-option, r=oli-obk
Matthias Krüger [Fri, 13 Jan 2023 18:16:41 +0000 (19:16 +0100)]
Rollup merge of #104645 - yukiomoto:log-backtrace-option, r=oli-obk

Add log-backtrace option to show backtraces along with logging

according to #90698, I added a compiler option, `-Zlog-backtrace=filter`, where `filter` is a module name, to show backtraces for logging without rebuilding.

resolve #90698

17 months agorustdoc: remove unnecessary DOM class `h1.fqn`
Michael Howell [Fri, 13 Jan 2023 17:09:25 +0000 (10:09 -0700)]
rustdoc: remove unnecessary DOM class `h1.fqn`

It's misleading. The main heading sometimes isn't an fully qualified name at all.

It's also redundant. It's always a child of `div.main-heading`, so just use that.

17 months agoImprove linker-flavor detection
Jonathan Schwender [Thu, 5 Jan 2023 13:14:23 +0000 (14:14 +0100)]
Improve linker-flavor detection

Linker drivers such as gcc, clang or lld often have a version postfix,
e.g clang-12. The previous logic would not account for this and would
fall back to guessing the linker flavor to be the default linker flavor
for the target, which causes linker errors when this is not the case.
By accounting for the possible version postfix and also considering
g++ and clang++, we considerably reduce the amount of times the
fallback guess has to be used.

To simplify matching check for a version postfix and match against the
linker stem without any version postfix.
In contrast to gcc, clang supports all architectures in one binary.
This means there are no variants like `aarch64-linux-gnu-clang` and
there is no need to check for `-clang` variants.

17 months agoRemove redundant session field
Oli Scherer [Thu, 8 Dec 2022 09:39:48 +0000 (09:39 +0000)]
Remove redundant session field

17 months agoCrateData: don't allocate String when Serialize, &str is enough
klensy [Fri, 13 Jan 2023 15:27:30 +0000 (18:27 +0300)]
CrateData: don't allocate String when Serialize, &str is enough

17 months agoPlayground.crate_name String -> Symbol
klensy [Fri, 13 Jan 2023 15:05:16 +0000 (18:05 +0300)]
Playground.crate_name String -> Symbol

17 months agofmt_type: don't alloc const String, use &str instead
klensy [Fri, 13 Jan 2023 14:54:16 +0000 (17:54 +0300)]
fmt_type: don't alloc const String, use &str instead

17 months agogenerate_macro_def_id_path: don't eagerly stringify Symbols
klensy [Fri, 13 Jan 2023 14:33:07 +0000 (17:33 +0300)]
generate_macro_def_id_path: don't eagerly stringify Symbols

17 months agoAuto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillot
bors [Fri, 13 Jan 2023 13:57:21 +0000 (13:57 +0000)]
Auto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillot

Feed a bunch of queries instead of tracking fields on TyCtxt

r? `@cjgillot`

pulled out of https://github.com/rust-lang/rust/pull/105462

17 months agoIndexItem.name String -> Symbol
klensy [Fri, 13 Jan 2023 12:39:16 +0000 (15:39 +0300)]
IndexItem.name String -> Symbol

17 months agoevade clones
klensy [Thu, 12 Jan 2023 16:47:53 +0000 (19:47 +0300)]
evade clones

17 months agoRemove stale reference to the test suite location
Albert Larsan [Thu, 12 Jan 2023 16:17:20 +0000 (17:17 +0100)]
Remove stale reference to the test suite location

17 months agoAuto merge of #106801 - JohnTitor:rollup-xqkraw0, r=JohnTitor
bors [Fri, 13 Jan 2023 10:56:53 +0000 (10:56 +0000)]
Auto merge of #106801 - JohnTitor:rollup-xqkraw0, r=JohnTitor

Rollup of 6 pull requests

Successful merges:

 - #106608 (Render missing generics suggestion verbosely)
 - #106716 ([RFC 2397] Deny incorrect locations)
 - #106754 (Rename `Ty::is_ty_infer` -> `Ty::is_ty_or_numeric_infer`)
 - #106782 (Ignore tests move in git blame)
 - #106785 (Make blame spans better for impl wfcheck)
 - #106791 (Fix ICE formatting)

Failed merges:

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

17 months agoWarn when using panic-strategy abort for proc-macro crates
Lukas Wirth [Tue, 10 Jan 2023 12:57:42 +0000 (13:57 +0100)]
Warn when using panic-strategy abort for proc-macro crates

17 months agoRollup merge of #106791 - estebank:fix-ice, r=compiler-errors
Yuki Okushi [Fri, 13 Jan 2023 07:54:25 +0000 (16:54 +0900)]
Rollup merge of #106791 - estebank:fix-ice, r=compiler-errors

Fix ICE formatting

17 months agoRollup merge of #106785 - compiler-errors:better-impl-wf-spans, r=estebank
Yuki Okushi [Fri, 13 Jan 2023 07:54:24 +0000 (16:54 +0900)]
Rollup merge of #106785 - compiler-errors:better-impl-wf-spans, r=estebank

Make blame spans better for impl wfcheck

r? types

17 months agoRollup merge of #106782 - albertlarsan68:ignore-test-move-in-blame, r=Nilstrieb
Yuki Okushi [Fri, 13 Jan 2023 07:54:24 +0000 (16:54 +0900)]
Rollup merge of #106782 - albertlarsan68:ignore-test-move-in-blame, r=Nilstrieb

Ignore tests move in git blame

This commit is not relevant in the history, but may clobber the git blame output.

17 months agoRollup merge of #106754 - compiler-errors:ty-infer-method-is-confusing, r=lcnr
Yuki Okushi [Fri, 13 Jan 2023 07:54:23 +0000 (16:54 +0900)]
Rollup merge of #106754 - compiler-errors:ty-infer-method-is-confusing, r=lcnr

Rename `Ty::is_ty_infer` -> `Ty::is_ty_or_numeric_infer`

Makes sure people are aware that they may have a type variable *or* an int/float variable.

r? `@oli-obk` https://github.com/rust-lang/rust/pull/106322#issuecomment-1376913539 but I could instead implement your solution, let me know.

(This will conflict with #106322 for now, ignore that :smile:)

17 months agoRollup merge of #106716 - c410-f3r:rfc-2397-1, r=davidtwco
Yuki Okushi [Fri, 13 Jan 2023 07:54:23 +0000 (16:54 +0900)]
Rollup merge of #106716 - c410-f3r:rfc-2397-1, r=davidtwco

[RFC 2397] Deny incorrect locations

cc #51992

As declared in the RFC, `#[do_not_recommend]` should only be applicable on trait implementations.

17 months agoRollup merge of #106608 - compiler-errors:missing-generics-verbose, r=estebank
Yuki Okushi [Fri, 13 Jan 2023 07:54:22 +0000 (16:54 +0900)]
Rollup merge of #106608 - compiler-errors:missing-generics-verbose, r=estebank

Render missing generics suggestion verbosely

It's a bit easier to read like this, especially ones that are appending new generics onto an existing list, like ": `, T`" which render somewhat poorly inline.

Also don't suggest `dyn` as a type parameter to add, even if technically that's valid in edition 2015.

17 months agoAuto merge of #106092 - asquared31415:start_lang_item_checks, r=davidtwco
bors [Fri, 13 Jan 2023 07:45:34 +0000 (07:45 +0000)]
Auto merge of #106092 - asquared31415:start_lang_item_checks, r=davidtwco

Add checks for the signature of the `start` lang item

Closes #105963

17 months agoStop having unused lifetimes on some `impl`s
Scott McMurray [Fri, 13 Jan 2023 06:55:58 +0000 (22:55 -0800)]
Stop having unused lifetimes on some `impl`s

17 months agoIgnore tests move in git blame
Albert Larsan [Thu, 12 Jan 2023 18:20:51 +0000 (18:20 +0000)]
Ignore tests move in git blame

17 months agoriscv: Fix ELF header flags
Fawaz [Mon, 9 Jan 2023 08:17:58 +0000 (00:17 -0800)]
riscv: Fix ELF header flags

The previous version added both `EF_RISCV_FLOAT_ABI_DOUBLE` and
`EF_RISCV_RVC` if the "D" extension was enabled on riscv64 targets.
riscv32 targets were not accounted for. This patch changes this
so that:

- Only add `EF_RISCV_RVC` if the "C" extension is enabled
- Add `EF_RISCV_FLOAT_ABI_SINGLE` if the "F" extension is enabled
  and the "D" extension is not
- Add these ELF flags for riscv32 as well

17 months agoAuto merge of #106004 - fee1-dead-contrib:const-closures, r=oli-obk
bors [Fri, 13 Jan 2023 05:04:48 +0000 (05:04 +0000)]
Auto merge of #106004 - fee1-dead-contrib:const-closures, r=oli-obk

Const closures

cc https://github.com/rust-lang/rust/issues/106003