Any passenger with such a severe allergy should a) Know it, and b) carry an "Epi-pen" to counteract anaphylactic schock. However epi-pens are a pain in the rear end in more ways than one. They are full of liquid and have a sharp needle at one end with a "firing device" that shoots the needle into the skin. A veritable magnet for security guards!!!
However it is no joke. Anyone with e.g. a peanut allergy, can suffocate through anaphylactic shock unless treated rapidly. It it a good precaution not to have anyone eat peanuts nearby. i too have been on a flight (Easyjet I think) where they refused to sell peanuts due to an allergic passenger's request. Good on them I say!