Skip to content

Fix suggestion to use lifetime in type and in assoc const #75372

New issue

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

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

Already on GitHub? # to your account

Merged
merged 5 commits into from
Aug 13, 2020

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Aug 10, 2020

Do not merge until #75363 has landed, as it has the test case for this.

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 10, 2020
@estebank
Copy link
Contributor Author

r? @lcnr

@rust-highfive rust-highfive assigned lcnr and unassigned eddyb Aug 10, 2020
@estebank estebank changed the title Fix suggestion to use lifetime in type Fix suggestion to use lifetime in type and in assoc const Aug 10, 2020
@estebank
Copy link
Contributor Author

cc @JohnTitor

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

LL | const A: &str = "";
LL | const B: S = S { s: &() };
LL | const C: &'_ str = "";
LL | const D: T<'a, 'a> = T { a: &(), b: &() };
Copy link
Contributor

@lcnr lcnr Aug 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That snippet is somewhat unfortunate, but I don't think there is something we can do here 🤷

@lcnr
Copy link
Contributor

lcnr commented Aug 12, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 12, 2020

📌 Commit 6a3deb0 has been approved by lcnr

@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 12, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Aug 13, 2020
Fix suggestion to use lifetime in type and in assoc const

_Do not merge until rust-lang#75363 has landed, as it has the test case for this._

* Account for associated types
* Associated `const`s can't have generics (fix rust-lang#74264)
* Do not suggest duplicate lifetimes and suggest `for<'a>` more (fix rust-lang#72404)
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 13, 2020
Rollup of 11 pull requests

Successful merges:

 - rust-lang#75189 (Fix wasi::fs::OpenOptions to imply write when append is on)
 - rust-lang#75201 (Fix some Clippy warnings in librustc_serialize)
 - rust-lang#75372 (Fix suggestion to use lifetime in type and in assoc const)
 - rust-lang#75400 (Fix minor things in the `f32` primitive docs)
 - rust-lang#75449 (add regression test for rust-lang#74739 (mir const-prop bug))
 - rust-lang#75451 (Clean up E0751 explanation)
 - rust-lang#75455 (Use explicit path link in place for doc in time)
 - rust-lang#75457 (Remove some dead variants in LLVM FFI)
 - rust-lang#75466 (Move to intra doc links whenever possible within std/src/lib.rs)
 - rust-lang#75469 (Switch to intra-doc links in `std/io/mod.rs`)
 - rust-lang#75473 (Flip order of const & type)

Failed merges:

r? @ghost
@bors bors merged commit d90a4b8 into rust-lang:master Aug 13, 2020
@estebank estebank deleted the lt-sugg-in-type branch November 9, 2023 05:16
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
6 participants