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 6 pull requests #118687

Merged
merged 17 commits into from
Dec 7, 2023
Merged

Rollup of 6 pull requests #118687

merged 17 commits into from
Dec 7, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Arlie Davis and others added 17 commits November 22, 2023 09:10
Version 0.2.150 include support for the new check-cfg syntax
Two places called `from_utf8_unchecked` for strings from `alloc_slice`,
and one's SAFETY comment said this was for lack of `alloc_str` -- so
let's just add that instead!
Change the implementation of `Instance::is_foreign_item` to directly
query the compiler for the instance `def_id` instead of incorrectly
relying on the conversion to `CrateItem`.

Background:

- In pull rust-lang#118524, I fixed the
  conversion from Instance to CrateItem to avoid the conversion if the
  instance didn't have a body available. This broke the `is_foreign_item`.
This is much cheaper than building a body just for the purpose of
checking if the body exists.
…syntax, r=b-naber

Remove deprecated `--check-cfg` syntax

This PR removes the deprecated `--check-cfg` `names(...)` and `values(...)` syntax.

Follow up to rust-lang#111072
Part of rust-lang/compiler-team#636

r? compiler
… r=cuviper

Suppress warnings in LLVM wrapper when targeting MSVC

The LLVM header files generate many warnings when compiled using MSVC. This makes it difficult to work on the LLVM wrapper code, because the warnings and errors that are relevant to local edits are obscured by the hundreds of lines of warnings from the LLVM Headers.
tip for define macro name after `macro_rules!`

Fixes rust-lang#118295

~Note that there are some bad case such as `macro_rules![]` or `macro_rules!()`. However, I think these are acceptable as they are likely to be seldom used (feel free to close this if you think its shortcomings outweigh its benefits)~

Edit: this problem was resolved by utilizing the `source_map.span_to_next_source`.

r? `@petrochenkov`
…Lapkin

Enforce `must_use` on associated types and RPITITs that have a must-use trait in bounds

Warn when an RPITIT or (un-normalized) associated type with a `#[must_use]` trait in its bounds is unused.

This is pending T-lang approval, since it changes the semantics of the `#[must_use]` attribute slightly, but I think it strictly catches more strange errors.

I could also limit this to just RPITITs, but that seems less useful.

Fixes rust-lang#118444
rustc_arena: add `alloc_str`

Two places called `from_utf8_unchecked` for strings from `alloc_slice`,
and one's SAFETY comment said this was for lack of `alloc_str` -- so
let's just add that instead!
Fix is_foreign_item for StableMIR instance

Change the implementation of `Instance::is_foreign_item` to directly query the compiler for the instance `def_id` instead of incorrectly relying on the conversion to `CrateItem`. I also added a method to check if the instance has body, since the function already existed and it just wasn't exposed via public APIs. This makes it much cheaper for the user to check if the instance has body.

## Background:

- In pull rust-lang#118524, I fixed the conversion from Instance to CrateItem to avoid the conversion if the instance didn't have a body available. This broke the `is_foreign_item`.

r? `@ouz-a`
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 6, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Dec 6, 2023

📌 Commit 3c1357c 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 Dec 6, 2023
@bors
Copy link
Contributor

bors commented Dec 6, 2023

⌛ Testing commit 3c1357c with merge 8235469...

@bors
Copy link
Contributor

bors commented Dec 7, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 7, 2023
@bors bors merged commit 8235469 into rust-lang:master Dec 7, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 7, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#117981 Remove deprecated --check-cfg syntax 3773c70b28108cca7d8d3d0d1dc2bd542c86076c (link)
#118177 Suppress warnings in LLVM wrapper when targeting MSVC e1c59188d18a681903209ee9f00a7fe43cba635b (link)
#118317 tip for define macro name after macro_rules! d6a436ceba3db2fdbeabe454a00ad9fa97ecfc3e (link)
#118504 Enforce must_use on associated types and RPITITs that hav… 4200b876000e1b002a2ce21869db86db0af8f45a (link)
#118660 rustc_arena: add alloc_str 688854369bb4ae7c6e44754745f95948489a6be6 (link)
#118681 Fix is_foreign_item for StableMIR instance 419e0e17cc3e3f47314b94bf015efdd17ae260db (link)

previous master: 1fdfe12347

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8235469): 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)
-4.8% [-8.7%, -1.2%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.8% [-8.7%, -1.2%] 3

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.7% [3.6%, 3.7%] 2
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

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)
- - 0
Improvements ✅
(primary)
-4.5% [-7.8%, -1.1%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.5% [-7.8%, -1.1%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 676.286s -> 674.39s (-0.28%)
Artifact size: 314.18 MiB -> 314.17 MiB (-0.00%)

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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants