-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Prioritise types in prelude over items from a #[doc(hidden)] module #91912
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I was passing in a usize instead of an Option<usize> in some of my code and when I ran cargo +nightly check I got this output:
error[E0308]: mismatched types
--> src/process_handling/linux.rs:59:53
|
59 | execute_test(test, ignored, config, cpus)?;
| ^^^^ expected enum `std::option::Option`, found `usize`
|
= note: expected enum `std::option::Option<usize>`
found type `usize`
help: try wrapping the expression in `syn::__private::Some`
|
59 | execute_test(test, ignored, config, syn::__private::Some(cpus))?;
| +++++++++++++++++++++ +
For more information about this error, try `rustc --explain E0308`.
error: could not compile `cargo-tarpaulin` due to previous error
I'm on the latest nightly and mentioned it on a rust discord and @memoryruins pointed me to the RA issue rust-lang/rust-analyzer#8511 and then realised there didn't seem to be a rustc issue for it so I'm raising it now 👀
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.