-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String slices as the keys of sendable maps bring about pain #3284
Comments
The other possibility is that we could have a The basic problem is that the query string isn't the same type as the strings inside the map... |
Currently all type parameters are invariant. I have considered that a distinct |
@cmr: I think so, the problem is solved for |
Changes: Remove now-useless `allow(unknown_lints)` Stabilize tool lints Use `impl Iterator` in arg position in clippy_dev Fix fn_to_numeric_cast_with_truncation suppression Limit commutative assign op lint to primitive types Clarify code Fix rust-lang#2937 Fix cast_possible_wrap and cast_sign_loss warnings Fix cast_possible_truncation warnings Fixes rust-lang#2925 cmp_owned false positive if_let_redundant_pattern_matching: use Span.to() instead of Span.with_hi() to fix crash. Improve diagnostics in case of lifetime elision (closes rust-lang#3284) Fix items_after_statements for `const`s Fix items_after_statements for sub-functions Fix items_after_statements for `use` statements Don't suggest cloned() for map Box deref Fix excessive_precision false positive Fix FP in `fn_to_numeric_cast_with_truncation` new_without_default should not warn about unsafe new fix command to manually test an example Add license to README Adding more detail to filter_map lint documentation. additional people Add license header to other files Add license header to Rust files Relicense clippy Document relicensing process Fix util/export.py to include lints from methods
Changes: Remove now-useless `allow(unknown_lints)` Stabilize tool lints Use `impl Iterator` in arg position in clippy_dev Fix fn_to_numeric_cast_with_truncation suppression Limit commutative assign op lint to primitive types Clarify code Fix rust-lang#2937 Fix cast_possible_wrap and cast_sign_loss warnings Fix cast_possible_truncation warnings Fixes rust-lang#2925 cmp_owned false positive if_let_redundant_pattern_matching: use Span.to() instead of Span.with_hi() to fix crash. Improve diagnostics in case of lifetime elision (closes rust-lang#3284) Fix items_after_statements for `const`s Fix items_after_statements for sub-functions Fix items_after_statements for `use` statements Don't suggest cloned() for map Box deref Fix excessive_precision false positive Fix FP in `fn_to_numeric_cast_with_truncation` new_without_default should not warn about unsafe new fix command to manually test an example Add license to README Adding more detail to filter_map lint documentation. additional people Add license header to other files Add license header to Rust files Relicense clippy Document relicensing process Fix util/export.py to include lints from methods
recognize strings inside comments in order to avoid indenting them
…Jung enable from_bitmask_vector test on little-endian targets Blocked on rust-lang/portable-simd#380 propagating to the rustc repo
Replace test used in workflow since we have deleted the function test. I also made this action mandatory for our PRs.
As far as I can see it, the region and slice systems make it impossible to use a
send_map<&str,V>
, unless you're only comparing static strings. The problem, as far as I can see it, is thatfind()
wants to take its argument by reference, so the region checker requires invariance somehow and borrow check errors happen.@nikomatsakis, thoughts? Maybe we need a separate
StringMap
type.The text was updated successfully, but these errors were encountered: