]> git.lizzy.rs Git - rust.git/log
rust.git
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 #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 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 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 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 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 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`

2 years agoRollup merge of #93827 - eholk:stabilize-const_fn-features, r=wesleywiser
Matthias Krüger [Mon, 7 Mar 2022 17:39:02 +0000 (18:39 +0100)]
Rollup merge of #93827 - eholk:stabilize-const_fn-features, r=wesleywiser

Stabilize const_fn_fn_ptr_basics, const_fn_trait_bound, and const_impl_trait

# Stabilization Report

This PR serves as a request for stabilization for three const evaluation features:

1. `const_fn_fn_ptr_basics`
2. `const_fn_trait_bound`
3. `const_impl_trait`

These are being stabilized together because they are relatively minor and related updates to existing functionality.

## `const_fn_fn_ptr_basics`

Allows creating, passing, and casting function pointers in a `const fn`.

The following is an example of what is now allowed:

```rust
const fn get_function() -> fn() {
    fn foo() {
        println!("Hello, World!");
    }

    foo
}
```

Casts between function pointer types are allowed, as well as transmuting from integers:

```rust
const fn get_function() -> fn() {
    unsafe {
        std::mem::transmute(0x1234usize)
    }
}
```

However, casting from a function pointer to an integer is not allowed:

```rust
const fn fn_to_usize(f: fn()) -> usize {
    f as usize  //~ pointers cannot be cast to integers during const eval
}
```

Calling function pointers is also not allowed.

```rust
const fn call_fn_ptr(f: fn()) {
    f() //~ function pointers are not allowed in const fn
}
```

### Test Coverage

The following tests include code that exercises this feature:

- `src/test/ui/consts/issue-37550.rs`
- `src/test/ui/consts/issue-46553.rs`
- `src/test/ui/consts/issue-56164.rs`
- `src/test/ui/consts/min_const_fn/allow_const_fn_ptr_run_pass.rs`
- `src/test/ui/consts/min_const_fn/cast_fn.rs`
- `src/test/ui/consts/min_const_fn/cmp_fn_pointers.rs`

## `const_fn_trait_bound`

Allows trait bounds in `const fn`. Additionally, this feature allows creating and passing `dyn Trait` objects.

Examples such as the following are allowed by this feature:

```rust
const fn do_thing<T: Foo>(_x: &T) {
    // ...
}
```

Previously only `Sized` was allowed as a trait bound.

There is no way to call methods from the trait because trait methods cannot currently be marked as const. Allowing trait bounds in const functions does allow the const function to use the trait's associated types and constants.

This feature also allowes `dyn Trait` types. These work equivalently to non-const code. Similar to other pointers in const code, the value of a `dyn Trait` pointer cannot be observed.

Note that due to https://github.com/rust-lang/rust/issues/90912, it was already possible to do the example above as follows:

```rust
const fn do_thing<T>(_x: &T) where (T,): Foo {
    // ...
}
```

### Test Coverage

The following tests include code that exercises `const_fn_trait_bound`:

- `src/test/ui/consts/const-fn.rs`
- `src/test/ui/consts/issue-88071.rs`
- `src/test/ui/consts/min_const_fn/min_const_fn.rs`
- `src/test/ui/consts/min_const_fn/min_const_fn_dyn.rs`
- `src/test/ui/nll/issue-55825-const-fn.rs`
- Many of the tests in `src/test/ui/rfc-2632-const-trait-impl/` also exercise this feature.

## `const_impl_trait`

Allows argument and return position `impl Trait` in a `const fn`, such as in the following example:

```rust
const fn do_thing(x: impl Foo) -> impl Foo {
    x
}
```

Similar to generic parameters and function pointers, this allows the creation of such opaque types, but not doing anything with them beyond accessing associated types and constants.

### Test Coverage

The following tests exercise this feature:

- `src/test/ui/type-alias-impl-trait/issue-53096.rs`
- `src/test/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs`

