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
Accessing a module, for example, would mean looking inside of it (to import more items). On the other hand, accessing a function would mean that it is invoked.
I don't understand what this is supposed to mean, other than perhaps "usually, the reason you might want to access a function is to invoke it".
But of course while usually true that's not always true.
mod m1 {pubfnf(){}}fnmain(){let p:fn() = m1::f;println!("{:?}", p);}
Maybe the sentence "On the other hand, accessing a function would mean that it is invoked." should be removed.
The following sentence comes as:
Additionally, path expressions and import statements are considered to access an item...
A function invocation involves a PathExpression, just as in your code snippet where a function is NOT immediately invoked but accessed indeed, and thus can be covered by the PathExpression case.
It seems we can distinguish two kinds of access as to whether the item in question can appear as the LAST segment of a PathInExpression or a SimplePath. A module item can not whereas other items can. After aforementioned removal the remaining reflects this classification somehow.
Activity
bitcp commentedon Feb 5, 2026
Maybe the sentence "On the other hand, accessing a function would mean that it is invoked." should be removed.
The following sentence comes as:
A function invocation involves a
PathExpression, just as in your code snippet where a function is NOT immediately invoked but accessed indeed, and thus can be covered by thePathExpressioncase.It seems we can distinguish two kinds of access as to whether the item in question can appear as the LAST segment of a
PathInExpressionor aSimplePath. A module item can not whereas other items can. After aforementioned removal the remaining reflects this classification somehow.