We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ced370 commit b209ff2Copy full SHA for b209ff2
compiler/rustc_lint/src/builtin.rs
@@ -769,10 +769,13 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
769
// We shouldn't recommend implementing `Copy` on stateful things,
770
// such as iterators.
771
if let Some(iter_trait) = cx.tcx.get_diagnostic_item(sym::Iterator) {
772
- if cx.tcx.infer_ctxt().enter(|infer_ctxt| {
773
- infer_ctxt.type_implements_trait(iter_trait, ty, List::empty(), param_env)
774
- == EvaluationResult::EvaluatedToOk
775
- }) {
+ if cx.tcx.infer_ctxt().build().type_implements_trait(
+ iter_trait,
+ ty,
+ List::empty(),
776
+ param_env,
777
+ ) == EvaluationResult::EvaluatedToOk
778
+ {
779
return;
780
}
781
0 commit comments