How to make link that displays as a code span in reStructuredText?

In Markdown that’s [`aaa`](https://example.com). How to do it in RST?

It’s unfortunately not as simple, and has been debated for quite a while, see the Docutils TODO list for more information.

However, there are workarounds, as detailed in the Docutils FAQ. In this specific case, you’d need something like:

|aaa|_.

.. |aaa| replace:: ``aaa``
.. _aaa: https://example.org

Several months ago, I found a sphinx extension sphinxnotes-comboroles that can simplify this kind of use case. According to its documentation:

conf.py:

comboroles_roles = {
    'parsed_literal': (['literal'], True),
}

docs.rst:

:parsed_literal:`aaa_`

.. _aaa: https://example.com