Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #120436

Closed
wants to merge 25 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joshlf and others added 25 commits October 12, 2023 15:35
Co-authored-by: Ralf Jung <post@ralfj.de>
General improvements, and also aims to better encourage the reader
to actually check out Arc::try_unwrap.
Currently, when building with `build-std`, some library build scripts
check properties of the target by inspecting the target triple at
`env::TARGET`, which is simply set to the filename of the JSON file
when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to
fetch target information instead, allowing JSON target files
describing platforms without `restricted_std` to build correctly when
using `-Z build-std`.

Fixes wg-cargo-std-aware/rust-lang#60.
…trochenkov

Suppress unhelpful diagnostics for unresolved top level attributes

Fixes rust-lang#118455, unresolved top level attribute error didn't imported prelude and already have emitted an error, report builtin macro and attributes error by the way, so `check_invalid_crate_level_attr` in can ignore them.

Also fixes rust-lang#89566, fixes rust-lang#67107.

r? `@petrochenkov`
Improve handling of expressions in patterns

Closes rust-lang#112593.

Methodcalls' dots in patterns are silently recovered as commas (e.g. `Foo("".len())` -> `Foo("", len())`) so extra diagnostics are emitted:
```rs
struct Foo(u8, String, u8);

fn bar(foo: Foo) -> bool {
    match foo {
        Foo(4, "yippee".yeet(), 7) => true,
        _ => false
    }
}
```
```
error: expected one of `)`, `,`, `...`, `..=`, `..`, or `|`, found `.`
 --> main.rs:5:24
  |
5 |         Foo(4, "yippee".yeet(), 7) => true,
  |                        ^
  |                        |
  |                        expected one of `)`, `,`, `...`, `..=`, `..`, or `|`
  |                        help: missing `,`

error[E0531]: cannot find tuple struct or tuple variant `yeet` in this scope
 --> main.rs:5:25
  |
5 |         Foo(4, "yippee".yeet(), 7) => true,
  |                         ^^^^ not found in this scope

error[E0023]: this pattern has 4 fields, but the corresponding tuple struct has 3 fields
 --> main.rs:5:13
  |
1 | struct Foo(u8, String, u8);
  |            --  ------  -- tuple struct has 3 fields
...
5 |         Foo(4, "yippee".yeet(), 7) => true,
  |             ^  ^^^^^^^^ ^^^^^^  ^ expected 3 fields, found 4

error: aborting due to 3 previous errors
```

This PR checks for patterns that ends with a dot and a lowercase ident (as structs/variants should be uppercase):
```
error: expected a pattern, found a method call
 --> main.rs:5:16
  |
5 |         Foo(4, "yippee".yeet(), 7) => true,
  |                ^^^^^^^^^^^^^^^ method calls are not allowed in patterns

error: aborting due to 1 previous error
```

Also check for expressions:
```rs
fn is_idempotent(x: f32) -> bool {
    match x {
        x * x => true,
        _ => false,
    }
}

fn main() {
    let mut t: [i32; 5];
    let t[0] = 1;
}
```
```
error: expected a pattern, found an expression
 --> main.rs:3:9
  |
3 |         x * x => true,
  |         ^^^^^ arbitrary expressions are not allowed in patterns

error: expected a pattern, found an expression
  --> main.rs:10:9
   |
10 |     let t[0] = 1;
   |         ^^^^ arbitrary expressions are not allowed in patterns
```

Would be cool if the compiler could suggest adding a guard for `match`es, but I've no idea how to do it.

---
`@rustbot` label +A-diagnostics +A-parser +A-patterns +C-enhancement
Add support for custom JSON targets when using build-std.

Currently, when building with `build-std`, some library build scripts check properties of the target by inspecting the target triple at `env::TARGET`, which is simply set to the filename of the JSON file when using JSON target files.

This patch alters these build scripts to use `env::CARGO_CFG_*` to fetch target information instead, allowing JSON target files describing platforms without `restricted_std` to build correctly when using `-Z build-std`. There are some weak assertions here (for example, `nintendo && newlib`), however this seems at least a marginal improvement on the existing solution.

Fixes rust-lang/wg-cargo-std-aware#60.
…, r=Mark-Simulacrum

Always check the result of `pthread_mutex_lock`

