You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rust: owner-pin precision gaps left by #6909 (nested src/bin targets, path-qualified inline receivers, explicit-return tails) #6916
Three under-credit gaps declined in review of #6909 (#5352). Each one fails closed today: the result is a refusal or a missing pin, never a wrong exposed. They hurt the goal that verdicts be trustworthy without needless refusals.
Nested binary targets.TargetRoots::root recognizes src/bin/*.rs but not src/bin/<name>/main.rs. A crate-local macro site in such a binary, such as #[macro_use] extern crate bencher;, stays workspace-wide and refuses tests/*.rs assertions in the library.
Repro: add src/bin/tool/main.rs containing #[macro_use]\nextern crate bencher; beside a library whose tests/t.rs asserts assert_eq!(weight(4), 12). The result is a MacroBinding refusal.
Fix: recognize the target, and compose src/bin/<name>/*.rs modules under it so they do not look like roots of their own.
Path-qualified inline receivers.crate::Stack::new().pop() and a::B::new().m() are not typed as a constructed receiver. Only the single-segment T::ctor(..) form is.
Constraint: change this together with the let x = path::T::new() binding typing so the two forms stay in parity.
Explicit-return tails. An early return None; in a function that ends with return Some(x); (an empty tail) is not pinned.
Constraint: an empty tail after a trailing block such as loop { break None } or if .. { .. } else { None } hides a second source. Only an explicit final return <head>(..); statement could be admitted.
Activity
EffortlessSteven commentedon Nov 2, 2026
Cursor claim: verifying #6916 against main, then fixing if still open.
fix(analysis): recognize nested src/bin/<name>/main.rs owner-pin targ…