## Documentation

These features are documented along with the other const evaluation features in the Rust Reference at https://doc.rust-lang.org/stable/reference/const_eval.html.

There is a PR that updates this documentation to reflect the capabilities enabled by these features at https://github.com/rust-lang/reference/pull/1166.

Tracking issues: #57563, #63997, #93706

2 years agoRollup merge of #93350 - gburgessiv:master, r=Mark-Simulacrum
Matthias Krüger [Mon, 7 Mar 2022 17:39:02 +0000 (18:39 +0100)]
Rollup merge of #93350 - gburgessiv:master, r=Mark-Simulacrum

libunwind: readd link attrs to _Unwind_Backtrace

It seems the removal of these in 1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them fixes the build.

fixes rust-lang/rust#93349

r? `@alexcrichton`

2 years agoUpdate tests
Eric Holk [Fri, 4 Mar 2022 19:29:57 +0000 (11:29 -0800)]
Update tests

2 years agoBump stabilization version to 1.61.0
Eric Holk [Sat, 26 Feb 2022 00:17:25 +0000 (16:17 -0800)]
Bump stabilization version to 1.61.0

2 years agoStabilize const_impl_trait as well
Eric Holk [Sat, 12 Feb 2022 02:04:44 +0000 (18:04 -0800)]
Stabilize const_impl_trait as well

2 years agoRemove dead/useless code
Eric Holk [Fri, 11 Feb 2022 19:36:02 +0000 (11:36 -0800)]
Remove dead/useless code

2 years agoUpdate and fix clippy tests
Eric Holk [Fri, 11 Feb 2022 03:23:43 +0000 (19:23 -0800)]
Update and fix clippy tests

2 years agoUpdate tests after feature stabilization
Eric Holk [Wed, 9 Feb 2022 18:53:40 +0000 (10:53 -0800)]
Update tests after feature stabilization

2 years agoStabilize const_fn_fn_ptr_basics and const_fn_trait_bound
Eric Holk [Wed, 9 Feb 2022 00:33:15 +0000 (16:33 -0800)]
Stabilize const_fn_fn_ptr_basics and const_fn_trait_bound

2 years agoAuto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead
bors [Mon, 7 Mar 2022 15:25:42 +0000 (15:25 +0000)]
Auto merge of #94690 - nnethercote:clarify-Layout-interning, r=fee1-dead

Clarify `Layout` interning.

`Layout` is another type that is sometimes interned, sometimes not, and
we always use references to refer to it so we can't take any advantage
of the uniqueness properties for hashing or equality checks.

This commit renames `Layout` as `LayoutS`, and then introduces a new
`Layout` that is a newtype around an `Interned<LayoutS>`. It also
interns more layouts than before. Previously layouts within layouts
(via the `variants` field) were never interned, but now they are. Hence
the lifetime on the new `Layout` type.

Unlike other interned types, these ones are in `rustc_target` instead of
`rustc_middle`. This reflects the existing structure of the code, which
does layout-specific stuff in `rustc_target` while `TyAndLayout` is
generic over the `Ty`, allowing the type-specific stuff to occur in
`rustc_middle`.

The commit also adds a `HashStable` impl for `Interned`, which was
needed. It hashes the contents, unlike the `Hash` impl which hashes the
pointer.

r? `@fee1-dead`

2 years agoUpdate minifier version
Guillaume Gomez [Mon, 7 Mar 2022 14:10:24 +0000 (15:10 +0100)]
Update minifier version

2 years agoAuto merge of #94695 - matthiaskrgr:rollup-5pi3acz, r=matthiaskrgr
bors [Mon, 7 Mar 2022 13:02:31 +0000 (13:02 +0000)]
Auto merge of #94695 - matthiaskrgr:rollup-5pi3acz, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #94553 (add tests for #94502)
 - #94614 (Remove ordering traits from `rustc_span::hygiene::LocalExpnId`)
 - #94685 (interpret: move saturating_add/sub into (pub) helper method)
 - #94688 (Erase regions when checking for missing Copy predicates)

