Uh oh!
There was an error while loading. Please reload this page.
Normalize substs before resolving instance in NoopMethodCall lint - #102489
Merged
Conversation
ContributorAuthor
There was a problem hiding this comment.
I don't think it made sense to use the param-env of the trait here...?
ContributorAuthor
There was a problem hiding this comment.
Also, is this true? We should be able to trigger this lint if we have, e.g. a clone call like <&T as Clone>::clone(..) which is still a no-op...
Contributor
There was a problem hiding this comment.
Instance::resolve should not panic if substs.needs_subst, it should return a non Ok(Some(_)) value. Removing that check should be ok.
ContributorAuthor
There was a problem hiding this comment.
You're right, and it also fixes a exactly the case that was missing a warning in the original noop-method-call ui test 😸
matthiaskrgr
commented
Sep 29, 2022
Member
This might also close #97725 :3 |
compiler-errorsforce-pushed
the
issue-102074
branch
from
September 30, 2022 00:32
3e70086 to
b1839d9Comparecompiler-errorsforce-pushed
the
issue-102074
branch
from
October 4, 2022 03:28
b1839d9 to
587b589Comparecompiler-errorsforce-pushed
the
issue-102074
branch
from
October 4, 2022 03:29
587b589 to
e1b313aCompareoli-obk
commented
Oct 4, 2022
Contributor
@bors r+ rollup |
bors
commented
Oct 4, 2022
Collaborator
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 4, 2022
Rollup of 6 pull requests Successful merges: - rust-lang#101189 (Implement `Ready::into_inner()`) - rust-lang#101642 (Fix in-place collection leak when remaining element destructor panic) - rust-lang#102489 (Normalize substs before resolving instance in `NoopMethodCall` lint) - rust-lang#102559 (Don't ICE when trying to copy unsized value in const prop) - rust-lang#102568 (Lint against nested opaque types that don't satisfy associated type bounds) - rust-lang#102633 (Fix rustdoc ICE in invalid_rust_codeblocks lint) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#102074
r? types