Open
Description
Code
So, I have a
`create(filename).expect(format!("This failed {}", &filename));`
and somewhere I had declared `pub use String as ExecId;` in some module somewhere.
As a result, the error I am getting is a misleading compilation error message:
I understand `ExecId` is also String alias but it is unrelated thing.
Current output
error[E0308]: mismatched types
--> services/src/abc.rs:218:25
|
218 | .expect(format!("This failed {}",
| _________________________^
219 | | &filename));
| |_____________________________________________________________________^ expected `&str`, found `ExecId`
|
Desired output
error[E0308]: mismatched types
--> services/src/abc.rs:218:25
|
218 | .expect(format!("This failed {}",
| _________________________^
219 | | &filename));
| |_____________________________________________________________________^ expected `&str`, found `String`
|
Rationale and extra context
No response
Other cases
Rust Version
rustc 1.83.0 (90b35a623 2024-11-26) (Homebrew)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: aarch64-apple-darwin
release: 1.83.0
LLVM version: 19.1.6
Anything else?
No response
Activity