Failed merges:

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

2 years agoAdd GUI test to ensure that line numbers text is aligned to the right
Guillaume Gomez [Mon, 7 Mar 2022 11:08:14 +0000 (12:08 +0100)]
Add GUI test to ensure that line numbers text is aligned to the right

2 years agoRemove unneeded whitespace generation and use CSS instead instead to align line numbe...
Guillaume Gomez [Mon, 7 Mar 2022 11:04:51 +0000 (12:04 +0100)]
Remove unneeded whitespace generation and use CSS instead instead to align line numbers to the right

2 years agoRollup merge of #94688 - compiler-errors:free-regions-in-copy-predicate-check, r...
Matthias Krüger [Mon, 7 Mar 2022 10:35:58 +0000 (11:35 +0100)]
Rollup merge of #94688 - compiler-errors:free-regions-in-copy-predicate-check, r=oli-obk

Erase regions when checking for missing Copy predicates

Fixes #94662

2 years agoRollup merge of #94685 - RalfJung:saturating, r=oli-obk
Matthias Krüger [Mon, 7 Mar 2022 10:35:57 +0000 (11:35 +0100)]
Rollup merge of #94685 - RalfJung:saturating, r=oli-obk

interpret: move saturating_add/sub into (pub) helper method

I plan to use them for `simd_saturating_add/sub`.

The first commit just moves code, the 2nd simplifies it a bit with some helper methods that did not exist yet when the code was originally written.

2 years agoRollup merge of #94614 - pierwill:localexpnid-noord, r=lcnr
Matthias Krüger [Mon, 7 Mar 2022 10:35:56 +0000 (11:35 +0100)]
Rollup merge of #94614 - pierwill:localexpnid-noord, r=lcnr

Remove ordering traits from `rustc_span::hygiene::LocalExpnId`

Part of work on #90317.

Also adds a negative impl block as a form of documentation and a roadblock to regression.

2 years agoRollup merge of #94553 - lcnr:add-tests, r=Dylan-DPC
Matthias Krüger [Mon, 7 Mar 2022 10:35:55 +0000 (11:35 +0100)]
Rollup merge of #94553 - lcnr:add-tests, r=Dylan-DPC

add tests for #94502

cc #94552

2 years agoAuto merge of #94692 - matthiaskrgr:rollup-64p7ya7, r=matthiaskrgr
bors [Mon, 7 Mar 2022 07:29:08 +0000 (07:29 +0000)]
Auto merge of #94692 - matthiaskrgr:rollup-64p7ya7, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #94636 (Check extra function arg exprs even if the fn is not C-variadic)
 - #94676 (Remove unnecessary `..` patterns)
 - #94681 (CTFE engine: expose misc_cast to Miri)
 - #94684 (Fix rustdoc for GATs with with anonymous bound regions)

Failed merges:

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

2 years agoadd tests for #94502
lcnr [Thu, 3 Mar 2022 10:57:14 +0000 (11:57 +0100)]
add tests for #94502

2 years agoRollup merge of #94684 - compiler-errors:gat-anon-late-bound, r=notriddle
Matthias Krüger [Mon, 7 Mar 2022 05:44:05 +0000 (06:44 +0100)]
Rollup merge of #94684 - compiler-errors:gat-anon-late-bound, r=notriddle

Fix rustdoc for GATs with with anonymous bound regions

Just use the logic that already worked for cleaning trait refs.

Fixes #94683

2 years agoRollup merge of #94681 - RalfJung:miri-cast, r=oli-obk
Matthias Krüger [Mon, 7 Mar 2022 05:44:04 +0000 (06:44 +0100)]
Rollup merge of #94681 - RalfJung:miri-cast, r=oli-obk

CTFE engine: expose misc_cast to Miri

