What does "crate fn" mean?

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”?

1 Like

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) .

1 Like

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


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.