]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoAuto merge of #94802 - matthiaskrgr:rollup-4plu0fi, r=matthiaskrgr
bors [Thu, 10 Mar 2022 12:32:01 +0000 (12:32 +0000)]
Auto merge of #94802 - matthiaskrgr:rollup-4plu0fi, r=matthiaskrgr

Rollup of 5 pull requests

Successful merges:

 - #92150 (Improve suggestion when casting usize to (possibly) wide pointer)
 - #94635 (Merge `#[deprecated]` and `#[rustc_deprecated]`)
 - #94657 (Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`)
 - #94746 (diagnostics: use rustc_on_unimplemented to recommend `[].iter()`)
 - #94788 (Account for suggestions for complete removal of lines)

Failed merges:

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

2 years agoRollup merge of #94788 - estebank:removal-suggestion, r=petrochenkov
Matthias Krüger [Thu, 10 Mar 2022 11:20:54 +0000 (12:20 +0100)]
Rollup merge of #94788 - estebank:removal-suggestion, r=petrochenkov

Account for suggestions for complete removal of lines

Fix  #94192.

2 years agoRollup merge of #94746 - notriddle:notriddle/method-rustc-on-unimplemented, r=davidtwco
Matthias Krüger [Thu, 10 Mar 2022 11:20:53 +0000 (12:20 +0100)]
Rollup merge of #94746 - notriddle:notriddle/method-rustc-on-unimplemented, r=davidtwco

diagnostics: use rustc_on_unimplemented to recommend `[].iter()`

To make this work, the `#[rustc_on_unimplemented]` data needs to be used to
report method resolution errors, which is most of what this commit does.

Fixes #94581

2 years agoRollup merge of #94657 - fee1-dead:const_slice_index, r=oli-obk
Matthias Krüger [Thu, 10 Mar 2022 11:20:52 +0000 (12:20 +0100)]
Rollup merge of #94657 - fee1-dead:const_slice_index, r=oli-obk

Constify `Index{,Mut}` for `[T]`, `str`, and `[T; N]`

Several panic functions were rewired (via `const_eval_select`) to simpler implementations that do not require formatting for compile-time usage.

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

2 years agoRollup merge of #94635 - jhpratt:merge-deprecated-attrs, r=davidtwco
Matthias Krüger [Thu, 10 Mar 2022 11:20:51 +0000 (12:20 +0100)]
Rollup merge of #94635 - jhpratt:merge-deprecated-attrs, r=davidtwco

Merge `#[deprecated]` and `#[rustc_deprecated]`

The first commit makes "reason" an alias for "note" in `#[rustc_deprecated]`, while still prohibiting it in `#[deprecated]`.

The second commit changes "suggestion" to not just be a feature of `#[rustc_deprecated]`. This is placed behind the new `deprecated_suggestion` feature. This needs a tracking issue; let me know if this PR will be approved and I can create one.

The third commit is what permits `#[deprecated]` to be used when `#![feature(staged_api)]` is enabled. This isn't yet used in stdlib (only tests), as it would require duplicating all deprecation attributes until a bootstrap occurs. I intend to submit a follow-up PR that replaces all uses and removes the remaining `#[rustc_deprecated]` code after the next bootstrap.

`@rustbot` label +T-libs-api +C-feature-request +A-attributes +S-waiting-on-review

2 years agoRollup merge of #92150 - compiler-errors:better_usize_to_wide_ptr_cast, r=petrochenkov
Matthias Krüger [Thu, 10 Mar 2022 11:20:50 +0000 (12:20 +0100)]
Rollup merge of #92150 - compiler-errors:better_usize_to_wide_ptr_cast, r=petrochenkov

Improve suggestion when casting usize to (possibly) wide pointer

I thought #92125 was a wonderful idea, so I went ahead and took a stab at it. Not sure if my approach is the best going forward, but I'm happy with the improvement in the error message.

Iwill definitely address any changes if people are more opinionated with the wordings or want more features.

Also, do I need to add a new error code?

