Open
Description
Working on suricata OISF/suricata#7150
The current output is:
error[E0599]: no associated item named `MAX` found for type parameter `T` in the current scope
--> src/detect.rs:109:18
|
109 | x < <T>::MAX
| ^^^ associated item not found in `T`
|
= help: items from traits can only be used if the type parameter is bounded by the trait
help: the following traits define an item `MAX`, perhaps you need to restrict type parameter `T` with one of them:
|
104 | fn detect_parse_uint_start_greater<T: lexical_core::util::num::Float + std::str::FromStr>(i: &str) -> IResult<&str, DetectUintData<T>> {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104 | fn detect_parse_uint_start_greater<T: lexical_core::util::num::Integer + std::str::FromStr>(i: &str) -> IResult<&str, DetectUintData<T>> {
This proposal looks interesting but when It tried it, I was disappointed :
error[E0603]: module `util` is private --> src/detect.rs:41:51 | 41 | fn detect_parse_uint_start_equal<T: lexical_core::util::num::Integer>(i: &str) -> IResult<&str, DetectUintData<T>> { | ^^^^ private module | note: the module `util` is defined here --> /Users/catena/.cargo/registry/src/github.com-1ecc6299db9ec823/lexical-core-0.7.6/src/lib.rs:189:1
<!-- The following is not always necessary. -->
Ideally the output should look like:
"the following traits define an item MAX
, you could restrict the type parameter, but it is private so you can't"?
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Name/path resolution done by `rustc_resolve` specificallyArea: Suggestions generated by the compiler applied by `cargo fix`Area: Visibility / privacyDiagnostics: A structured suggestion resulting in incorrect code.Relevant to the compiler team, which will review and decide on the PR/issue.