We need that to implement `simd_cast`/`simd_as` in Miri.

While at it, also change other code outside `cast.rs` to use `misc_cast` instead of lower-level methods.

r? `@oli-obk`

2 years agoRollup merge of #94676 - TaKO8Ki:remove-unnecessary-pattens-for-ignoring-remaining...
Matthias Krüger [Mon, 7 Mar 2022 05:44:03 +0000 (06:44 +0100)]
Rollup merge of #94676 - TaKO8Ki:remove-unnecessary-pattens-for-ignoring-remaining-parts, r=Dylan-DPC

Remove unnecessary `..` patterns

This patch removes unnecessary `..` patterns.

2 years agoRollup merge of #94636 - compiler-errors:issue-94599, r=davidtwco
Matthias Krüger [Mon, 7 Mar 2022 05:44:02 +0000 (06:44 +0100)]
Rollup merge of #94636 - compiler-errors:issue-94599, r=davidtwco

Check extra function arg exprs even if the fn is not C-variadic

We should still call check_expr on the args that exceed the formal input ty count, so that we have expr types to emit during writeback.

Not sure where this regressed, but it wasn't due to the same root cause as #94334 I think. I thought this might've regressed in #92360, but I think that is in stable, ad the test I provided (which minimizes #94599) passes on stable in playground. Maybe it regressed in #93118.

Anywho, fixes #94599.

2 years agoAuto merge of #94272 - tavianator:readdir-reclen-for-real, r=cuviper
bors [Mon, 7 Mar 2022 04:48:23 +0000 (04:48 +0000)]
Auto merge of #94272 - tavianator:readdir-reclen-for-real, r=cuviper

fs: Don't dereference a pointer to a too-small allocation

ptr::addr_of!((*ptr).field) still requires ptr to point to an
appropriate allocation for its type.  Since the pointer returned by
readdir() can be smaller than sizeof(struct dirent), we need to entirely
avoid dereferencing it as that type.

Link: https://github.com/rust-lang/miri/pull/1981#issuecomment-1048278492
Link: https://github.com/rust-lang/rust/pull/93459#discussion_r795089971
2 years agoClarify `Layout` interning.
Nicholas Nethercote [Fri, 4 Mar 2022 02:46:56 +0000 (13:46 +1100)]
Clarify `Layout` interning.

`Layout` is another type that is sometimes interned, sometimes not, and
we always use references to refer to it so we can't take any advantage
of the uniqueness properties for hashing or equality checks.

This commit renames `Layout` as `LayoutS`, and then introduces a new
`Layout` that is a newtype around an `Interned<LayoutS>`. It also
interns more layouts than before. Previously layouts within layouts
(via the `variants` field) were never interned, but now they are. Hence
the lifetime on the new `Layout` type.

Unlike other interned types, these ones are in `rustc_target` instead of
`rustc_middle`. This reflects the existing structure of the code, which
does layout-specific stuff in `rustc_target` while `TyAndLayout` is
generic over the `Ty`, allowing the type-specific stuff to occur in
`rustc_middle`.

The commit also adds a `HashStable` impl for `Interned`, which was
needed. It hashes the contents, unlike the `Hash` impl which hashes the
pointer.

2 years agoAuto merge of #94638 - erikdesjardins:noextranull, r=nagisa
bors [Mon, 7 Mar 2022 02:07:36 +0000 (02:07 +0000)]
Auto merge of #94638 - erikdesjardins:noextranull, r=nagisa

cleanup: remove unused ability to have LLVM null-terminate const strings

(and the copied function in rustc_codegen_gcc)

Noticed this while writing https://github.com/rust-lang/rust/pull/94450#issuecomment-1059687348.

r? `@nagisa`

2 years agoErase regions when checking for missing Copy predicates
Michael Goulet [Mon, 7 Mar 2022 01:21:39 +0000 (17:21 -0800)]
Erase regions when checking for missing Copy predicates

