Skip to main content

Module item

Module item 

Source

Re-exportsยง

use rustc_abi::ExternAbi; ๐Ÿ”’
use rustc_ast::visit::AssocCtxt; ๐Ÿ”’
use rustc_attr_ir::target::AstTarget; ๐Ÿ”’
use rustc_attr_ir::target::Target; ๐Ÿ”’
use rustc_attr_ir::AttributeKind; ๐Ÿ”’
use rustc_attr_ir::EiiImplResolution; ๐Ÿ”’
use rustc_attr_ir::find_attr; ๐Ÿ”’
use rustc_errors::E0570; ๐Ÿ”’
use rustc_errors::ErrorGuaranteed; ๐Ÿ”’
use rustc_errors::struct_span_code_err; ๐Ÿ”’
use rustc_hir::def::DefKind; ๐Ÿ”’
use rustc_hir::def::Res; ๐Ÿ”’
use rustc_hir as hir; ๐Ÿ”’
use rustc_hir::HirId; ๐Ÿ”’
use rustc_hir::ImplItemImplKind; ๐Ÿ”’
use rustc_hir::LifetimeSource; ๐Ÿ”’
use rustc_hir::PredicateOrigin; ๐Ÿ”’
use rustc_middle::ty::data_structures::IndexMap; ๐Ÿ”’
use rustc_span::def_id::DefId; ๐Ÿ”’
use rustc_span::def_id::LocalDefId; ๐Ÿ”’
use rustc_span::edit_distance::find_best_match_for_name; ๐Ÿ”’
use rustc_span::DUMMY_SP; ๐Ÿ”’
use rustc_span::DesugaringKind; ๐Ÿ”’
use rustc_span::Ident; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_span::Symbol; ๐Ÿ”’
use rustc_span::kw; ๐Ÿ”’
use rustc_span::sym; ๐Ÿ”’
use smallvec::SmallVec; ๐Ÿ”’
use thin_vec::ThinVec; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use super::diagnostics::InvalidAbi; ๐Ÿ”’
use super::diagnostics::InvalidAbiSuggestion; ๐Ÿ”’
use super::diagnostics::TupleStructWithDefault; ๐Ÿ”’
use super::diagnostics::UnionWithDefault; ๐Ÿ”’
use super::stability::enabled_names; ๐Ÿ”’
use super::stability::gate_unstable_abi; ๐Ÿ”’
use super::DiscardParams; ๐Ÿ”’
use super::FnDeclKind; ๐Ÿ”’
use super::GenericArgsMode; ๐Ÿ”’
use super::ImplTraitContext; ๐Ÿ”’
use super::ImplTraitPosition; ๐Ÿ”’
use super::LoweringContext; ๐Ÿ”’
use super::ParamMode; ๐Ÿ”’
use super::RelaxedBoundForbiddenReason; ๐Ÿ”’
use super::RelaxedBoundPolicy; ๐Ÿ”’
use crate::diagnostics::ConstComptimeFn; ๐Ÿ”’
use crate::diagnostics::ResolvingRestrictionKind; ๐Ÿ”’
use crate::diagnostics::RestrictionAncestorOnly; ๐Ÿ”’
use rustc_ast::*; ๐Ÿ”’

Functionsยง

add_ty_alias_where_clause ๐Ÿ”’
When we have a ty alias we may have two where clauses. To give the best diagnostics, we set the span to the where clause that is preferred, if it exists. Otherwise, it sets the span to the other where clause if it exists.