]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #96770 - flip1995:fix-trait-type-in-bounds, r=cjgillot
authorbors <bors@rust-lang.org>
Sun, 8 May 2022 14:10:12 +0000 (14:10 +0000)
committerbors <bors@rust-lang.org>
Sun, 8 May 2022 14:10:12 +0000 (14:10 +0000)
commited3164baf010592dda34da57c28fa8ae5e6c2ca6
tree23856ce2b2ca2384a8436c64770187144b14fef5
parent8fbd92d0b95d847c68948d8dbbfaccb470db4f92
parentdd1ff405e3a059836ffceee8490a630c4b9078d3
Auto merge of #96770 - flip1995:fix-trait-type-in-bounds, r=cjgillot

Track if a where bound comes from a impl Trait desugar

With https://github.com/rust-lang/rust/pull/93803 `impl Trait` function arguments get desugared to hidden where bounds. However, Clippy needs to know if a bound was originally a `impl Trait` or an actual bound. This adds a field to the `WhereBoundPredicate` struct to keep track of this information during AST->HIR lowering.

r? `@cjgillot`

cc `@estebank` (as the reviewer of #93803)
compiler/rustc_ast_lowering/src/lib.rs
compiler/rustc_hir/src/hir.rs
src/tools/clippy/clippy_lints/src/lib.register_nursery.rs