(Fixes #92125)

2 years agoAuto merge of #94764 - nikic:update-llvm-3, r=nagisa
bors [Thu, 10 Mar 2022 08:56:02 +0000 (08:56 +0000)]
Auto merge of #94764 - nikic:update-llvm-3, r=nagisa

Update LLVM submodule

This merges upstream changes from the 14.x release branch.

Fixes #89609.
Fixes #93923.
Fixes #94032.

2 years agoAuto merge of #94059 - b-naber:constantkind-val-transformation, r=lcnr
bors [Thu, 10 Mar 2022 05:53:59 +0000 (05:53 +0000)]
Auto merge of #94059 - b-naber:constantkind-val-transformation, r=lcnr

Treat constant values as mir::ConstantKind::Val

Another step that is necessary for the introduction of Valtrees: we don't want to treat `ty::Const` instances of kind `ty::ConstKind::Value` as `mir::ConstantKind::Ty` anymore.

r? `@oli-obk`

2 years agoAuto merge of #94787 - matthiaskrgr:rollup-yyou15f, r=matthiaskrgr
bors [Thu, 10 Mar 2022 02:38:43 +0000 (02:38 +0000)]
Auto merge of #94787 - matthiaskrgr:rollup-yyou15f, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #91804 (Make some `Clone` impls `const`)
 - #92541 (Mention intent of `From` trait in its docs)
 - #93057 (Add Iterator::collect_into)
 - #94739 (Suggest `if let`/`let_else` for refutable pat in `let`)
 - #94754 (Warn users about `||` in let chain expressions)
 - #94763 (Add documentation about lifetimes to thread::scope.)
 - #94768 (Ignore `close_read_wakes_up` test on SGX platform)
 - #94772 (Add miri to the well known conditional compilation names and values)

Failed merges:

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

2 years agoAuto merge of #94737 - lcnr:pass-stuff-by-value, r=davidtwco
bors [Thu, 10 Mar 2022 00:15:39 +0000 (00:15 +0000)]
Auto merge of #94737 - lcnr:pass-stuff-by-value, r=davidtwco

add `#[rustc_pass_by_value]` to more types

the only interesting changes here should be to `TransitiveRelation`, but I believe to be highly unlikely that we will ever use a non `Copy` type with this type.

2 years agoAccount for suggestions for complete removal of lines
Esteban Kuber [Wed, 9 Mar 2022 22:47:00 +0000 (22:47 +0000)]
Account for suggestions for complete removal of lines

Fix  #94192.

2 years agobetter suggestion for int to wide ptr cast
Michael Goulet [Wed, 9 Mar 2022 23:24:14 +0000 (15:24 -0800)]
better suggestion for int to wide ptr cast

2 years agoRollup merge of #94772 - Urgau:check-cfg-miri, r=petrochenkov
Matthias Krüger [Wed, 9 Mar 2022 22:14:16 +0000 (23:14 +0100)]
Rollup merge of #94772 - Urgau:check-cfg-miri, r=petrochenkov

Add miri to the well known conditional compilation names and values

This pull request adds `miri` to the list of well known names and values of the conditional compilation checking (`--check-cfg`).

This was brought up in [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/RFC.203013.3A.20Checking.20conditional.20compilation.20at.20compile.20time/near/274513827) when discussing about the future of `--check-cfg`.

r? ``@petrochenkov``

2 years agoRollup merge of #94768 - fortanix:raoul/fix_close_read_wakes_up_test_sgx_platform...
Matthias Krüger [Wed, 9 Mar 2022 22:14:15 +0000 (23:14 +0100)]
Rollup merge of #94768 - fortanix:raoul/fix_close_read_wakes_up_test_sgx_platform, r=dtolnay

Ignore `close_read_wakes_up` test on SGX platform

PR #94714 enabled the `close_read_wakes_up` test for all platforms. This is incorrect. This test should be ignored at least for the SGX platform.

cc: ``@mzohreva`` ``@jethrogb``

2 years agoRollup merge of #94763 - m-ou-se:scoped-threads-lifetime-docs, r=Mark-Simulacrum
Matthias Krüger [Wed, 9 Mar 2022 22:14:14 +0000 (23:14 +0100)]
Rollup merge of #94763 - m-ou-se:scoped-threads-lifetime-docs, r=Mark-Simulacrum

Add documentation about lifetimes to thread::scope.

This resolves the last unresolved question of https://github.com/rust-lang/rust/issues/93203

This was brought up in https://github.com/rust-lang/rust/pull/94559#discussion_r820872694

r? `````@Mark-Simulacrum`````

2 years agoRollup merge of #94754 - c410-f3r:nice-error, r=lcnr
Matthias Krüger [Wed, 9 Mar 2022 22:14:13 +0000 (23:14 +0100)]
Rollup merge of #94754 - c410-f3r:nice-error, r=lcnr

Warn users about `||` in let chain expressions

Or more specifically, warn that `||` operators are forbidden.

This PR is simple so I guess anyone can review 🤷

cc #53667
cc ``@matthewjasper``

2 years agoRollup merge of #94739 - estebank:suggest-let-else, r=oli-obk
Matthias Krüger [Wed, 9 Mar 2022 22:14:11 +0000 (23:14 +0100)]
Rollup merge of #94739 - estebank:suggest-let-else, r=oli-obk

Suggest `if let`/`let_else` for refutable pat in `let`

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

2 years agoRollup merge of #93057 - frengor:iter_collect_into, r=m-ou-se
Matthias Krüger [Wed, 9 Mar 2022 22:14:11 +0000 (23:14 +0100)]
Rollup merge of #93057 - frengor:iter_collect_into, r=m-ou-se

Add Iterator::collect_into

This PR adds `Iterator::collect_into` as proposed by ``@cormacrelf`` in #48597 (see https://github.com/rust-lang/rust/pull/48597#issuecomment-842083688).
Followup of #92982.

This adds the following method to the Iterator trait:

```rust
fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut E
```

2 years agoRollup merge of #92541 - asquared31415:from-docs, r=m-ou-se
Matthias Krüger [Wed, 9 Mar 2022 22:14:10 +0000 (23:14 +0100)]
Rollup merge of #92541 - asquared31415:from-docs, r=m-ou-se

Mention intent of `From` trait in its docs

This pr is a docs modification to add to the documentation of the `From` trait a note about its intent as a perfect conversion.  This is already stated in the `TryFrom` docs so this is simply adding that information in a more visible way.

2 years agoRollup merge of #91804 - woppopo:const_clone, r=oli-obk
Matthias Krüger [Wed, 9 Mar 2022 22:14:09 +0000 (23:14 +0100)]
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk

Make some `Clone` impls `const`

Tracking issue: #91805
`Clone::clone_from` and some impls (Option, Result) bounded on `~const Drop`.

```rust
// core::clone
impl const Clone for INTEGER
impl const Clone for FLOAT
impl const Clone for bool
impl const Clone for char
impl const Clone for !
impl<T: ?Sized> const Clone for *const T
impl<T: ?Sized> const Clone for *mut T
impl<T: ?Sized> const Clone for &T

// core::option
impl<T> const Clone for Option<T>
where
    T: ~const Clone + ~const Drop

// core::result
impl<T, E> const Clone for Result<T, E>
where
    T: ~const Clone + ~const Drop,
    E: ~const Clone + ~const Drop,

// core::convert
impl const Clone for Infallible

// core::ptr
impl<T: ?Sized> const Clone for NonNull<T>
impl<T: ?Sized> const Clone for Unique<T>
```

2 years agoPermit `#[deprecated]` in stdlib
Jacob Pratt [Sat, 5 Mar 2022 02:59:18 +0000 (21:59 -0500)]
Permit `#[deprecated]` in stdlib

2 years agoNew `deprecated_suggestion` feature, use in tests
Jacob Pratt [Wed, 16 Feb 2022 23:48:33 +0000 (18:48 -0500)]
New `deprecated_suggestion` feature, use in tests

2 years agoAuto merge of #94779 - GuillaumeGomez:ci-spurious-failures, r=Dylan-DPC
bors [Wed, 9 Mar 2022 20:29:12 +0000 (20:29 +0000)]
Auto merge of #94779 - GuillaumeGomez:ci-spurious-failures, r=Dylan-DPC

Fix spurious CI failures

This should fix the CI error encountered in https://github.com/rust-lang/rust/pull/94774 (and multiple others).

cc `@nikic`

2 years agoFix spurious CI failures
Guillaume Gomez [Wed, 9 Mar 2022 19:47:16 +0000 (20:47 +0100)]
Fix spurious CI failures

2 years agoAdd tracking issue
fren_gor [Wed, 9 Mar 2022 20:12:07 +0000 (21:12 +0100)]
Add tracking issue

2 years agoWarn users about || in let chain expressions
Caio [Wed, 9 Mar 2022 18:04:09 +0000 (15:04 -0300)]
Warn users about || in let chain expressions

2 years agodiagnostics: use rustc_on_unimplemented to recommend `[].iter()`
Michael Howell [Tue, 8 Mar 2022 18:04:20 +0000 (11:04 -0700)]
diagnostics: use rustc_on_unimplemented to recommend `[].iter()`

To make this work, the `#[rustc_on_unimplemented]` data needs to be used to
report method resolution errors, which is most of what this commit does.

Fixes #94581

2 years agoAdd miri to the well known conditional compilation names and values
Loïc BRANSTETT [Wed, 9 Mar 2022 15:52:38 +0000 (16:52 +0100)]
Add miri to the well known conditional compilation names and values

2 years agoAdd documentation about lifetimes to thread::scope.
Mara Bos [Wed, 9 Mar 2022 09:17:49 +0000 (10:17 +0100)]
Add documentation about lifetimes to thread::scope.

2 years agokeep ERROR in message
b-naber [Wed, 9 Mar 2022 12:49:53 +0000 (13:49 +0100)]
keep ERROR in message

2 years agomanually bless 32-bit stderr
b-naber [Wed, 9 Mar 2022 11:16:33 +0000 (12:16 +0100)]
manually bless 32-bit stderr

2 years agoIgnore `close_read_wakes_up` test on SGX platform
Raoul Strackx [Wed, 9 Mar 2022 11:28:02 +0000 (12:28 +0100)]
Ignore `close_read_wakes_up` test on SGX platform

2 years agonormalization change and rebase
b-naber [Tue, 8 Mar 2022 14:05:50 +0000 (15:05 +0100)]
normalization change and rebase

2 years agobless tests
b-naber [Wed, 16 Feb 2022 09:56:01 +0000 (10:56 +0100)]
bless tests

2 years agotreat all mir::Constant values as ConstantKind::Val
b-naber [Wed, 16 Feb 2022 09:54:36 +0000 (10:54 +0100)]
treat all mir::Constant values as ConstantKind::Val

2 years agoEnable issue-23036.rs on wasm32
Nikita Popov [Wed, 9 Mar 2022 09:03:58 +0000 (10:03 +0100)]
Enable issue-23036.rs on wasm32

2 years agoUse new pass manager on s390x with LLVM 14
Nikita Popov [Wed, 9 Mar 2022 09:00:07 +0000 (10:00 +0100)]
Use new pass manager on s390x with LLVM 14

The problematic compile-time issue should be resolved with this
version.

2 years agoAuto merge of #94515 - estebank:tweak-move-error, r=davidtwco
bors [Wed, 9 Mar 2022 08:58:47 +0000 (08:58 +0000)]
Auto merge of #94515 - estebank:tweak-move-error, r=davidtwco

Tweak move error

Point at method definition that causes type to be consumed.

Fix #94056.

2 years agoUpdate LLVM submodule
Nikita Popov [Wed, 9 Mar 2022 08:51:12 +0000 (09:51 +0100)]
Update LLVM submodule

2 years agoAuto merge of #94761 - Dylan-DPC:rollup-v4emqsy, r=Dylan-DPC
bors [Wed, 9 Mar 2022 06:30:19 +0000 (06:30 +0000)]
Auto merge of #94761 - Dylan-DPC:rollup-v4emqsy, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #94312 (Edit `rustc_trait_selection::infer::lattice` docs)
 - #94583 (Add a team for '`@rustbot` ping fuchsia')
 - #94686 (Do not allow `#[rustc_legacy_const_generics]` on methods)
 - #94699 (BTree: remove dead data needlessly complicating insert)
 - #94756 (Use `unreachable!` for an unreachable code path)
 - #94759 (Update cargo)

Failed merges:

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

2 years agoRollup merge of #94759 - ehuss:update-cargo, r=ehuss
Dylan DPC [Wed, 9 Mar 2022 05:38:53 +0000 (06:38 +0100)]
Rollup merge of #94759 - ehuss:update-cargo, r=ehuss

Update cargo

11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
- Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438)
- Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427)
- Wait up to one second while waiting for curl (rust-lang/cargo#10456)
- Improve code coverage (rust-lang/cargo#10460)
- Don't recommend leaking tokens into the console history (rust-lang/cargo#10458)
- fix some typos (rust-lang/cargo#10454)
- Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453)
- Use locked_version more (rust-lang/cargo#10449)
- Disable dependabot (rust-lang/cargo#10443)
- Update git2 dependencies (rust-lang/cargo#10442)
- Stop gating stable features (rust-lang/cargo#10434)

2 years agoRollup merge of #94756 - ChrisDenton:unreachable, r=yaahc
Dylan DPC [Wed, 9 Mar 2022 05:38:53 +0000 (06:38 +0100)]
Rollup merge of #94756 - ChrisDenton:unreachable, r=yaahc

Use `unreachable!` for an unreachable code path

Closes #73212

2 years agoRollup merge of #94699 - ssomers:btree_prune_insert, r=Dylan-DPC
Dylan DPC [Wed, 9 Mar 2022 05:38:52 +0000 (06:38 +0100)]
Rollup merge of #94699 - ssomers:btree_prune_insert, r=Dylan-DPC

BTree: remove dead data needlessly complicating insert

Possibly needless instructions generated

r? rust-lang/libs
r? ``@Amanieu``
cc ``@frank-king``

2 years agoRollup merge of #94686 - ChayimFriedman2:issue-94629, r=jackh726
Dylan DPC [Wed, 9 Mar 2022 05:38:51 +0000 (06:38 +0100)]
Rollup merge of #94686 - ChayimFriedman2:issue-94629, r=jackh726

Do not allow `#[rustc_legacy_const_generics]` on methods

It caused an ICE since `item` was `None`.

Fixes #94629.

2 years agoRollup merge of #94583 - dtolnay:fuchsia, r=Mark-Simulacrum
Dylan DPC [Wed, 9 Mar 2022 05:38:50 +0000 (06:38 +0100)]
Rollup merge of #94583 - dtolnay:fuchsia, r=Mark-Simulacrum

Add a team for '@rustbot ping fuchsia'

I was looking for this in response to https://github.com/rust-lang/rust/pull/93858#issuecomment-1041367498.

Depends on https://github.com/rust-lang/team/pull/710.

2 years agoRollup merge of #94312 - pierwill:fix-94311-lattice-docs, r=jackh726
Dylan DPC [Wed, 9 Mar 2022 05:38:50 +0000 (06:38 +0100)]
Rollup merge of #94312 - pierwill:fix-94311-lattice-docs, r=jackh726

Edit `rustc_trait_selection::infer::lattice` docs

Closes #94311.

Removes mentions of outdated/missing type and filename (`infer.rs` and `LatticeValue`).

2 years agoUpdate cargo
Eric Huss [Wed, 9 Mar 2022 04:28:22 +0000 (20:28 -0800)]
Update cargo

2 years agoAuto merge of #94750 - cuviper:dirent64_min, r=joshtriplett
bors [Wed, 9 Mar 2022 02:17:58 +0000 (02:17 +0000)]
Auto merge of #94750 - cuviper:dirent64_min, r=joshtriplett

unix: reduce the size of DirEntry

On platforms where we call `readdir` instead of `readdir_r`, we store
the name as an allocated `CString` for variable length. There's no point
carrying around a full `dirent64` with its fixed-length `d_name` too.

2 years agoUse `unreachable!` for an unreachable code path
Chris Denton [Wed, 9 Mar 2022 00:47:24 +0000 (00:47 +0000)]
Use `unreachable!` for an unreachable code path

2 years agoAuto merge of #94751 - Dylan-DPC:rollup-zr7viw0, r=Dylan-DPC
bors [Tue, 8 Mar 2022 22:06:07 +0000 (22:06 +0000)]
Auto merge of #94751 - Dylan-DPC:rollup-zr7viw0, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #94689 (Use impl substs in `#[rustc_on_unimplemented]`)
 - #94714 (Enable `close_read_wakes_up` test on Windows)
 - #94723 (Add core::hint::must_use)
 - #94724 (unix: Avoid name conversions in `remove_dir_all_recursive`)
 - #94730 (Reverted atomic_mut_ptr feature removal causing compilation break)

Failed merges:

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

2 years agoRollup merge of #94730 - msabansal:sabansal/b-atomic-mut-ptr, r=Dylan-DPC
Dylan DPC [Tue, 8 Mar 2022 21:44:01 +0000 (22:44 +0100)]
Rollup merge of #94730 - msabansal:sabansal/b-atomic-mut-ptr, r=Dylan-DPC

Reverted atomic_mut_ptr feature removal causing compilation break

Fixes a regression introduced as part of https://github.com/rust-lang/rust/pull/94546

Std no longer compiles on nightly while using the following commnd:

export RUSTFLAGS='-C target-feature=+atomics,+bulk-memory'
cargo build --target wasm32-unknown-unknown -Z build-std=panic_abort,std

I can help add tests to avoid future breaks but i couldn't understand the test framework

2 years agoRollup merge of #94724 - cuviper:rmdirall-cstr, r=Dylan-DPC
Dylan DPC [Tue, 8 Mar 2022 21:44:00 +0000 (22:44 +0100)]
Rollup merge of #94724 - cuviper:rmdirall-cstr, r=Dylan-DPC

unix: Avoid name conversions in `remove_dir_all_recursive`

Each recursive call was creating an `OsString` for a `&Path`, only for
it to be turned into a `CString` right away. Instead we can directly
pass `.name_cstr()`, saving two allocations each time.

2 years agoRollup merge of #94723 - dtolnay:mustuse, r=Mark-Simulacrum
Dylan DPC [Tue, 8 Mar 2022 21:43:59 +0000 (22:43 +0100)]
Rollup merge of #94723 - dtolnay:mustuse, r=Mark-Simulacrum

Add core::hint::must_use

The example code in this documentation is minimized from a real-world situation in the `anyhow` crate where this function would have been valuable.

Having this provided by the standard library is especially useful for proc macros, even more than for macro_rules. That's because proc macro crates aren't allowed to export anything other than macros, so they couldn't make their own `must_use` function for their macro-generated code to call.

<br>

## Rendered documentation

> An identity function that causes an `unused_must_use` warning to be triggered if the given value is not used (returned, stored in a variable, etc) by the caller.
>
> This is primarily intended for use in macro-generated code, in which a [`#[must_use]` attribute][must_use] either on a type or a function would not be convenient.
>
> [must_use]: https://doc.rust-lang.org/reference/attributes/diagnostics.html#the-must_use-attribute
>
> ### Example
>
> ```rust
> #![feature(hint_must_use)]
>
> use core::fmt;
>
> pub struct Error(/* ... */);
>
> #[macro_export]
> macro_rules! make_error {
>     ($($args:expr),*) => {
>         core::hint::must_use({
>             let error = $crate::make_error(core::format_args!($($args),*));
>             error
>         })
>     };
> }
>
> // Implementation detail of make_error! macro.
> #[doc(hidden)]
> pub fn make_error(args: fmt::Arguments<'_>) -> Error {
>     Error(/* ... */)
> }
>
> fn demo() -> Option<Error> {
>     if true {
>         // Oops, meant to write `return Some(make_error!("..."));`
>         Some(make_error!("..."));
>     }
>     None
> }
> ```
>
> In the above example, we'd like an `unused_must_use` lint to apply to the value created by `make_error!`. However, neither `#[must_use]` on a struct nor `#[must_use]` on a function is appropriate here, so the macro expands using `core::hint::must_use` instead.
>
> - We wouldn't want `#[must_use]` on the `struct Error` because that would make the following unproblematic code trigger a warning:
>
>   ```rust
>   fn f(arg: &str) -> Result<(), Error>
>
>   #[test]
>   fn t() {
>       // Assert that `f` returns error if passed an empty string.
>       // A value of type `Error` is unused here but that's not a problem.
>       f("").unwrap_err();
>   }
>   ```
>
> - Using `#[must_use]` on `fn make_error` can't help because the return value *is* used, as the right-hand side of a `let` statement. The `let` statement looks useless but is in fact necessary for ensuring that temporaries within the `format_args` expansion are not kept alive past the creation of the `Error`, as keeping them alive past that point can cause autotrait issues in async code:
>
>   ```rust
>   async fn f() {
>       // Using `let` inside the make_error expansion causes temporaries like
>       // `unsync()` to drop at the semicolon of that `let` statement, which
>       // is prior to the await point. They would otherwise stay around until
>       // the semicolon on *this* statement, which is after the await point,
>       // and the enclosing Future would not implement Send.
>       log(make_error!("look: {:p}", unsync())).await;
>   }
>
>   async fn log(error: Error) {/* ... */}
>
>   // Returns something without a Sync impl.
>   fn unsync() -> *const () {
>       0 as *const ()
>   }
>   ```

2 years agoRollup merge of #94714 - ChrisDenton:win-close_read_wakes_up, r=Mark-Simulacrum
Dylan DPC [Tue, 8 Mar 2022 21:43:57 +0000 (22:43 +0100)]
Rollup merge of #94714 - ChrisDenton:win-close_read_wakes_up, r=Mark-Simulacrum

Enable `close_read_wakes_up` test on Windows

I wonder if we could/should try enabling this again? It was closed by #38867 due to #31657. I've tried running this test (along with other tests) on my machine a number of times and haven't seen this fail yet,

Caveat: the worst that can happen is this succeeds initially but then causes random hangs in CI. This is not a great failure mode and would be a reason not to do this.

If this does work out, closes #39006

r? `@Mark-Simulacrum`

2 years agoRollup merge of #94689 - compiler-errors:on-unimplemented-substs, r=petrochenkov
Dylan DPC [Tue, 8 Mar 2022 21:43:56 +0000 (22:43 +0100)]
Rollup merge of #94689 - compiler-errors:on-unimplemented-substs, r=petrochenkov

Use impl substs in `#[rustc_on_unimplemented]`

We were using the trait-ref substs instead of impl substs in `rustc_on_unimplemented`, even when computing the `rustc_on_unimplemented` attached to an impl block. Let's not do that.

This PR also untangles impl and trait def-ids in the logic in `on_unimplemented` a bit.

Fixes #94675

2 years agounix: reduce the size of DirEntry
Josh Stone [Tue, 8 Mar 2022 21:36:01 +0000 (13:36 -0800)]
unix: reduce the size of DirEntry

On platforms where we call `readdir` instead of `readdir_r`, we store
the name as an allocated `CString` for variable length. There's no point
carrying around a full `dirent64` with its fixed-length `d_name` too.

2 years agoAuto merge of #94702 - b-naber:static-refs-mir, r=lcnr
bors [Tue, 8 Mar 2022 19:25:19 +0000 (19:25 +0000)]
Auto merge of #94702 - b-naber:static-refs-mir, r=lcnr

Reinstate #93800

https://github.com/rust-lang/rust/pull/93800 caused a regression in an alt builder with parallel enabled. https://github.com/rust-lang/rust/pull/94205 reverted that PR because of the regression. For an unknown reason the regression has disappeared, so we reinstate the changes in https://github.com/rust-lang/rust/pull/93800 here.

r? `@Mark-Simulacrum`

2 years agoAdd core::hint::must_use
David Tolnay [Tue, 8 Mar 2022 00:37:59 +0000 (16:37 -0800)]
Add core::hint::must_use

2 years agoDo not suggest `let_else` if no bindings would be introduced
Esteban Kuber [Tue, 8 Mar 2022 17:20:05 +0000 (17:20 +0000)]
Do not suggest `let_else` if no bindings would be introduced

2 years agoAuto merge of #92260 - jyn514:less-python-logic, r=Mark-Simulacrum
bors [Tue, 8 Mar 2022 17:04:45 +0000 (17:04 +0000)]
Auto merge of #92260 - jyn514:less-python-logic, r=Mark-Simulacrum

Move some more bootstrap logic from python to rust

Same rationale as https://github.com/rust-lang/rust/pull/76544; it would be nice to make python entirely optional at some point.

This also removes $ROOT as an option for the build directory; I haven't been using it, and like Alex
said in https://github.com/rust-lang/rust/pull/76544#discussion_r488248930 it seems like a misfeature.

This allows running `cargo run` from src/bootstrap, although that still gives
lots of compile errors if you don't use the beta toolchain. It's not exactly the same as using `x.py`, since it won't have `BOOTSTRAP_DOWNLOAD_RUSTC` set, but it's pretty close. Doing this from the top-level directory requires https://github.com/rust-lang/cargo/issues/7290 to be fixed, or using `cargo run -p bootstrap`.

The next steps for making python optional are to move download-ci-llvm and download-rustc support into rustbuild, likely be shelling out as the python scripts do today.

It would also be nice (although not required) to move submodule support there, but that would require taking bootstrap out of the workspace to avoid errors from crates that haven't been cloned yet.

r? `@Mark-Simulacrum`

2 years agoSuggest `if let`/`let_else` for refutable pat in `let`
Esteban Kuber [Tue, 8 Mar 2022 05:54:38 +0000 (05:54 +0000)]
Suggest `if let`/`let_else` for refutable pat in `let`

2 years agomention ignored fields of ExprKind::StaticRef
b-naber [Tue, 8 Mar 2022 14:44:06 +0000 (15:44 +0100)]
mention ignored fields of ExprKind::StaticRef

2 years agoadd `#[rustc_pass_by_value]` to more types
lcnr [Tue, 8 Mar 2022 14:39:52 +0000 (15:39 +0100)]
add `#[rustc_pass_by_value]` to more types

2 years agoAuto merge of #94734 - matthiaskrgr:rollup-28shqhy, r=matthiaskrgr
bors [Tue, 8 Mar 2022 10:24:46 +0000 (10:24 +0000)]
Auto merge of #94734 - matthiaskrgr:rollup-28shqhy, r=matthiaskrgr

Rollup of 8 pull requests

Successful merges:

 - #91993 (Tweak output for non-exhaustive `match` expression)
 - #92385 (Add Result::{ok, err, and, or, unwrap_or} as const)
 - #94559 (Remove argument from closure in thread::Scope::spawn.)
 - #94580 (Emit `unused_attributes` if a level attr only has a reason)
 - #94586 (Generalize `get_nullable_type` to allow types where null is all-ones.)
 - #94708 (diagnostics: only talk about `Cargo.toml` if running under Cargo)
 - #94712 (promot debug_assert to assert)
 - #94726 (:arrow_up: rust-analyzer)

Failed merges:

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

2 years agoRollup merge of #94726 - lnicola:rust-analyzer-2022-03-08, r=lnicola
Matthias Krüger [Tue, 8 Mar 2022 10:04:56 +0000 (11:04 +0100)]
Rollup merge of #94726 - lnicola:rust-analyzer-2022-03-08, r=lnicola

:arrow_up: rust-analyzer

r? `@ghost`

2 years agoRollup merge of #94712 - kckeiks:remove-rwlock-read-error-assumption, r=Mark-Simulacrum
Matthias Krüger [Tue, 8 Mar 2022 10:04:55 +0000 (11:04 +0100)]
Rollup merge of #94712 - kckeiks:remove-rwlock-read-error-assumption, r=Mark-Simulacrum

promot debug_assert to assert

Fixes #94705

2 years agoRollup merge of #94708 - notriddle:notriddle/cargo-toml-warning, r=lcnr
Matthias Krüger [Tue, 8 Mar 2022 10:04:54 +0000 (11:04 +0100)]
Rollup merge of #94708 - notriddle:notriddle/cargo-toml-warning, r=lcnr

diagnostics: only talk about `Cargo.toml` if running under Cargo

Fixes #94646

2 years agoRollup merge of #94586 - sunfishcode:sunfishcode/io-lifetimes-tests, r=davidtwco
Matthias Krüger [Tue, 8 Mar 2022 10:04:53 +0000 (11:04 +0100)]
Rollup merge of #94586 - sunfishcode:sunfishcode/io-lifetimes-tests, r=davidtwco

Generalize `get_nullable_type` to allow types where null is all-ones.

Generalize get_nullable_type to accept types that have an all-ones bit
pattern as their sentry "null" value.

This will allow [`OwnedFd`], [`BorrowedFd`], [`OwnedSocket`], and
[`BorrowedSocket`] to be marked with
`#[rustc_nonnull_optimization_guaranteed]`, which will allow
`Option<OwnedFd>`, `Option<BorrowedFd>`, `Option<OwnedSocket>`, and
`Option<BorrowedSocket>` to be used in FFI declarations, as described
in the [I/O safety RFC].

For example, it will allow a function like `open` on Unix and `WSASocketW`
on Windows to be declared using `Option<OwnedFd>` and `Option<OwnedSocket>`
return types, respectively.

The actual change to add `#[rustc_nonnull_optimization_guaranteed]`
to the abovementioned types will be a separate PR, as it'll depend on
having this patch in the stage0 compiler.

Also, update the diagnostics to mention that "niche optimizations" are
used in libstd as well as libcore, as `rustc_layout_scalar_valid_range_start`
and `rustc_layout_scalar_valid_range_end` are already in use in libstd.

[`OwnedFd`]: https://github.com/rust-lang/rust/blob/c9dc44be24c58ff13ce46416c4b97ab5c1bd8429/library/std/src/os/fd/owned.rs#L49
[`BorrowedFd`]: https://github.com/rust-lang/rust/blob/c9dc44be24c58ff13ce46416c4b97ab5c1bd8429/library/std/src/os/fd/owned.rs#L29
[`OwnedSocket`]: https://github.com/rust-lang/rust/blob/c9dc44be24c58ff13ce46416c4b97ab5c1bd8429/library/std/src/os/windows/io/socket.rs#L51
[`BorrowedSocket`]: https://github.com/rust-lang/rust/blob/c9dc44be24c58ff13ce46416c4b97ab5c1bd8429/library/std/src/os/windows/io/socket.rs#L29
[I/O safety RFC]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md#ownedfd-and-borrowedfdfd-1

2 years agoRollup merge of #94580 - xFrednet:55112-only-reason-in-lint-attr, r=lcnr
Matthias Krüger [Tue, 8 Mar 2022 10:04:52 +0000 (11:04 +0100)]
Rollup merge of #94580 - xFrednet:55112-only-reason-in-lint-attr, r=lcnr

Emit `unused_attributes` if a level attr only has a reason

Fixes a comment from `compiler/rustc_lint/src/levels.rs`. Lint level attributes that only contain a reason will also trigger the `unused_attribute` lint. The lint now also checks for the `expect` lint level.

That's it, have a great rest of the day for everyone reasoning this :upside_down_face:

cc: #55112

2 years agoRollup merge of #94559 - m-ou-se:thread-scope-spawn-closure-without-arg, r=Mark-Simul...
Matthias Krüger [Tue, 8 Mar 2022 10:04:51 +0000 (11:04 +0100)]
Rollup merge of #94559 - m-ou-se:thread-scope-spawn-closure-without-arg, r=Mark-Simulacrum

Remove argument from closure in thread::Scope::spawn.

This implements ```@danielhenrymantilla's``` [suggestion](https://github.com/rust-lang/rust/issues/93203#issuecomment-1040798286) for improving the scoped threads interface.

Summary:

The `Scope` type gets an extra lifetime argument, which represents basically its own lifetime that will be used in `&'scope Scope<'scope, 'env>`:

```diff
- pub struct Scope<'env> { .. };
+ pub struct Scope<'scope, 'env: 'scope> { .. }

  pub fn scope<'env, F, T>(f: F) -> T
  where
-     F: FnOnce(&Scope<'env>) -> T;
+     F: for<'scope> FnOnce(&'scope Scope<'scope, 'env>) -> T;
```

This simplifies the `spawn` function, which now no longer passes an argument to the closure you give it, and now uses the `'scope` lifetime for everything:

```diff
-     pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
+     pub fn spawn<F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
      where
-         F: FnOnce(&Scope<'env>) -> T + Send + 'env,
+         F: FnOnce() -> T + Send + 'scope,
-         T: Send + 'env;
+         T: Send + 'scope;
```

The only difference the user will notice, is that their closure now takes no arguments anymore, even when spawning threads from spawned threads:

```diff
  thread::scope(|s| {
-     s.spawn(|_| {
+     s.spawn(|| {
          ...
      });
-     s.spawn(|s| {
+     s.spawn(|| {
          ...
-         s.spawn(|_| ...);
+         s.spawn(|| ...);
      });
  });
```

<details><summary>And, as a bonus, errors get <em>slightly</em> better because now any lifetime issues point to the outermost <code>s</code> (since there is only one <code>s</code>), rather than the innermost <code>s</code>, making it clear that the lifetime lasts for the entire <code>thread::scope</code>.

</summary>

```diff
  error[E0373]: closure may outlive the current function, but it borrows `a`, which is owned by the current function
   --> src/main.rs:9:21
    |
- 7 |         s.spawn(|s| {
-   |                  - has type `&Scope<'1>`
+ 6 |     thread::scope(|s| {
+   |                    - lifetime `'1` appears in the type of `s`
  9 |             s.spawn(|| println!("{:?}", a)); // might run after `a` is dropped
    |                     ^^                  - `a` is borrowed here
    |                     |
    |                     may outlive borrowed value `a`
    |
  note: function requires argument type to outlive `'1`
   --> src/main.rs:9:13
    |
  9 |             s.spawn(|| println!("{:?}", a)); // might run after `a` is dropped
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  help: to force the closure to take ownership of `a` (and any other referenced variables), use the `move` keyword
    |
  9 |             s.spawn(move || println!("{:?}", a)); // might run after `a` is dropped
    |                     ++++
"
```
</details>

The downside is that the signature of `scope` and `Scope` gets slightly more complex, but in most cases the user wouldn't need to write those, as they just use the argument provided by `thread::scope` without having to name its type.

Another downside is that this does not work nicely in Rust 2015 and Rust 2018, since in those editions, `s` would be captured by reference and not by copy. In those editions, the user would need to use `move ||` to capture `s` by copy. (Which is what the compiler suggests in the error.)

2 years agoRollup merge of #92385 - clarfonthey:const_option, r=fee1-dead
Matthias Krüger [Tue, 8 Mar 2022 10:04:50 +0000 (11:04 +0100)]
Rollup merge of #92385 - clarfonthey:const_option, r=fee1-dead

Add Result::{ok, err, and, or, unwrap_or} as const

Already opened tracking issue #92384.

I don't think that this should actually cause any issues as long as the constness is unstable, but we may want to double-check that this doesn't get interpreted as a weird `Drop` bound even for non-const usages.

2 years agoRollup merge of #91993 - estebank:match-span-suggestion, r=oli-obk
Matthias Krüger [Tue, 8 Mar 2022 10:04:49 +0000 (11:04 +0100)]
Rollup merge of #91993 - estebank:match-span-suggestion, r=oli-obk

Tweak output for non-exhaustive `match` expression

* Provide structured suggestion when missing `match` arms
* Move pointing at the missing variants *after* the main error

<img width="1164" alt="" src="https://user-images.githubusercontent.com/1606434/146312085-b57ef4a3-6e96-4f32-aa2a-803637d9eeba.png">

2 years agotreat literals in ExprKind::StaticRef as mir::ConstantKind::Val
b-naber [Mon, 7 Mar 2022 12:51:59 +0000 (13:51 +0100)]
treat literals in ExprKind::StaticRef as mir::ConstantKind::Val

2 years agoAuto merge of #94716 - RalfJung:miri, r=RalfJung
bors [Tue, 8 Mar 2022 07:44:03 +0000 (07:44 +0000)]
Auto merge of #94716 - RalfJung:miri, r=RalfJung

update Miri

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

2 years agoReverted atomic-mut-ptr feature removal causing compilation break
Sandeep Bansal [Tue, 8 Mar 2022 07:41:52 +0000 (23:41 -0800)]
Reverted atomic-mut-ptr feature removal causing compilation break

2 years ago:arrow_up: rust-analyzer
Laurențiu Nicola [Tue, 8 Mar 2022 06:44:23 +0000 (08:44 +0200)]
:arrow_up: rust-analyzer

2 years agounix: Avoid name conversions in `remove_dir_all_recursive`
Josh Stone [Tue, 8 Mar 2022 02:51:53 +0000 (18:51 -0800)]
unix: Avoid name conversions in `remove_dir_all_recursive`

Each recursive call was creating an `OsString` for a `&Path`, only for
it to be turned into a `CString` right away. Instead we can directly
pass `.name_cstr()`, saving two allocations each time.

2 years agoupdate Miri
Ralf Jung [Tue, 8 Mar 2022 01:49:03 +0000 (20:49 -0500)]
update Miri

2 years agoAuto merge of #90887 - jackh726:issue-90729, r=nikomatsakis
bors [Tue, 8 Mar 2022 00:53:41 +0000 (00:53 +0000)]
Auto merge of #90887 - jackh726:issue-90729, r=nikomatsakis

Try to normalize associated types before processing obligations

Closes #90729

r? `@nikomatsakis`

2 years agoBless test
Jack Huey [Mon, 7 Mar 2022 21:24:41 +0000 (16:24 -0500)]
Bless test

2 years agoChange wording of suggestion to add missing `match` arm
Esteban Kuber [Thu, 16 Dec 2021 22:46:13 +0000 (22:46 +0000)]
Change wording of suggestion to add missing `match` arm

2 years agoPoint at uncovered variants in enum definition in `note` instead of a `span_label`
Esteban Kuber [Thu, 16 Dec 2021 05:06:44 +0000 (05:06 +0000)]
Point at uncovered variants in enum definition in `note` instead of a `span_label`

This makes the order of the output always consistent:

1. Place of the `match` missing arms
2. The `enum` definition span
3. The structured suggestion to add a fallthrough arm

2 years agoWhen finding a match expr with multiple arms that requires more, suggest it
Esteban Kuber [Thu, 16 Dec 2021 02:28:09 +0000 (02:28 +0000)]
When finding a match expr with multiple arms that requires more, suggest it

Given

```rust
match Some(42) {
    Some(0) => {}
    Some(1) => {}
}
```

suggest

```rust
match Some(42) {
    Some(0) => {}
    Some(1) => {}
    None | Some(_) => todo!(),
}
```

2 years agoWhen finding a match expr with a single arm that requires more, suggest it
Esteban Kuber [Thu, 16 Dec 2021 02:14:17 +0000 (02:14 +0000)]
When finding a match expr with a single arm that requires more, suggest it

Given

```rust
match Some(42) {
    Some(0) => {}
}
```

suggest

```rust
match Some(42) {
    Some(0) => {}
    None | Some(_) => todo!(),
}
```

2 years agoWhen encountering a match expr with no arms, suggest it
Esteban Kuber [Thu, 16 Dec 2021 02:05:58 +0000 (02:05 +0000)]
When encountering a match expr with no arms, suggest it

Given

```rust
match Some(42) {}
```

suggest

```rust
match Some(42) { None | Some(_) => todo!(), }
```

2 years agoEnable `close_read_wakes_up` on Windows
Chris Denton [Mon, 7 Mar 2022 22:35:17 +0000 (22:35 +0000)]
Enable `close_read_wakes_up` on Windows

2 years agoUse `f` instead of `|| f()`.
Mara Bos [Mon, 7 Mar 2022 22:14:02 +0000 (22:14 +0000)]
Use `f` instead of `|| f()`.

Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
2 years agocopy over `std::path::absolute` instead of adding `canonicalize` hacks
Joshua Nelson [Thu, 3 Mar 2022 12:12:32 +0000 (06:12 -0600)]
copy over `std::path::absolute` instead of adding `canonicalize` hacks

this also fixes a bug where bootstrap would try to use the fake `rustc` binary built by bootstrap -
cargo puts it in a different directory when using `cargo run` instead of x.py

2 years agofix weird bug when `out` would get overridden by unit tests
Joshua Nelson [Mon, 7 Feb 2022 03:24:47 +0000 (21:24 -0600)]
fix weird bug when `out` would get overridden by unit tests

2 years agoDon't depend on python for RUST_BOOTSTRAP_CONFIG
Joshua Nelson [Mon, 7 Feb 2022 00:10:49 +0000 (18:10 -0600)]
Don't depend on python for RUST_BOOTSTRAP_CONFIG

2 years agoMove some more bootstrap logic from python to rust
Joshua Nelson [Fri, 24 Dec 2021 19:03:02 +0000 (13:03 -0600)]
Move some more bootstrap logic from python to rust

Same rationale as https://github.com/rust-lang/rust/pull/76544;
it would be nice to make python entirely optional at some point.

This also removes $ROOT as an option for the build directory; I haven't been using it, and like Alex
said in https://github.com/rust-lang/rust/pull/76544#discussion_r488248930 it seems like a
misfeature.

This allows running `cargo run` from src/bootstrap, although that still gives
lots of compile errors if you don't use the beta toolchain.

2 years agoAuto merge of #94709 - martingms:link-to-chunked-opt-pr, r=nnethercote
bors [Mon, 7 Mar 2022 21:20:05 +0000 (21:20 +0000)]
Auto merge of #94709 - martingms:link-to-chunked-opt-pr, r=nnethercote

Add link to closed PR for future optimizers of ChunkedBitSet relations

While optimizing these operations proved unfruitful w.r.t. improving compiler performance right now, faster versions might be needed at a later time. This PR adds a link in the FIXME to save any future optimizers some time, as requested by `@nnethercote` in https://github.com/rust-lang/rust/pull/94625.

r? `@nnethercote`

2 years agoBless issue-91130 test
Jack Huey [Sat, 26 Feb 2022 03:48:47 +0000 (22:48 -0500)]
Bless issue-91130 test

2 years agoTry to normalize associated types before processing obligations
Jack Huey [Sat, 13 Nov 2021 23:45:03 +0000 (18:45 -0500)]
Try to normalize associated types before processing obligations

2 years agopromot debug_assert to assert
Fausto [Mon, 7 Mar 2022 20:48:35 +0000 (15:48 -0500)]
promot debug_assert to assert

2 years agoAdd comment linking to closed PR for future optimizers
Martin Gammelsæter [Mon, 7 Mar 2022 18:06:42 +0000 (19:06 +0100)]
Add comment linking to closed PR for future optimizers

While optimizing these operations proved unfruitful w.r.t. improving
compiler performance right now, faster versions might be needed at a
later time.

2 years agoAuto merge of #94706 - matthiaskrgr:rollup-l5erynr, r=matthiaskrgr
bors [Mon, 7 Mar 2022 18:06:31 +0000 (18:06 +0000)]
Auto merge of #94706 - matthiaskrgr:rollup-l5erynr, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #93350 (libunwind: readd link attrs to _Unwind_Backtrace)
 - #93827 (Stabilize const_fn_fn_ptr_basics, const_fn_trait_bound, and const_impl_trait)
 - #94696 (Remove whitespaces and use CSS to align line numbers to the right instead)
 - #94700 (rustdoc: Update minifier version)

Failed merges:

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

2 years agodiagnostics: only talk about `Cargo.toml` if running under Cargo
Michael Howell [Mon, 7 Mar 2022 17:50:47 +0000 (10:50 -0700)]
diagnostics: only talk about `Cargo.toml` if running under Cargo

Fixes #94646

2 years agoRollup merge of #94700 - GuillaumeGomez:update-minifier, r=notriddle
Matthias Krüger [Mon, 7 Mar 2022 17:39:04 +0000 (18:39 +0100)]
Rollup merge of #94700 - GuillaumeGomez:update-minifier, r=notriddle

rustdoc: Update minifier version

This new version includes a fix for the CSS minifier which was badly handling inline media queries like ``@import` 'i';`.

r? `@notriddle`

2 years agoRollup merge of #94696 - GuillaumeGomez:align-line-numbers-right, r=notriddle
Matthias Krüger [Mon, 7 Mar 2022 17:39:03 +0000 (18:39 +0100)]
Rollup merge of #94696 - GuillaumeGomez:align-line-numbers-right, r=notriddle

Remove whitespaces and use CSS to align line numbers to the right instead

Instead of generating whitespaces to create padding, we simply use the CSS rule: `text-align: right`.

Nice side-effect: it reduces the generated HTML size from **75.004** to **74.828** (MegaBytes) on the std source pages (it's not much but it's always a nice plus :laughing: ).

There are no changes in the generated UI.

r? `@notriddle`