2 years agouse singed_int_max/min helper methods
Ralf Jung [Mon, 7 Mar 2022 00:11:31 +0000 (19:11 -0500)]
use singed_int_max/min helper methods

2 years agomove saturating_add/sub into (pub) helper method
Ralf Jung [Mon, 7 Mar 2022 00:09:22 +0000 (19:09 -0500)]
move saturating_add/sub into (pub) helper method

2 years agoFix rustdoc for GATs with with anonymous bound regions
Michael Goulet [Sun, 6 Mar 2022 23:56:29 +0000 (15:56 -0800)]
Fix rustdoc for GATs with with anonymous bound regions

2 years agoAuto merge of #94597 - nnethercote:ConstAllocation, r=fee1-dead
bors [Sun, 6 Mar 2022 22:37:54 +0000 (22:37 +0000)]
Auto merge of #94597 - nnethercote:ConstAllocation, r=fee1-dead

Introduce `ConstAllocation`.

Currently some `Allocation`s are interned, some are not, and it's very
hard to tell at a use point which is which.

This commit introduces `ConstAllocation` for the known-interned ones,
which makes the division much clearer. `ConstAllocation::inner()` is
used to get the underlying `Allocation`.

In some places it's natural to use an `Allocation`, in some it's natural
to use a `ConstAllocation`, and in some places there's no clear choice.
I've tried to make things look as nice as possible, while generally
favouring `ConstAllocation`, which is the type that embodies more
information. This does require quite a few calls to `inner()`.

The commit also tweaks how `PartialOrd` works for `Interned`. The
previous code was too clever by half, building on `T: Ord` to make the
code shorter. That caused problems with deriving `PartialOrd` and `Ord`
for `ConstAllocation`, so I changed it to build on `T: PartialOrd`,
which is slightly more verbose but much more standard and avoided the
problems.

r? `@fee1-dead`

2 years agoIntroduce `ConstAllocation`.
Nicholas Nethercote [Tue, 1 Mar 2022 20:15:04 +0000 (07:15 +1100)]
Introduce `ConstAllocation`.

Currently some `Allocation`s are interned, some are not, and it's very
hard to tell at a use point which is which.

This commit introduces `ConstAllocation` for the known-interned ones,
which makes the division much clearer. `ConstAllocation::inner()` is
used to get the underlying `Allocation`.

In some places it's natural to use an `Allocation`, in some it's natural
to use a `ConstAllocation`, and in some places there's no clear choice.
I've tried to make things look as nice as possible, while generally
favouring `ConstAllocation`, which is the type that embodies more
information. This does require quite a few calls to `inner()`.

The commit also tweaks how `PartialOrd` works for `Interned`. The
previous code was too clever by half, building on `T: Ord` to make the
code shorter. That caused problems with deriving `PartialOrd` and `Ord`
for `ConstAllocation`, so I changed it to build on `T: PartialOrd`,
which is slightly more verbose but much more standard and avoided the
problems.

2 years agoAuto merge of #94679 - matthiaskrgr:rollup-9vd7w6a, r=matthiaskrgr
bors [Sun, 6 Mar 2022 20:21:35 +0000 (20:21 +0000)]
Auto merge of #94679 - matthiaskrgr:rollup-9vd7w6a, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #94659 (explain why shift with signed offset works the way it does)
 - #94671 (fix pin doc typo)
 - #94672 (Improved error message for failed bitcode load)

Failed merges:

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

2 years agoCTFE engine: expose misc_cast to Miri
Ralf Jung [Sun, 6 Mar 2022 19:01:01 +0000 (14:01 -0500)]
CTFE engine: expose misc_cast to Miri

2 years agoRollup merge of #94672 - joedeandev:master, r=Dylan-DPC
Matthias Krüger [Sun, 6 Mar 2022 18:08:39 +0000 (19:08 +0100)]
Rollup merge of #94672 - joedeandev:master, r=Dylan-DPC