Fixes rust-lang#120147.

Instead of manually adding a list of "good" platforms, I've simply made the check unconditional. pthread's mutex is already quite slow on most platforms, so one single well-predictable branch shouldn't hurt performance too much.
…ark-Simulacrum

Improve documentation for [A]Rc::into_inner

General improvements, and also aims to better encourage the reader to actually check out Arc::try_unwrap.

This addresses concerns from rust-lang#106894 (comment).

Rendered:

![Screenshot_20240123_114436](https://github.com/rust-lang/rust/assets/3986214/68896d62-13e0-4f3a-8073-91d8e77c5554)
![Screenshot_20240123_114455](https://github.com/rust-lang/rust/assets/3986214/dc58e4bd-dd7f-40b1-bc50-fd6200dde593)
…120040, r=ChrisDenton

Adjust Behaviour of `read_dir` and `ReadDir` in Windows Implementation: Check Whether Path to Search In Exists

This pull request changes the `read_dir` function's and the `ReadDir` structure's internal implementations for the Windows operating system to make its behaviour more accurate.

It should be noted that `ERROR_FILE_NOT_FOUND` is returned by the `FindFirstFileW` function when *no matching files can be found*, not necessarily that the path to search in does not exist in the first place. Therefore, directly returning the "The system cannot find the file specified." may not be accurate.

An extra check for whether the path to search in exists is added, returning a constructed `ReadDir` iterator with its handle being an `INVALID_HANDLE_VALUE` returned by the `FindFirstFileW` function if `ERROR_FILE_NOT_FOUND` is indeed the last OS error. The `ReadDir` implementation for the Windows operating system is correspondingly updated to always return `None` if the handle it has is an `INVALID_HANDLE_VALUE` which can only be the case if and only if specifically constructed by the `read_dir` function in the aforementioned conditions.

It should also be noted that `FindFirstFileW` would have returned `ERROR_PATH_NOT_FOUND` if the path to search in does not exist in the first place.

Presumably fixes rust-lang#120040.
@rustbot rustbot added O-unix Operating system: Unix-like O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 28, 2024
@rustbot rustbot added the rollup A PR which is a rollup label Jan 28, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Jan 28, 2024

📌 Commit 54c7a7b has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 28, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-16 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
GITHUB_ENV=/home/runner/work/_temp/_runner_file_commands/set_env_dd999db7-8755-4ffd-9c2b-77612b63d15e
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=/home/runner/work/_temp/_github_workflow/event.json
GITHUB_GRAPHQL_URL=https://api.github.com/graphql
GITHUB_HEAD_REF=rollup-ujaargi
GITHUB_JOB=pr
GITHUB_PATH=/home/runner/work/_temp/_runner_file_commands/add_path_dd999db7-8755-4ffd-9c2b-77612b63d15e
GITHUB_REF=refs/pull/120436/merge
GITHUB_REF_NAME=120436/merge
GITHUB_REF_PROTECTED=false
---
Built container sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Looks like docker image is the same as before, not uploading
https://ci-caches.rust-lang.org/docker/7ebc15c01a233894034d277c8cce4e949f4e7791f66b4727c8fb6e058a0b8171d6152e1441d677cef0653843ceeee469c097b8699b2bb74249e674f6aa1a8813
sha256:9c3c93a371e5aed5c18185b24f130d95d5140dbd72a9b325e7b6b49e521a4faa
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-16]
##[group]Clock drift check
  local time: Sun Jan 28 03:49:56 UTC 2024
  network time: Sun, 28 Jan 2024 03:49:56 GMT
  network time: Sun, 28 Jan 2024 03:49:56 GMT
##[endgroup]
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-16', '--enable-llvm-link-shared', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'build.optimized-compiler-builtins', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-16/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.thin-lto-import-instr-limit := 10
configure: change-id            := 99999999
---
---- [ui] tests/ui/half-open-range-patterns/range_pat_interactions1.rs stdout ----
diff of stderr:

53    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
54    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
55    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
57 error[E0658]: exclusive range pattern syntax is experimental
58   --> $DIR/range_pat_interactions1.rs:22:17

63    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
63    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
64    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
65    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
67 error[E0658]: exclusive range pattern syntax is experimental
68   --> $DIR/range_pat_interactions1.rs:24:18

73    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
73    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
74    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
75    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
77 error[E0658]: exclusive range pattern syntax is experimental
78   --> $DIR/range_pat_interactions1.rs:26:17

83    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
83    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
84    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
85    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
87 error[E0658]: exclusive range pattern syntax is experimental
88   --> $DIR/range_pat_interactions1.rs:30:17

93    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
93    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
94    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
95    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
97 error: aborting due to 10 previous errors
98 


---
--- stderr -------------------------------
error: expected a pattern range bound, found an expression
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:19:16
   |
LL |             0..5+1 => errors_only.push(x),
   |                ^^^ arbitrary expressions are not allowed in patterns
error[E0408]: variable `n` is not bound in all patterns
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:10:25
   |
   |
LL |         if let n @ 2..3|4 = x {
   |                -        ^ pattern doesn't bind `n`
   |                variable not in all patterns

error[E0658]: inline-const in pattern position is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:26:20
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:26:20
   |
LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
   |
   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:10:20
   |
   |
LL |         if let n @ 2..3|4 = x {
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:14:23
   |
   |
LL |         } else if let 2..3 | 4 = x {
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:19:13
   |
   |
LL |             0..5+1 => errors_only.push(x),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:22:17
   |
   |
LL |             1 | -3..0 => first_or.push(x),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:24:18
   |
   |
LL |             y @ (0..5 | 6) => or_two.push(y),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:26:17
   |
   |
LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions1.rs:30:17
   |
   |
LL |             y @ ..-7 => assert_eq!(y, -8),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error: aborting due to 10 previous errors

Some errors have detailed explanations: E0408, E0658.
For more information about an error, try `rustc --explain E0408`.
For more information about an error, try `rustc --explain E0408`.
------------------------------------------


---- [ui] tests/ui/half-open-range-patterns/range_pat_interactions2.rs stdout ----
diff of stderr:

35    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
36    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
37    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
39 error[E0658]: exclusive range pattern syntax is experimental
40   --> $DIR/range_pat_interactions2.rs:15:18

45    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
45    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
46    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
47    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
49 error[E0658]: exclusive range pattern syntax is experimental
50   --> $DIR/range_pat_interactions2.rs:17:17

55    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
55    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
56    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
57    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
59 error[E0658]: exclusive range pattern syntax is experimental
60   --> $DIR/range_pat_interactions2.rs:21:17

65    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
65    = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
66    = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
67    = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+    = help: use an inclusive range pattern, like N..=M
69 error: aborting due to 7 previous errors
70 


---
--- stderr -------------------------------
error: expected a pattern range bound, found an expression
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:10:18
   |
LL |             0..=(5+1) => errors_only.push(x),
   |                  ^^^ arbitrary expressions are not allowed in patterns
error: range pattern bounds cannot have parentheses
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:10:17
   |
   |
LL |             0..=(5+1) => errors_only.push(x),
   |                 ^   ^
help: remove these parentheses
   |
   |
LL -             0..=(5+1) => errors_only.push(x),
LL +             0..=5+1 => errors_only.push(x),

error[E0658]: inline-const in pattern position is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:17:20
   |
   |
LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
   |
   = note: see issue #76001 <https://github.com/rust-lang/rust/issues/76001> for more information
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
   = help: add `#![feature(inline_const_pat)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:13:17
   |
   |
LL |             1 | -3..0 => first_or.push(x),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:15:18
   |
   |
LL |             y @ (0..5 | 6) => or_two.push(y),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:17:17
   |
   |
LL |             y @ 0..const { 5 + 1 } => assert_eq!(y, 5),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error[E0658]: exclusive range pattern syntax is experimental
##[error]  --> /checkout/tests/ui/half-open-range-patterns/range_pat_interactions2.rs:21:17
   |
   |
LL |             y @ ..-7 => assert_eq!(y, -8),
   |
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = note: see issue #37854 <https://github.com/rust-lang/rust/issues/37854> for more information
   = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: use an inclusive range pattern, like N..=M
error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0658`.
------------------------------------------

@matthiaskrgr
Copy link
Member Author

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 28, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-ujaargi branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-unix Operating system: Unix-like O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.