rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
99.09k stars 12.79k forks source link

`SelectionContext::evaluate_predicate_recursively` ignores type paramters in outlive predicates #118901

Open aliemjay opened 11 months ago

aliemjay commented 11 months ago

I believe this is missing another special case for pred.0.has_params() as well as has_placeholders(): https://github.com/rust-lang/rust/blob/3340d49d22b1aba425779767278c40781826c2f5/compiler/rustc_trait_selection/src/traits/select/mod.rs#L798-L808

Enselic commented 2 weeks ago

Triage: It would be great to have some more context here. Does this mean programs miscompile? Or that programs that should compile does not compile? Can you give an example program please? Thanks!