Improved error message for failed bitcode load

"bc" is an unnecessary shorthand that obfuscates the compilation error

2 years agoRollup merge of #94671 - csmoe:pin-typo, r=m-ou-se
Matthias Krüger [Sun, 6 Mar 2022 18:08:38 +0000 (19:08 +0100)]
Rollup merge of #94671 - csmoe:pin-typo, r=m-ou-se

fix pin doc typo

r? `@m-ou-se`

2 years agoRollup merge of #94659 - RalfJung:signed-shift, r=oli-obk
Matthias Krüger [Sun, 6 Mar 2022 18:08:37 +0000 (19:08 +0100)]
Rollup merge of #94659 - RalfJung:signed-shift, r=oli-obk

explain why shift with signed offset works the way it does

I was worried for a bit here that Miri/CTFE would be inconsistent with codegen, but I *think* everything is all right, actually.

Cc `@oli-obk` `@eddyb`

2 years agoAuto merge of #94579 - tmiasko:target-features, r=nagisa
bors [Sun, 6 Mar 2022 18:07:11 +0000 (18:07 +0000)]
Auto merge of #94579 - tmiasko:target-features, r=nagisa

Always include global target features in function attributes

This ensures that information about target features configured with
`-C target-feature=...` or detected with `-C target-cpu=native` is
retained for subsequent consumers of LLVM bitcode.

This is crucial for linker plugin LTO, since this information is not
conveyed to the plugin otherwise.

<details><summary>Additional test case demonstrating the issue</summary>

```rust
extern crate core;

#[inline]
#[target_feature(enable = "aes")]
unsafe fn f(a: u128, b: u128) -> u128 {
    use core::arch::x86_64::*;
    use core::mem::transmute;
    transmute(_mm_aesenc_si128(transmute(a), transmute(b)))
}

pub fn g(a: u128, b: u128) -> u128 {
    unsafe { f(a, b) }
}

fn main() {
    let mut args = std::env::args();
    let _ = args.next().unwrap();
    let a: u128 = args.next().unwrap().parse().unwrap();
    let b: u128 = args.next().unwrap().parse().unwrap();
    println!("{}", g(a, b));
}
```

```console
$ rustc --edition=2021 a.rs -Clinker-plugin-lto -Clink-arg=-fuse-ld=lld  -Ctarget-feature=+aes -O
...
  = note: LLVM ERROR: Cannot select: intrinsic %llvm.x86.aesni.aesenc
```

</details>

r? `@nagisa`

2 years agocleanup: remove unused ability to have LLVM null-terminate const strings
Erik Desjardins [Sat, 5 Mar 2022 04:14:38 +0000 (23:14 -0500)]
cleanup: remove unused ability to have LLVM null-terminate const strings

2 years agoremove unnecessary `..` patterns
Takayuki Maeda [Sun, 6 Mar 2022 17:18:36 +0000 (02:18 +0900)]
remove unnecessary `..` patterns

2 years agoexplain why shift with signed offset works the way it does
Ralf Jung [Sun, 6 Mar 2022 03:47:31 +0000 (22:47 -0500)]
explain why shift with signed offset works the way it does

2 years agoAuto merge of #94673 - matthiaskrgr:rollup-2tnifg9, r=matthiaskrgr
bors [Sun, 6 Mar 2022 15:26:21 +0000 (15:26 +0000)]
Auto merge of #94673 - matthiaskrgr:rollup-2tnifg9, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #93412 (Improve rustdoc const bounds)
 - #94617 (Update `itertools`)
 - #94669 (Update -Z unpretty error message)

Failed merges:

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

2 years agoUpdated corresponding stderr
Joe [Sun, 6 Mar 2022 15:14:07 +0000 (16:14 +0100)]
Updated corresponding stderr

