Closed
Description
This was originally a clippy issue until I noticed it's actually a builtin lint, so here's clippy's issue form filled out 😄
Summary
The explicit_outlives_requirements
lint seems to fire in macro-generated code, where it would be extra work to elide these. Saw this happen in CI for Ruma: https://github.com/ruma/ruma/runs/6258852689?check_suite_focus=true
Lint Name
explicit_outlives_requirements
Reproducer
- Clone Ruma
- Run
cargo clippy --features client
incrates/ruma-client-api
Version
rustc 1.62.0-nightly (4dd8b420c 2022-05-01)
binary: rustc
commit-hash: 4dd8b420c027001e47b0d811a7e55e2fe1de1395
commit-date: 2022-05-01
host: x86_64-unknown-linux-gnu
release: 1.62.0-nightly
LLVM version: 14.0.1
Activity
djkoloski commentedon May 2, 2022
This doesn't trip on stable or beta, so it appears that this is a nightly regression. Here's a minimized repro (playground link):
Cargo.toml
lib.rs
This trips the lint on a generated bound in serde:
Since the
'a: '__a
bound is technically unnecessary due to&'__a &'a String
.Rollup merge of rust-lang#96812 - cjgillot:no-lint-outllives-macro, r…