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 11 pull requests #102926

Merged
merged 143 commits into from
Oct 11, 2022
Merged

Rollup of 11 pull requests #102926

merged 143 commits into from
Oct 11, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lowr and others added 30 commits September 9, 2022 16:47
Specifically as it relates to the ABA problem.
Simplify feature representation in CargoConfig
Remove reference to Toggle inlay hints

This simply removes the reference to the `Toggle inlay hints` action after its removal in rust-lang/rust-analyzer#13215.
In fact, this reference is still visible [in the User Manual here](https://rust-analyzer.github.io/manual.html#inlay-hints).
…ykril

Ensure at least one trait bound in `TyKind::DynTy`

One would expect `TyKind::DynTy` to have at least one trait bound, but we may produce a dyn type with no trait bounds at all. This patch prevents it by returning `TyKind::Error` in such cases.

An "empty" dyn type would have caused panic during method resolution without rust-lang#13257. Although already fixed, I think an invariant to never produce such types would help prevent similar problems in the future.
feat: Display the value of enum variant on hover

fixes rust-lang#12955

This PR adds const eval support for enums, as well as showing their value on hover, just as consts currently have.

I developed these two things at the same time, but I've realized now that they are separate. However since the hover is just a 10 line change (not including tests), I figured I may as well put them in the same PR. Though if you want them split up into "enum const eval support"  and "show enum variant value on hover", I think that's reasonable too.

Since this adds const eval support for enums this also allows consts that reference enums to have their values computed now too.

The const evaluation itself is quite rudimentary, it doesn't keep track of the actual type of the enum, but it turns out that Rust doesn't actually either, and `E::A as u8` is valid regardless of the `repr` on `E`.

It also doesn't really care about what expression the enum variant contains, it could for example be a string, despite that not being allowed, but I guess it's up to the `cargo check` diagnostics to inform of such issues anyway?
fs::get_path solarish version.

similar to linux, albeit there is no /proc/self notion on solaris
 based system thus flattening the difference for simplification sake.
…mulacrum

Add `is_empty()` method to `core::ffi::CStr`.

ACP: rust-lang/libs-team#106

Tracking issue: rust-lang#102444
…-diagnostics-structs, r=davidtwco

Migrate `codegen_ssa` to diagnostics structs - [Part 1]

Initial migration of `codegen_ssa`. Going to split this crate migration in at least two PRs in order to avoid a huge PR and to quick off some questions around:

1. Translating messages from "external" crates.
2. Interfacing with OS messages.
3. Adding UI tests while migrating diagnostics.

_See comments below._
Interpret EH actions properly

The EH actions stored in the LSDA follows the format of GCC except table (even for LLVM-generated code). An missing action in the table is the encoding for `Terminate`, see https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_personality.cc#L522-L526.

The currently code interprets it as `None`, as a workaround for rust-lang#35011, an issue that seems to occur in LLVM 3.7 and not after 3.9. These are very old versions of LLVM and we don't support them anymore, so remove this workaround and interpret them properly.

Note that LLVM currently does not emit any `Terminate` actions, but GCC does. Although GCC backend currently doesn't do unwinding, removing it preemptively would prevent future developers from wasting time to figure out what's wrong.

``@rustbot`` label: +T-compiler
Add basename and dirname aliases

Users might be used to the POSIX names of these functions. In fact, here's a [blog post][1] about this very thing.

[1]: https://boinkor.net/2019/07/basename-and-dirname-in-rust/
rustc_hir: Less error-prone methods for accessing `PartialRes` resolution
…r=lnicola

⬆️ rust-analyzer

r? `@ghost`
@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. rollup A PR which is a rollup labels Oct 11, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=11
(for when #102920 fails)

@bors
Copy link
Contributor

bors commented Oct 11, 2022

📌 Commit 3e01d07 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 11, 2022
@bors
Copy link
Contributor

bors commented Oct 11, 2022

⌛ Testing commit 3e01d07 with merge db0597f...

@bors
Copy link
Contributor

bors commented Oct 11, 2022

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 11, 2022
@bors bors merged commit db0597f into rust-lang:master Oct 11, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 11, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (db0597f): 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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.4% [-1.0%, -0.2%] 20
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 7
All ❌✅ (primary) -0.4% [-1.0%, -0.2%] 20

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.

mean1 range count2
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.8%, -2.3%] 3
Improvements ✅
(secondary)
-2.8% [-3.8%, -1.8%] 25
All ❌✅ (primary) -1.3% [-2.8%, 2.4%] 4

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.2% [4.2%, 4.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@Mark-Simulacrum
Copy link
Member

This may not be as much of an improvement as it looks; the diesel-related changes are all spurious (we are seeing an uptick in noise there). Further investigation isn't warranted though.

@matthiaskrgr matthiaskrgr deleted the rollup-oe2cdzj branch December 22, 2022 10:47
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#100387 (Check uniqueness of impl items by trait item when applicable.)
 - rust-lang#101727 (Stabilize map_first_last)
 - rust-lang#101774 (Warn about safety of `fetch_update`)
 - rust-lang#102227 (fs::get_path solarish version.)
 - rust-lang#102445 (Add `is_empty()` method to `core::ffi::CStr`.)
 - rust-lang#102612 (Migrate `codegen_ssa` to diagnostics structs - [Part 1])
 - rust-lang#102685 (Interpret EH actions properly)
 - rust-lang#102869 (Add basename and dirname aliases)
 - rust-lang#102889 (rustc_hir: Less error-prone methods for accessing `PartialRes` resolution)
 - rust-lang#102893 (Fix ICE rust-lang#102878)
 - rust-lang#102912 (:arrow_up: rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.