rustc-ap-rustc_errors 348.0.0

Automatically published version of the package `rustc_errors` in the rust-lang/rust repository from commit 53b622a48a7945e223dbc5cfb30f7cbd38acc7c5 The publishing script for this crate lives at:
use rustc_data_structures::fx::FxHashMap;

pub struct Registry {
    descriptions: FxHashMap<&'static str, &'static str>,

impl Registry {
    pub fn new(descriptions: &[(&'static str, &'static str)]) -> Registry {
        Registry { descriptions: descriptions.iter().cloned().collect() }

    pub fn find_description(&self, code: &str) -> Option<&'static str> {