Another question on pikuach nefesh. The Talmud [Sanhedrin 75a] recounts this story:
There was an incident involving a certain man who set his eyes upon a certain woman and passion rose in his heart [and he became deathly ill]. And they came and asked doctors [what to do]. And the doctors said: He will be cured only if she has sex with him.
-The Sages said: Let him die. She may not have sex with him.
-The doctors said: She should at least stand naked before him.
-The Sages said: Let him die. She may not stand naked before him.
-The doctors suggested: The woman should at least talk with him behind a fence in a secluded area.
-The Sages insisted: Let him die. She may not converse with him behind a fence.
[An objection: If the woman is married, the matter is understood. But if she is single] let the man marry her [if she agrees]. Rabbi Yitzḥak said: His mind will not be eased by marriage, as it is stated: Stolen waters are sweet, and bread eaten in secret is pleasant. [Prov. 9:17]
In other words, Rabbi Yitzhak decided that only illicit sex could have cured the man. On what basis did he make that assertion? In most cases, a man in that situation would be happy if the woman agreed to marry him. The problem arises only if she does not want to marry him.