Rust: macro invocations are recorded as plain calls, and bare/module-path calls compete with impl members — one rule: the call shape decides the admissible candidate kinds #385
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#385
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found dogfooding 0.39.0 on this repository. Pre-existing. This is the generalisation of #378, which covered method calls onto receiverless functions.
Observed
panic!(…)×1518 appear asname_fallback_count: 1518on the guest'sfn panicpanic handler, which nothing calls.format!(…)×5110 are reported asambiguous, as if they could be calls to two struct fields namedformat.traits_of(core/src/lang_profile.rs:555) has 0 of 27 calls resolved. All are reportedambiguousagainst the methodProfileBook::traits_of. That includes bare same-file calls andcode_index_core::lang_profile::traits_of(…), which a Rust impl member can never satisfy.readbind toLockfile::read.Rule (Rust)
name!(…)can only reach a macro.callcan only reach a free fn, never an impl or trait member. Those needSelf::,Type::orx.f().method_callcan only reach a receiver-taking fn (#378).Order matters
Macro invocations must be marked first. If impl members are removed from bare-call pools alone,
format!would start binding any same-named free fn. That is the phantom effect #378's lane measured: removing a pool competitor made 362 phantoms.Plan
.method()call binds to an associated fn with noself(tier3 import-key edge) — 32 of PoolAdmit::prepare's 35 callers are rusqliteconn.prepare(sql)#378