What does "crate fn" mean?


#1

I’m looking into compiler code and sometimes see “crate fn” functions like this https://github.com/rust-lang/rust/blob/f37247f885026d29bf26fd4aed6e9135e4f32ebf/src/libsyntax/parse/mod.rs#L152. Is it the same as “pub(crate) fn”?


#2

Yes, as part of the module impovement, the crate keyword can now be used as a visibilty modifier. It is just a shorter, and confusing in my opinion, syntax for pub(crate) .


#3

We’re not stabilizing it any time soon though, as it proved controversial.