rustc_infer/
lib.rs

1//! This crates defines the type inference engine.
2//!
3//! - **Type inference.** The type inference code can be found in the `infer` module;
4//!   this code handles low-level equality and subtyping operations. The
5//!   type check pass in the compiler is found in the `rustc_hir_analysis` crate.
6//!
7//! For more information about how rustc works, see the [rustc dev guide].
8//!
9//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/
10//!
11//! # Note
12//!
13//! This API is completely unstable and subject to change.
14
15// tidy-alphabetical-start
16#![allow(rustc::direct_use_of_rustc_type_ir)]
17#![feature(assert_matches)]
18#![feature(extend_one)]
19#![recursion_limit = "512"] // For rustdoc
20// tidy-alphabetical-end
21
22mod errors;
23pub mod infer;
24pub mod traits;
25
26#[allow(non_upper_case_globals)]
#[doc(hidden)]
#[doc =
r" Auto-generated constants for type-checked references to Fluent messages."]
pub(crate) mod fluent_generated {
    #[doc =
    "Constant referring to Fluent message `infer_opaque_hidden_type` from `infer`"]
    pub const infer_opaque_hidden_type: rustc_errors::DiagMessage =
        rustc_errors::DiagMessage::FluentIdentifier(std::borrow::Cow::Borrowed("infer_opaque_hidden_type"),
            None);
    #[doc =
    "Constant referring to Fluent message `infer_opaque_hidden_type.label` from `infer`"]
    pub const infer_label: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label"));
    #[doc =
    "Constant referring to Fluent message `infer_opaque_hidden_type.opaque_type` from `infer`"]
    pub const infer_opaque_type: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("opaque_type"));
    #[doc =
    "Constant referring to Fluent message `infer_opaque_hidden_type.hidden_type` from `infer`"]
    pub const infer_hidden_type: rustc_errors::SubdiagMessage =
        rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("hidden_type"));
    #[doc =
    r" Constants expected to exist by the diagnostic derive macros to use as default Fluent"]
    #[doc = r" identifiers for different subdiagnostic kinds."]
    pub mod _subdiag {
        #[doc = r" Default for `#[help]`"]
        pub const help: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("help"));
        #[doc = r" Default for `#[note]`"]
        pub const note: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("note"));
        #[doc = r" Default for `#[warn]`"]
        pub const warn: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("warn"));
        #[doc = r" Default for `#[label]`"]
        pub const label: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("label"));
        #[doc = r" Default for `#[suggestion]`"]
        pub const suggestion: rustc_errors::SubdiagMessage =
            rustc_errors::SubdiagMessage::FluentAttr(std::borrow::Cow::Borrowed("suggestion"));
    }
}rustc_fluent_macro::fluent_messages! { "../messages.ftl" }