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 9 pull requests #109019

Merged
merged 29 commits into from
Mar 11, 2023
Merged

Rollup of 9 pull requests #109019

merged 29 commits into from
Mar 11, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

c410-f3r and others added 29 commits January 9, 2023 09:30
(how come we didn't have one already??)
…rieb

Make `unused_allocation` lint against `Box::new` too

Previously it only linted against `box` syntax, which likely won't ever be stabilized, which is pretty useless. Even now I'm not sure if it's a meaningful lint, but it's at least something 🤷

This means that code like the following will be linted against:
```rust
Box::new([1, 2, 3]).len();
f(&Box::new(1)); // where f : &i32 -> ()
```
The lint works by checking if a `Box::new` (or `box`) expression has an a borrow adjustment, meaning that the code that first stores the box in a variable won't be linted against:
```rust
let boxed = Box::new([1, 2, 3]); // no lint
boxed.len();
```
…=dtolnay

Stabilize `nonzero_min_max`

## Overall

Stabilizes `nonzero_min_max` to allow the "infallible" construction of ordinary minimum and maximum `NonZero*` instances.

The feature is fairly straightforward and already matured for some time in stable toolchains.

```rust
let _ = NonZeroU8::MIN;
let _ = NonZeroI32::MAX;
```

## History

* On 2022-01-25, implementation was [created](rust-lang#93293).

## Considerations

* This report is fruit of the inanition observed after two unsuccessful attempts at getting feedback.
* Other constant variants discussed at rust-lang#89065 (comment) are orthogonal to this feature.

Fixes rust-lang#89065
…r=dtolnay

allow negative numeric literals in `concat!`

Fixes rust-lang#106837

While *technically* negative numeric literals are implemented as unary operations, users can reasonably expect that negative literals are treated the same as positive literals.
…, r=lcnr

Implement goal caching with the new solver

Maybe it's wrong, idk. Opening mostly for first impressions before I go to sleep.

r? ``@lcnr,`` cc ``@cjgillot``
Force parentheses around `match` expression in binary expression

This attempts to solve rust-lang#98790.
Place size limits on query keys and values

This just prevents these from growing accidentally too large. I'm not sure if there's an easy way to also print the actual size too.
…u-se

Prevent overflow through Arc::downgrade

Fixes rust-lang#108706
Prevent the `start_bx` basic block in codegen from having two `Builder`s at the same time

Here, at the same time, there are two `start_llbb` builder, this should be unexpected.
Querify register_tools and post-expansion early lints

The 2 extra queries correspond to code that happen before and after macro expansion, and don't need the resolver to exist.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2023
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Mar 11, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Mar 11, 2023

📌 Commit df50001 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 Mar 11, 2023
@bors
Copy link
Contributor

bors commented Mar 11, 2023

⌛ Testing commit df50001 with merge 8a73f50...

@bors
Copy link
Contributor

bors commented Mar 11, 2023

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 8a73f50 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 11, 2023
@bors bors merged commit 8a73f50 into rust-lang:master Mar 11, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8a73f50): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.5%, -0.5%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.9% [3.0%, 5.3%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-4.2%, -0.9%] 10
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.2%, 2.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

@matthiaskrgr matthiaskrgr deleted the rollup-ihjntil 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
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.