In Drupal 7, you could use the array('html' => TRUE) parameter to make an HTML link. Here’s how to do it in Twig.

1 {{ link(title, url.setOption('html', true)) }}