Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #105512

Merged
merged 21 commits into from
Dec 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4ced370
Make `missing_copy_implementations` more cautious
Sep 28, 2022
b209ff2
Update trait check
Nov 19, 2022
34277fc
Rebase
Nov 29, 2022
17766c1
Skip test on s390x as LLD does not support the platform
uweigand Dec 6, 2022
58e60ac
Make `VecDeque::from_iter` O(1) from `vec(_deque)::IntoIter`
scottmcm Dec 8, 2022
98ae83d
Mangle "main" as "__main_void" on wasm32-wasi
sunfishcode Dec 8, 2022
5626df9
Add `rustc_on_unimplemented` to `Sum` and `Product` trait.
aDotInTheVoid Dec 4, 2022
90da11d
rustdoc: remove no-op mobile CSS `#sidebar-toggle { text-align }`
notriddle Dec 9, 2022
6648134
Apply review feedback; Fix no_global_oom_handling build
scottmcm Dec 9, 2022
f41576b
Fix typo in apple_base.rs
eltociear Dec 9, 2022
d60967b
rustdoc: make stability badge CSS more consistent
notriddle Dec 9, 2022
b3b17bd
Tweak `rustc_must_implement_one_of` diagnostic output
estebank Dec 9, 2022
4fae589
Rollup merge of #102406 - mejrs:missing_copy, r=wesleywiser
matthiaskrgr Dec 9, 2022
856027a
Rollup merge of #105265 - aDotInTheVoid:sum-product-on-unimplemented,…
matthiaskrgr Dec 9, 2022
c44326e
Rollup merge of #105385 - uweigand:s390x-test-lld, r=Mark-Simulacrum
matthiaskrgr Dec 9, 2022
5156fbd
Rollup merge of #105453 - scottmcm:vecdeque_from_iter, r=the8472
matthiaskrgr Dec 9, 2022
320d018
Rollup merge of #105468 - sunfishcode:sunfishcode/main-void-wasi, r=e…
matthiaskrgr Dec 9, 2022
d477386
Rollup merge of #105480 - notriddle:notriddle/sidebar-toggle-mobile-c…
matthiaskrgr Dec 9, 2022
f78babd
Rollup merge of #105489 - eltociear:patch-17, r=Dylan-DPC
matthiaskrgr Dec 9, 2022
d0563c6
Rollup merge of #105504 - notriddle:notriddle/stab-css, r=GuillaumeGomez
matthiaskrgr Dec 9, 2022
376b0bc
Rollup merge of #105506 - estebank:rustc_must_implement_one_of, r=com…
matthiaskrgr Dec 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update trait check
  • Loading branch information
mejrs committed Nov 29, 2022
commit b209ff27f32425e0d3a6ae704669a617f2f2235a
11 changes: 7 additions & 4 deletions compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,13 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
// We shouldn't recommend implementing `Copy` on stateful things,
// such as iterators.
if let Some(iter_trait) = cx.tcx.get_diagnostic_item(sym::Iterator) {
if cx.tcx.infer_ctxt().enter(|infer_ctxt| {
infer_ctxt.type_implements_trait(iter_trait, ty, List::empty(), param_env)
== EvaluationResult::EvaluatedToOk
}) {
if cx.tcx.infer_ctxt().build().type_implements_trait(
iter_trait,
ty,
List::empty(),
param_env,
) == EvaluationResult::EvaluatedToOk
{
return;
}
}
Expand Down