mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
aee3daf90b
Use Span#from_expansion instead of in_external_macro - fixes #10511 I checked [the reported repository](https://github.com/rust-lang/rust-clippy/issues/10511#issuecomment-1474271205) and found that clippy hangs at [py_sync.rs#L85](https://github.com/rigetti/qcs-sdk-rust/blob/842094068ed6174ba08b52a2fbae39dda77cbd00/crates/python/src/py_sync.rs#L85), where a macro(`py_function_sync_async`) defines type parameters. this macro is used in the same crate, so `in_external_macro` wouldn't catch them. This PR fixes the problem by using `Span#from_expansion`. --- changelog: ICE: [`implicit_hasher`]: No longer lints inside macros, which could cause ICEs [#11593](https://github.com/rust-lang/rust-clippy/pull/11593)