5e223dc7b9
Do not error during method probe on `Sized` predicates for types that aren't the method receiver Fixes #61525 This is safe even though we're skipping an error because we end up confirming the method, which means we're still checking the `Sized` predicate in the end. It just means that we don't emit an erroneous message as below: ``` error: the `query` method cannot be invoked on a trait object --> src/lib.rs:14:11 | 14 | 1.query::<dyn ToString>("") | ^^^^^ | = note: another candidate was found in the following trait, perhaps add a `use` for it: `use crate::Example;` ``` Also fixes erroneously suggesting the same trait over again, as seen in the `issue-35976.rs` UI test. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.