Defined this way it would catch and highlight things like `ident:: -any-amount-of-garbage- ident` which is probably not what's intended. To make it catch only `ident::ident` it should look like this:

    begin: hljs.IDENT_RE + '::' + hljs.IDENT_RE,