-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
A-new-solverBugs from the new solver migration - should be fixed before stable releaseBugs from the new solver migration - should be fixed before stable releaseC-bugCategory: bugCategory: bug
Description
cc #20443 - this does not repro in stable release.
rust-analyzer version: 0.4.2586-standalone (a905e3b 2025-08-18)
rustc version: rustc 1.89.0-nightly (99e7c15 2025-06-01)
editor or extension: VSCode
relevant settings: N/A
code snippet to reproduce:
trait Foo {
fn bar(&self) -> u32 {
0xCAFE
}
}
fn debug(_: &dyn Foo) {}
impl Foo for i32 {}
fn main() {
debug(&1);
// ^^ expected &dyn Foo, found &i32
}Similar to #20489, the error does not occur if the impl of Foo has no methods, e.g.
trait Foo { }Metadata
Metadata
Assignees
Labels
A-new-solverBugs from the new solver migration - should be fixed before stable releaseBugs from the new solver migration - should be fixed before stable releaseC-bugCategory: bugCategory: bug