-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix suggestion to use lifetime in type and in assoc const #75372
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @lcnr |
82443fb
to
fdeb382
Compare
cc @JohnTitor |
fdeb382
to
6a3deb0
Compare
There was a problem hiding this 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: &() }; |
There was a problem hiding this comment.
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 🤷
@bors r+ rollup |
📌 Commit 6a3deb0 has been approved by |
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)
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
Do not merge until #75363 has landed, as it has the test case for this.
const
s can't have generics (fix Suggestion diagnostic for new generic argument is placed at beginning of file #74264)for<'a>
more (fix On missing HRLT annotation, we sometimes provide a slightly incorrect suggestion #72404)