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 8 pull requests #129591

Closed
wants to merge 34 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 30 commits August 19, 2024 21:26
Currently ICEs because we buffer it with NodeId of the missing lifetime,
so it ends up not getting emitted
So that you know it's about linting and not about correctness.

Yes, it is also inverted now.
from `LateResolutionVisitor` to `LifetimeRes::Static`
…gillot

Lint that warns when an elided lifetime ends up being a named lifetime

As suggested in rust-lang#48686 (comment)

Fixes rust-lang#48686

## TODO:
- [ ] Crater run?

## Questions:
- [ ] Should we separate the `'static` case and the named lifetime parameter case?
- [ ] Should this be `Allow` or `Warn` by default?
- [ ] Should this be gated behind an edition?

## Future improvemetns:
- [ ] Add machine-applicable suggestions

`@rustbot` label A-lint
…, r=lcnr

Use subtyping for `UnsafeFnPointer` coercion, too

I overlooked this in rust-lang#129059, which changed MIR typechecking to use subtyping for other fn pointer coercions.

Fixes rust-lang#129285
…, r=tgross35

gitignore: ignore ICE reports regardless of directory

Quite often when working on compiler I end up running into ICEs during the standard library compilation.

These ICEs generate reports in `/library/` and not at the root of the repo, so they aren't `gitignore`d.

I finally ended up committing one today, by accident: rust-lang#129487 (comment)
…fmease

Remove redundant flags from `lower_ty_common` that can be inferred from the HIR

...and then get rid of `lower_ty_common`.

r? `@fmease` or re-roll if you're busy!
…r=compiler-errors

Removes dead code from the compiler

Detected by rust-lang#128637
…er-errors

add back test for stable-const-can-only-call-stable-const

This got accidentally removed in rust-lang#128596 (file `tests/ui/internal/internal-unstable-const.rs`). The test has little to do with "allow internal unstable" though, so add it in a file that already tests various const stability things.

Also tweak the help that suggests to add `rustc_allow_const_fn_unstable` to make it clear that this needs team approval, since it is a fairly big gun.
Avoid taking reference of &TyKind

It's already a ref anyways. Just a tiny cleanup here.
@rustbot rustbot added 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. rollup A PR which is a rollup labels Aug 25, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Aug 25, 2024

📌 Commit 1bac9b2 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 Aug 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 25, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#129207 (Lint that warns when an elided lifetime ends up being a named lifetime)
 - rust-lang#129288 (Use subtyping for `UnsafeFnPointer` coercion, too)
 - rust-lang#129405 (Fixing span manipulation and indentation of the suggestion introduced by rust-lang#126187)
 - rust-lang#129518 (gitignore: ignore ICE reports regardless of directory)
 - rust-lang#129519 (Remove redundant flags from `lower_ty_common` that can be inferred from the HIR)
 - rust-lang#129544 (Removes dead code from the compiler)
 - rust-lang#129553 (add back test for stable-const-can-only-call-stable-const)
 - rust-lang#129590 (Avoid taking reference of &TyKind)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Aug 25, 2024

⌛ Testing commit 1bac9b2 with merge 751e9ff...

@rust-log-analyzer
Copy link
Collaborator

The job dist-aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] git2_curl test:false 0.571
warning: elided lifetime has a name
   --> src/cargo/core/workspace.rs:580:66
    |
580 |     pub fn default_members<'a>(&'a self) -> impl Iterator<Item = &Package> {
    |                            -- lifetime `'a` declared here        ^ this elided lifetime gets resolved as `'a`
    = note: `#[warn(elided_named_lifetimes)]` on by default

[RUSTC-TIMING] git2 test:false 3.813
[RUSTC-TIMING] cargo test:false 65.918
---
   Compiling chalk-recursive v0.98.0
error: elided lifetime has a name
   --> crates/hir-def/src/attr.rs:120:75
    |
120 |     pub fn by_key<'attrs>(&'attrs self, key: &'attrs Symbol) -> AttrQuery<'_> {
    |                   ------ lifetime `'attrs` declared here                  ^^ this elided lifetime gets resolved as `'attrs`
    = note: `-D elided-named-lifetimes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(elided_named_lifetimes)]`

error: elided lifetime has a name
error: elided lifetime has a name
   --> crates/hir-def/src/attr.rs:597:72
    |
565 | impl<'attr> AttrQuery<'attr> {
    |      ----- lifetime `'attr` declared here
...
597 |     pub fn find_string_value_in_tt(self, key: &'attr Symbol) -> Option<&str> {
    |                                                                        ^ this elided lifetime gets resolved as `'attr`
error: elided lifetime has a name
   --> crates/hir-def/src/body.rs:200:57
    |
197 |     pub fn blocks<'a>(
197 |     pub fn blocks<'a>(
    |                   -- lifetime `'a` declared here
...
200 |     ) -> impl Iterator<Item = (BlockId, Arc<DefMap>)> + '_ {
    |                                                         ^^ this elided lifetime gets resolved as `'a`
[RUSTC-TIMING] chalk_recursive test:false 0.454
[RUSTC-TIMING] rayon_core test:false 1.088
   Compiling ra-ap-rustc_pattern_analysis v0.63.0
[RUSTC-TIMING] ra_ap_rustc_pattern_analysis test:false 0.347

@bors
Copy link
Contributor

bors commented Aug 25, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 25, 2024
@matthiaskrgr matthiaskrgr deleted the rollup-t1y17qs branch September 1, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants