error: unexpected `syntax` declaration
  --> testdata/parser/syntax/not_first.proto:3:1
   |
 1 | package test;
   | ------------- previous declaration is here
 2 |
 3 | syntax = "proto2";
   | ^^^^^^^^^^^^^^^^^^
   = note: a `syntax` declaration must be the first declaration in a file

encountered 1 error
