On the surface it doesn't look good, but I wonder if there is a reinforcement wrap for the brake posts, with an unfinished edge). There are some informal ways to try and confirm whether the structural carbon has been damaged.
'Carbon usually has a very crisp sound to it [when tapped] and when it’s damaged the tone changes completely,' says John Hansell of Yorkshire-based Fibre-Lyte, which offers a full inspection and repair service for carbon frames.
-- How to assess a cracked carbon frame
Others will argue that this is a difficult method, or that it only tends to work when the damage is already very visible. Typically, I would tap with a solid object (e.g., smooth end of a screw driver), with a consistent force. Tapping with your fingers might not work well. There may also be pitch changes where the underlying material has change (e.g., many frames bond aluminum to carbon at places such as drop outs, steer, etc). The tone to listen for is a dull thud.
As suggested by David Richerby you could compare and contrast the sound of the potentially damaged area against the other fork leg (which I assume does not show any signs of damage) to see if are any notable differences in sound when tapped.
Another technique I have been told to try when inspecting used frames was to squeeze in the area around suspected damage. If the carbon feels "softer" it is a sign of structural damage.
None of these techniques are definitive, as it requires you to essentially "read tea leaves" some can do it, some miss signs others pick up on.
The definitive answer would be to scan the carbon (e.g., X-ray) to look for anomalies or damage. This however would likely cost more than the bike is worth and requires access to a skilled technician who can correctly interpret the results. Thermal scanning may be another option in this realm, but I don't know the availability of this technique, or whether it has been validated.
Ultimately, you may need to send the frame into Trek's warranty department and allow them to assess and replace if required, they do have a good warranty department.