2 years agoRollup merge of #94669 - Alexendoo:unpretty-help, r=tmiasko
Matthias Krüger [Sun, 6 Mar 2022 14:41:27 +0000 (15:41 +0100)]
Rollup merge of #94669 - Alexendoo:unpretty-help, r=tmiasko

Update -Z unpretty error message

Adds `thir-tree`, removes `everybody_loops` (removed in #93913)

2 years agoRollup merge of #94617 - pierwill:update-itertools, r=Mark-Simulacrum
Matthias Krüger [Sun, 6 Mar 2022 14:41:26 +0000 (15:41 +0100)]
Rollup merge of #94617 - pierwill:update-itertools, r=Mark-Simulacrum

Update `itertools`

Update to 0.10.1

2 years agoRollup merge of #93412 - fee1-dead:improve-rustdoc-const-bounds, r=GuillaumeGomez
Matthias Krüger [Sun, 6 Mar 2022 14:41:26 +0000 (15:41 +0100)]
Rollup merge of #93412 - fee1-dead:improve-rustdoc-const-bounds, r=GuillaumeGomez

Improve rustdoc const bounds

 - Rustdoc no longer displays `~const` in trait bounds, because it currently means nothing for stable users, and because we still haven't decided on the final syntax yet.
 - Rustdoc will hide trait bounds where the trait is `Drop` AND it is `~const`, i.e. `~const Drop` bounds because it has no effect on stable users as well.
 - Because of additional logic that hides the whole `where` statement where it consists of `~const Drop` bounds (so it doesn't display `struct Foo<T>() where ;` like that), bounds that have no trait e.g. `where [T; N+1]: ;` are also hidden.

Cherry-picked from #92433.

2 years agoImproved error message for failed bitcode load
Joe [Sun, 6 Mar 2022 14:25:05 +0000 (15:25 +0100)]
Improved error message for failed bitcode load

"bc" is an unnecessary shorthand that obfuscates the compilation error

2 years agofix pin doc typo
csmoe [Sun, 6 Mar 2022 13:40:30 +0000 (21:40 +0800)]
fix pin doc typo

2 years agoAuto merge of #94668 - fee1-dead:rollup-8e92bht, r=fee1-dead
bors [Sun, 6 Mar 2022 12:57:32 +0000 (12:57 +0000)]
Auto merge of #94668 - fee1-dead:rollup-8e92bht, r=fee1-dead

Rollup of 3 pull requests

Successful merges:

 - #92509 (doc: `Iterator::partition` use partial type hints)
 - #94621 (rustbuild: support RelWithDebInfo for lld)
 - #94649 (Unix path::absolute: Fix leading "." component)

Failed merges:

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

2 years agoUpdate -Z unpretty error message
Alex Macleod [Sun, 6 Mar 2022 12:43:30 +0000 (12:43 +0000)]
Update -Z unpretty error message

Adds `thir-tree`, removes `everybody_loops`

2 years agoRollup merge of #94649 - ChrisDenton:unix-absolute-fix, r=Dylan-DPC
fee1-dead [Sun, 6 Mar 2022 11:35:31 +0000 (22:35 +1100)]
Rollup merge of #94649 - ChrisDenton:unix-absolute-fix, r=Dylan-DPC

Unix path::absolute: Fix leading "." component

Testing leading `.` and `..` components were missing from the unix tests.

This PR adds them and fixes the leading `.` case. It also fixes the test cases so that they do an exact comparison.

This problem reported by ``@axetroy``

2 years agoRollup merge of #94621 - ridwanabdillahi:lld-rel-dbg, r=Mark-Simulacrum
fee1-dead [Sun, 6 Mar 2022 11:35:30 +0000 (22:35 +1100)]
Rollup merge of #94621 - ridwanabdillahi:lld-rel-dbg, r=Mark-Simulacrum

rustbuild: support RelWithDebInfo for lld

r? ``@alexcrichton``

LLVM has flags that control the level of debuginfo generated when building via rustbuild. Since LLD is built separately, it currently has no way of generating any debuginfo. This change re-uses the same flags as LLVM for LLD to ensure it has the same level of debuginfo generated as LLVM.

2 years agoRollup merge of #92509 - Gentoli:partition-ex, r=camelid
fee1-dead [Sun, 6 Mar 2022 11:35:29 +0000 (22:35 +1100)]
Rollup merge of #92509 - Gentoli:partition-ex, r=camelid

doc: `Iterator::partition` use partial type hints

Switch to partial type hints to indicate only the collection type is needed.

2 years agoAuto merge of #90076 - jackh726:wherethewhere, r=nikomatsakis
bors [Sun, 6 Mar 2022 07:22:09 +0000 (07:22 +0000)]
Auto merge of #90076 - jackh726:wherethewhere, r=nikomatsakis

Change location of where clause on GATs

Closes #89122

~Blocked on lang FCP~

r? `@nikomatsakis`

2 years agoAuto merge of #94658 - RalfJung:miri, r=RalfJung
bors [Sun, 6 Mar 2022 04:41:25 +0000 (04:41 +0000)]
Auto merge of #94658 - RalfJung:miri, r=RalfJung

update Miri

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

2 years agoupdate Miri
Ralf Jung [Sun, 6 Mar 2022 03:44:34 +0000 (22:44 -0500)]
update Miri

2 years agoIgnore
Jack Huey [Sun, 6 Mar 2022 00:38:53 +0000 (19:38 -0500)]
Ignore

2 years agoAuto merge of #93805 - petrochenkov:doclinkself, r=camelid,GuillaumeGomez
bors [Sun, 6 Mar 2022 02:14:49 +0000 (02:14 +0000)]
Auto merge of #93805 - petrochenkov:doclinkself, r=camelid,GuillaumeGomez

rustdoc: Stop textually replacing `Self` in doc links before resolving them

Resolve it directly to a type / def-id instead.

Also never pass `Self` to `Resolver`, it is useless because it's guaranteed that no resolution will be found.

This is a pre-requisite for https://github.com/rust-lang/rust/issues/83761.

2 years agodoc: `Iterator::partition` use partial type hints
Gentoli [Mon, 3 Jan 2022 11:25:42 +0000 (06:25 -0500)]
doc: `Iterator::partition` use partial type hints

2 years agoAuto merge of #94601 - csmoe:android-asan, r=nagisa
bors [Sat, 5 Mar 2022 22:52:08 +0000 (22:52 +0000)]
Auto merge of #94601 - csmoe:android-asan, r=nagisa

add address sanitizer fo android

We have been being using asan to debug the rust/cpp/c mixed android application in production for months: recompile the rust library with a patched rustc, everything just works fine. The patch is really small thanks to `@nagisa` 's refactoring in https://github.com/rust-lang/rust/pull/81866

r? `@nagisa`

2 years agoAuto merge of #94648 - RalfJung:rollup-4iorcrd, r=RalfJung
bors [Sat, 5 Mar 2022 19:53:45 +0000 (19:53 +0000)]
Auto merge of #94648 - RalfJung:rollup-4iorcrd, r=RalfJung

Rollup of 4 pull requests

Successful merges:

 - #94630 (Update note about tier 2 docs.)
 - #94633 (Suggest removing a semicolon after derive attributes)
 - #94642 (Fix source code pages scroll)
 - #94645 (do not attempt to open cgroup files under Miri)

Failed merges:

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

2 years agoAdd commment covering the case with no where clause
Jack Huey [Sat, 5 Mar 2022 04:21:33 +0000 (23:21 -0500)]
Add commment covering the case with no where clause

2 years agoUpdate new tests
Jack Huey [Mon, 14 Feb 2022 19:10:01 +0000 (14:10 -0500)]
Update new tests

2 years agoReview changes
Jack Huey [Mon, 14 Feb 2022 18:00:10 +0000 (13:00 -0500)]
Review changes