9use rustc_data_structures::fx::{FxHashMap, FxHashSet};
10use rustc_data_structures::unord::UnordSet;
11▶use rustc_errors::codes::*;
12use rustc_errors::{
13 Applicability, Diag, ErrorGuaranteed, Level, MultiSpan, StashKey, StringPart, Suggestions, msg,
· · ·
12▶use rustc_errors::{
13 Applicability, Diag, ErrorGuaranteed, Level, MultiSpan, StashKey, StringPart, Suggestions, msg,
14 pluralize, struct_span_code_err,
· · ·
13▶ Applicability, Diag, ErrorGuaranteed, Level, MultiSpan, StashKey, StringPart, Suggestions, msg,
14 pluralize, struct_span_code_err,
15};
· · ·
22use rustc_infer::traits::solve::Goal;
23use rustc_middle::traits::SignatureMismatchData;
24▶use rustc_middle::traits::select::OverflowError;
25use rustc_middle::ty::abstract_const::NotConstEvaluatable;
26use rustc_middle::ty::error::{ExpectedFound, TypeError};
· · ·
26▶use rustc_middle::ty::error::{ExpectedFound, TypeError};
27use rustc_middle::ty::print::{
28 PrintPolyTraitPredicateExt, PrintPolyTraitRefExt as _, PrintTraitPredicateExt as _,
+ 147 more matches in this file
21use rustc_ast_pretty::pprust;
22use rustc_data_structures::stack::ensure_sufficient_stack;
23▶use rustc_errors::{Applicability, Diag, PResult, StashKey, Subdiagnostic};
24use rustc_literal_escaper::unescape_char;
25use rustc_session::errors::{ExprParenthesesNeeded, report_lit_error};
· · ·
25▶use rustc_session::errors::{ExprParenthesesNeeded, report_lit_error};
26use rustc_session::lint::builtin::BREAK_WITH_LABEL_AND_LOOP;
27use rustc_span::edition::Edition;
· · ·
28▶use rustc_span::{BytePos, ErrorGuaranteed, Ident, Pos, Span, Spanned, Symbol, kw, respan, sym};
29use thin_vec::{ThinVec, thin_vec};
30use tracing::instrument;
· · ·
37 Restrictions, SemiColonMode, SeqSep, TokenType, Trailing, UsePreAttrPos,
38};
39▶use crate::{errors, exp, maybe_recover_from_interpolated_ty_qpath};
40
41#[derive(Debug)]
· · ·
48 MiddleDot(Symbol, Span, Span, Symbol, Span),
49 /// Invalid
50▶ Error,
51}
52
+ 182 more matches in this file
2
3use rustc_data_structures::intern::Interned;
4▶use rustc_errors::{Diag, IntoDiagArg};
5use rustc_hir::def::Namespace;
6use rustc_hir::def_id::{CRATE_DEF_ID, DefId};
· · ·
7use rustc_middle::bug;
8▶use rustc_middle::ty::error::ExpectedFound;
9use rustc_middle::ty::print::{FmtPrinter, Print, PrintTraitRefExt as _, RegionHighlightMode};
10use rustc_middle::ty::{self, GenericArgsRef, RePlaceholder, Region, TyCtxt};
· · ·
15 TraitPlaceholderMismatch, TyOrSig,
16};
17▶use crate::error_reporting::infer::nice_region_error::NiceRegionError;
18use crate::infer::{RegionResolutionError, SubregionOrigin, TypeTrace, ValuePairs};
19use crate::traits::{ObligationCause, ObligationCauseCode};
· · ·
18▶use crate::infer::{RegionResolutionError, SubregionOrigin, TypeTrace, ValuePairs};
19use crate::traits::{ObligationCause, ObligationCauseCode};
20
· · ·
31 T: for<'a> Print<FmtPrinter<'a, 'tcx>>,
32{
33▶ fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> rustc_errors::DiagArgValue {
34 rustc_errors::DiagArgValue::Str(self.to_string().into())
35 }
+ 15 more matches in this file
5use rustc_ast as ast;
6use rustc_data_structures::fx::FxIndexSet;
7▶use rustc_errors::codes::*;
8use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, a_or_an, listify, pluralize};
9use rustc_hir as hir;
· · ·
8▶use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, a_or_an, listify, pluralize};
9use rustc_hir as hir;
10use rustc_hir::attrs::DivergingBlockBehavior;
· · ·
18use rustc_infer::infer::{BoundRegionConversionTime, DefineOpaqueTypes, InferOk, TypeTrace};
19use rustc_middle::ty::adjustment::AllowTwoPhase;
20▶use rustc_middle::ty::error::TypeError;
21use rustc_middle::ty::{self, IsSuggestable, Ty, TyCtxt, TypeVisitableExt, Unnormalized};
22use rustc_middle::{bug, span_bug};
· · ·
23use rustc_session::Session;
24▶use rustc_session::errors::ExprParenthesesNeeded;
25use rustc_span::{DUMMY_SP, Ident, Span, kw, sym};
26use rustc_trait_selection::error_reporting::infer::{FailureCode, ObligationCauseExt};
· · ·
26▶use rustc_trait_selection::error_reporting::infer::{FailureCode, ObligationCauseExt};
27use rustc_trait_selection::infer::InferCtxtExt;
28use rustc_trait_selection::traits::{self, ObligationCauseCode, ObligationCtxt, SelectionContext};
+ 169 more matches in this file
1// ignore-tidy-filelength
2▶// FIXME: we should move the field error reporting code somewhere else.
3
4//! Type checking expressions.
· · ·
12use rustc_data_structures::stack::ensure_sufficient_stack;
13use rustc_data_structures::unord::UnordMap;
14▶use rustc_errors::codes::*;
15use rustc_errors::{
16 Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey, Subdiagnostic, listify, pluralize,
· · ·
15▶use rustc_errors::{
16 Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey, Subdiagnostic, listify, pluralize,
17 struct_span_code_err,
· · ·
16▶ Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey, Subdiagnostic, listify, pluralize,
17 struct_span_code_err,
18};
· · ·
28use rustc_infer::traits::query::NoSolution;
29use rustc_middle::ty::adjustment::{Adjust, Adjustment, AllowTwoPhase};
30▶use rustc_middle::ty::error::{ExpectedFound, TypeError};
31use rustc_middle::ty::{self, AdtKind, GenericArgsRef, Ty, TypeVisitableExt, Unnormalized};
32use rustc_middle::{bug, span_bug};
+ 176 more matches in this file
7use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
8use rustc_data_structures::intern::Interned;
9▶use rustc_errors::{Applicability, BufferedEarlyLint, Diagnostic};
10use rustc_expand::base::SyntaxExtensionKind;
11use rustc_hir::def::{self, DefKind, PartialRes};
· · ·
14use rustc_middle::span_bug;
15use rustc_middle::ty::Visibility;
16▶use rustc_session::errors::feature_err;
17use rustc_session::lint::LintId;
18use rustc_session::lint::builtin::{
· · ·
32 ConsiderMarkingAsPubCrate,
33};
34▶use crate::error_helper::{OnUnknownData, Suggestion};
35use crate::ref_mut::CmCell;
36use crate::{
· · ·
37▶ AmbiguityError, BindingKey, CmResolver, Decl, DeclData, DeclKind, Determinacy, Finalize,
38 IdentKey, ImportSuggestion, ImportSummary, LocalModule, ModuleOrUniformRoot, ParentScope,
39 PathResult, PerNS, Res, ResolutionError, Resolver, ScopeSet, Segment, Used, module_to_string,
· · ·
39▶ PathResult, PerNS, Res, ResolutionError, Resolver, ScopeSet, Segment, Used, module_to_string,
40 names_to_string,
41};
+ 65 more matches in this file
9use rustc_ast::util::case::Case;
10use rustc_ast_pretty::pprust;
11▶use rustc_errors::codes::*;
12use rustc_errors::{Applicability, PResult, StashKey, msg, struct_span_code_err};
13use rustc_session::lint::builtin::VARARGS_WITHOUT_PATTERN;
· · ·
12▶use rustc_errors::{Applicability, PResult, StashKey, msg, struct_span_code_err};
13use rustc_session::lint::builtin::VARARGS_WITHOUT_PATTERN;
14use rustc_span::edit_distance::edit_distance;
· · ·
15use rustc_span::edition::Edition;
16▶use rustc_span::{DUMMY_SP, ErrorGuaranteed, Ident, Span, Symbol, kw, respan, sym};
17use thin_vec::{ThinVec, thin_vec};
18use tracing::debug;
· · ·
24 Parser, PathStyle, Recovered, Trailing, UsePreAttrPos,
25};
26▶use crate::errors::{
27 self, FnPointerCannotBeAsync, FnPointerCannotBeConst, MacroExpandsToAdtField,
28 UseDoubleColonSuggestion, UseRegularStructSuggestion,
· · ·
68
69 // There shouldn't be any stray semicolons before or after items.
70▶ // `parse_item` consumes the appropriate semicolons so any leftover is an error.
71 loop {
72 while self.maybe_consume_incorrect_semicolon(items.last().map(|x| &**x)) {} // Eat all bad semicolons
+ 107 more matches in this file
47 /// only reachable from the [`SocketState::Connecting`] state.
48 Connected(TcpStream),
49▶ /// The SO_ERROR socket option has been set after calling
50 /// the `connect` syscall, indicating that the connection
51 /// attempt failed. By the POSIX specification, a socket is
· · ·
67 /// The current blocking I/O readiness of the file description.
68 io_readiness: RefCell<BlockingIoSourceReadiness>,
69▶ /// [`Some`] when the socket had an async error which has not yet been fetched via `SO_ERROR`.
70 error: RefCell<Option<io::Error>>,
71 /// Read timeout of the socket. [`None`] means that reads can block indefinitely.
· · ·
70▶ error: RefCell<Option<io::Error>>,
71 /// Read timeout of the socket. [`None`] means that reads can block indefinitely.
72 /// The timeout is applied to the monotonic clock (the Unix specification doesn't
· · ·
117 len: usize,
118 ecx: &mut MiriInterpCx<'tcx>,
119▶ finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
120 ) -> InterpResult<'tcx> {
121 assert!(communicate_allowed, "cannot have `Socket` with isolation enabled!");
· · ·
134 ptr: Pointer,
135 len: usize,
136▶ finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
137 } |this, result: Result<(), ()>| {
138 if result.is_err() {
+ 113 more matches in this file
4use Namespace::*;
5use rustc_ast::{self as ast, NodeId};
6▶use rustc_errors::ErrorGuaranteed;
7use rustc_hir::def::{DefKind, MacroKinds, Namespace, NonMacroAttrKind, PartialRes, PerNS};
8use rustc_middle::{bug, span_bug};
· · ·
9▶use rustc_session::errors::feature_err;
10use rustc_session::lint::builtin::PROC_MACRO_DERIVE_RESOLUTION_FALLBACK;
11use rustc_span::edition::Edition;
· · ·
23use crate::macros::{MacroRulesScope, sub_namespace_match};
24use crate::{
25▶ AmbiguityError, AmbiguityKind, AmbiguityWarning, BindingKey, CmResolver, Decl, DeclKind,
26 Determinacy, Finalize, IdentKey, ImportKind, ImportSummary, LateDecl, LocalModule, Module,
27 ModuleKind, ModuleOrUniformRoot, ParentScope, PathResult, PrivacyError, Res, ResolutionError,
· · ·
27▶ ModuleKind, ModuleOrUniformRoot, ParentScope, PathResult, PrivacyError, Res, ResolutionError,
28 Resolver, Scope, ScopeSet, Segment, Stage, Symbol, Used, diagnostics,
29};
· · ·
88 // (Macro NS)
89 // 1-3. Derive helpers (open, not controlled). All ambiguities with other names
90▶ // are currently reported as errors. They should be higher in priority than preludes
91 // and probably even names in modules according to the "general principles" above. They
92 // also should be subject to restricted shadowing because are effectively produced by
+ 67 more matches in this file
20use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
21use rustc_data_structures::unord::{UnordMap, UnordSet};
22▶use rustc_errors::codes::*;
23use rustc_errors::{
24 Applicability, Diag, DiagArgValue, Diagnostic, ErrorGuaranteed, IntoDiagArg, MultiSpan,
· · ·
23▶use rustc_errors::{
24 Applicability, Diag, DiagArgValue, Diagnostic, ErrorGuaranteed, IntoDiagArg, MultiSpan,
25 StashKey, Suggestions, elided_lifetime_in_path_suggestion, pluralize,
· · ·
24▶ Applicability, Diag, DiagArgValue, Diagnostic, ErrorGuaranteed, IntoDiagArg, MultiSpan,
25 StashKey, Suggestions, elided_lifetime_in_path_suggestion, pluralize,
26};
· · ·
33use rustc_middle::{bug, span_bug};
34use rustc_session::config::{CrateType, ResolveDocLinks};
35▶use rustc_session::errors::feature_err;
36use rustc_session::lint;
37use rustc_span::{BytePos, DUMMY_SP, Ident, Span, Spanned, Symbol, kw, respan, sym};
· · ·
41
42use crate::{
43▶ BindingError, BindingKey, Decl, DelegationFnSig, Finalize, IdentKey, LateDecl, LocalModule,
44 Module, ModuleOrUniformRoot, ParentScope, PathResult, Res, ResolutionError, Resolver, Segment,
45 Stage, TyCtxt, UseError, Used, path_names_to_string, rustdoc, with_owner,
+ 154 more matches in this file
5use rustc_ast as ast;
6use rustc_data_structures::fx::FxHashMap;
7▶use rustc_errors::codes::*;
8use rustc_errors::{
9 Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, Level, MultiSpan, pluralize,
· · ·
8▶use rustc_errors::{
9 Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, Level, MultiSpan, pluralize,
10 struct_span_code_err,
· · ·
9▶ Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, Level, MultiSpan, pluralize,
10 struct_span_code_err,
11};
· · ·
17 PatExprKind, PatKind, expr_needs_parens,
18};
19▶use rustc_hir_analysis::autoderef::report_autoderef_recursion_limit_error;
20use rustc_infer::infer::RegionVariableOrigin;
21use rustc_middle::traits::PatternOriginExpr;
· · ·
22use rustc_middle::ty::{self, Pinnedness, Ty, TypeVisitableExt, Unnormalized};
23use rustc_middle::{bug, span_bug};
24▶use rustc_session::errors::feature_err;
25use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS;
26use rustc_span::edit_distance::find_best_match_for_name;
+ 123 more matches in this file
3use std::{borrow::Cow, cell::RefCell, fmt::Write, iter, mem, ops::Range};
4
5▶use base_db::{Crate, target::TargetLoadError};
6use either::Either;
7use hir_def::{
· · ·
39use crate::{
40 CallableDefId, ComplexMemoryMap, InferBodyId, InferenceResult, MemoryMap, ParamEnvAndCrate,
41▶ consteval::{self, ConstEvalError, try_const_usize},
42 db::{GeneralConstId, HirDatabase, InternedClosureId},
43 display::{ClosureStyle, DisplayTarget, HirDisplay},
· · ·
44 infer::PointerCast,
45▶ layout::{Layout, LayoutError, RustcEnumVariantIdx},
46 method_resolution::{is_dyn_method, lookup_impl_const},
47 next_solver::{
· · ·
48▶ AliasTy, Allocation, AllocationData, Const, ConstKind, DbInterner, ErrorGuaranteed,
49 GenericArgs, Region, StoredTy, Ty, TyKind, TypingMode, UnevaluatedConst, ValTree,
50 infer::{DbInternerInferExt, InferCtxt, traits::ObligationCause},
· · ·
56
57use super::{
58▶ AggregateKind, BasicBlockId, BinOp, CastKind, LocalId, MirBody, MirLowerError, MirSpan,
59 Operand, OperandKind, Place, PlaceElem, PlaceRef, PlaceTy, ProjectionElem, Rvalue,
60 StatementKind, TerminatorKind, UnOp, return_slot,
+ 118 more matches in this file
14 mir::eval::{
15 Address, AdtId, Arc, Evaluator, FunctionId, GenericArgs, HasModule, HirDisplay, Interval,
16▶ IntervalAndTy, IntervalOrOwned, ItemContainerId, Layout, Locals, Lookup, MirEvalError,
17 MirSpan, Mutability, Result, Ty, TyKind, from_bytes, not_supported, pad16,
18 },
· · ·
203 ty: Ty::new_ref(
204 self.interner(),
205▶ Region::error(self.interner()),
206 ty,
207 Mutability::Not,
· · ·
233 {
234 let [size, align] = args else {
235▶ return Err(MirEvalError::InternalError(
236 "rustc_allocator args are not provided".into(),
237 ));
· · ·
245 _ if alloc_fn.contains(AttrFlags::RUSTC_REALLOCATOR) => {
246 let [ptr, old_size, align, new_size] = args else {
247▶ return Err(MirEvalError::InternalError(
248 "rustc_allocator args are not provided".into(),
249 ));
· · ·
307 let mut arg = args
308 .next()
309▶ .ok_or(MirEvalError::InternalError(
310 "argument of BeginPanic is not provided".into(),
311 ))?
+ 79 more matches in this file
12 AppendOnlyVec, DynSend, DynSync, Lock, MappedReadGuard, ReadGuard, RwLock,
13};
14▶use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
15use rustc_errors::codes::*;
16use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination};
· · ·
15▶use rustc_errors::codes::*;
16use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination};
17use rustc_errors::json::JsonEmitter;
· · ·
16▶use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination};
17use rustc_errors::json::JsonEmitter;
18use rustc_errors::timings::TimingSectionHandler;
· · ·
17▶use rustc_errors::json::JsonEmitter;
18use rustc_errors::timings::TimingSectionHandler;
19use rustc_errors::{
· · ·
18▶use rustc_errors::timings::TimingSectionHandler;
19use rustc_errors::{
20 Diag, DiagCtxt, DiagCtxtHandle, DiagMessage, Diagnostic, ErrorGuaranteed, FatalAbort,
+ 83 more matches in this file
4use crate::borrow::Cow;
5use crate::ffi::{OsStr, OsString, c_void};
6▶use crate::fs::TryLockError;
7use crate::io::{self, BorrowedCursor, Error, IoSlice, IoSliceMut, SeekFrom};
8use crate::mem::{self, MaybeUninit, offset_of};
· · ·
7▶use crate::io::{self, BorrowedCursor, Error, IoSlice, IoSliceMut, SeekFrom};
8use crate::mem::{self, MaybeUninit, offset_of};
9use crate::os::windows::io::{AsHandle, BorrowedHandle};
· · ·
12use crate::sync::Arc;
13use crate::sys::handle::Handle;
14▶use crate::sys::pal::api::{self, WinError, set_file_information_by_handle};
15use crate::sys::pal::{IoResult, fill_utf16_buf, to_u16s, truncate_utf16_at_nul};
16use crate::sys::path::{WCStr, maybe_verbatim};
· · ·
123 // This iterator was initialized with an `INVALID_HANDLE_VALUE` as its handle.
124 // Simply return `None` because this is only the case when `FindFirstFileExW` in
125▶ // the construction of this iterator returns `ERROR_FILE_NOT_FOUND` which means
126 // no matchhing files can be found.
127 return None;
· · ·
137 if c::FindNextFileW(handle.0, &mut wfd) == 0 {
138 self.handle = None;
139▶ match api::get_last_error() {
140 WinError::NO_MORE_FILES => return None,
141 WinError { code } => {
+ 86 more matches in this file
59use rustc_middle::query::LocalCrate;
60use rustc_middle::ty::TyCtxt;
61▶use rustc_session::config::{CrateType, ErrorOutputType, OptLevel};
62use rustc_session::{EarlyDiagCtxt, Session};
63
· · ·
91 eprintln!("FAILING SEED: {seed}");
92 if !many_seeds.keep_going {
93▶ // `abort_if_errors` would unwind but would not actually stop miri, since
94 // `par_for_each` waits for the rest of the threads to finish.
95 exit(return_code.get());
· · ·
116/// target features.
117fn make_miri_codegen_backend(sess: &Session) -> Box<dyn CodegenBackend> {
118▶ let early_dcx = EarlyDiagCtxt::new(sess.opts.error_format);
119
120 // Use the target_config method of the default codegen backend (eg LLVM) to ensure the
· · ·
160 // Compilation is done, interpretation is starting. Deal with diagnostics from the
161 // compilation part. We cannot call `sess.finish_diagnostics()` as then "aborting due to
162▶ // previous errors" gets printed twice.
163 tcx.dcx().emit_stashed_diagnostics();
164 tcx.dcx().abort_if_errors();
· · ·
164▶ tcx.dcx().abort_if_errors();
165 tcx.dcx().flush_delayed();
166
+ 43 more matches in this file
3use std::borrow::Cow;
4use std::ffi::OsString;
5▶use std::fs::{self, DirBuilder, File, FileType, OpenOptions, TryLockError};
6use std::io::{self, ErrorKind, Read, Seek, SeekFrom, Write};
7use std::path::{self, Path};
· · ·
6▶use std::io::{self, ErrorKind, Read, Seek, SeekFrom, Write};
7use std::path::{self, Path};
8use std::time::SystemTime;
· · ·
62 len: usize,
63 ecx: &mut MiriInterpCx<'tcx>,
64▶ finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
65 ) -> InterpResult<'tcx> {
66 assert!(communicate_allowed, "isolation should have prevented even opening a file");
· · ·
67 if !self.readable {
68▶ return finish.call(ecx, Err(LibcError("EBADF")));
69 }
70
· · ·
72 // Emulates pread using seek + read + seek to restore cursor position.
73 // Correctness of this emulation relies on sequential nature of Miri execution.
74▶ // The closure is used to emulate `try` block, since we "bubble" `io::Error` using `?`.
75 let file = &mut &self.file;
76 let mut f = || {
+ 87 more matches in this file
6use rustc_ast as ast;
7use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
8▶use rustc_errors::codes::*;
9use rustc_errors::{Applicability, ErrorGuaranteed, msg, pluralize, struct_span_code_err};
10use rustc_hir as hir;
· · ·
9▶use rustc_errors::{Applicability, ErrorGuaranteed, msg, pluralize, struct_span_code_err};
10use rustc_hir as hir;
11use rustc_hir::attrs::{EiiDecl, EiiImpl, EiiImplResolution};
· · ·
19use rustc_lint_defs::builtin::SHADOWING_SUPERTRAIT_ITEMS;
20use rustc_macros::Diagnostic;
21▶use rustc_middle::mir::interpret::ErrorHandled;
22use rustc_middle::traits::solve::NoSolution;
23use rustc_middle::ty::trait_def::TraitSpecializationKind;
· · ·
28};
29use rustc_middle::{bug, span_bug};
30▶use rustc_session::errors::feature_err;
31use rustc_span::{DUMMY_SP, Span, sym};
32use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
· · ·
32▶use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
33use rustc_trait_selection::regions::{InferCtxtRegionExt, OutlivesEnvironmentBuildExt};
34use rustc_trait_selection::traits::misc::{
+ 101 more matches in this file
5use rustc_abi::{FieldIdx, VariantIdx};
6use rustc_data_structures::fx::FxIndexMap;
7▶use rustc_errors::formatting::DiagMessageAddArg;
8use rustc_errors::{Applicability, Diag, DiagMessage, EmissionGuarantee, MultiSpan, listify, msg};
9use rustc_hir::def::{CtorKind, Namespace};
· · ·
8▶use rustc_errors::{Applicability, Diag, DiagMessage, EmissionGuarantee, MultiSpan, listify, msg};
9use rustc_hir::def::{CtorKind, Namespace};
10use rustc_hir::{
· · ·
13use rustc_index::{IndexSlice, IndexVec};
14use rustc_infer::infer::{BoundRegionConversionTime, NllRegionVariableOrigin};
15▶use rustc_infer::traits::SelectionError;
16use rustc_middle::mir::{
17 AggregateKind, CallSource, ConstOperand, ConstraintCategory, FakeReadCause, Local, LocalInfo,
· · ·
24use rustc_mir_dataflow::move_paths::{InitLocation, LookupResult, MoveOutIndex};
25use rustc_span::def_id::LocalDefId;
26▶use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, Spanned, Symbol, sym};
27use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
28use rustc_trait_selection::error_reporting::traits::call_kind::{CallDesugaringKind, call_kind};
· · ·
27▶use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
28use rustc_trait_selection::error_reporting::traits::call_kind::{CallDesugaringKind, call_kind};
29use rustc_trait_selection::infer::InferCtxtExt;
+ 71 more matches in this file
6use hir::def_id::{DefId, DefIdMap, LocalDefId};
7use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
8▶use rustc_errors::codes::*;
9use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan, pluralize, struct_span_code_err};
10use rustc_hir::def::{DefKind, Res};
· · ·
9▶use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan, pluralize, struct_span_code_err};
10use rustc_hir::def::{DefKind, Res};
11use rustc_hir::intravisit::VisitorExt;
· · ·
13use rustc_infer::infer::{self, BoundRegionConversionTime, InferCtxt, TyCtxtInferExt};
14use rustc_infer::traits::util;
15▶use rustc_middle::ty::error::{ExpectedFound, TypeError};
16use rustc_middle::ty::{
17 self, BottomUpFolder, GenericArgs, GenericParamDefKind, Generics, Ty, TyCtxt, TypeFoldable,
· · ·
21use rustc_middle::{bug, span_bug};
22use rustc_span::{BytePos, DUMMY_SP, Span};
23▶use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
24use rustc_trait_selection::infer::InferCtxtExt;
25use rustc_trait_selection::regions::InferCtxtRegionExt;
· · ·
26use rustc_trait_selection::traits::{
27▶ self, FulfillmentError, ObligationCause, ObligationCauseCode, ObligationCtxt,
28};
29use tracing::{debug, instrument};
+ 109 more matches in this file
38use std::ops::{ControlFlow, Deref};
39
40▶use rustc_errors::codes::*;
41use rustc_errors::{Applicability, Diag, struct_span_code_err};
42use rustc_hir::attrs::InlineAttr;
· · ·
41▶use rustc_errors::{Applicability, Diag, struct_span_code_err};
42use rustc_hir::attrs::InlineAttr;
43use rustc_hir::def_id::{DefId, LocalDefId};
· · ·
47use rustc_infer::infer::{DefineOpaqueTypes, InferOk, InferResult, RegionVariableOrigin};
48use rustc_infer::traits::{
49▶ MatchExpressionArmCause, Obligation, PredicateObligation, PredicateObligations, SelectionError,
50};
51use rustc_middle::span_bug;
· · ·
54 PointerCoercion,
55};
56▶use rustc_middle::ty::error::TypeError;
57use rustc_middle::ty::{self, Ty, TyCtxt, TypeVisitableExt, Unnormalized};
58use rustc_span::{BytePos, DUMMY_SP, Span};
· · ·
103 to_mutbl: hir::Mutability,
104) -> RelateResult<'tcx, ()> {
105▶ if from_mutbl >= to_mutbl { Ok(()) } else { Err(TypeError::Mutability) }
106}
107
+ 95 more matches in this file
5
6use rustc_data_structures::fx::FxHashSet;
7▶use rustc_errors::{ErrorGuaranteed, MultiSpan};
8use rustc_hir as hir;
9use rustc_hir::ItemKind;
· · ·
10use rustc_hir::def_id::{DefId, LocalDefId};
11use rustc_hir::lang_items::LangItem;
12▶use rustc_infer::infer::{self, InferCtxt, RegionResolutionError, SubregionOrigin, TyCtxtInferExt};
13use rustc_infer::traits::{Obligation, PredicateObligations};
14use rustc_middle::ty::adjustment::CoerceUnsizedInfo;
· · ·
19};
20use rustc_span::{DUMMY_SP, Span, sym};
21▶use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
22use rustc_trait_selection::traits::misc::{
23 ConstParamTyImplementationError, CopyImplementationError, InfringingFieldsReason,
· · ·
23▶ ConstParamTyImplementationError, CopyImplementationError, InfringingFieldsReason,
24 type_allowed_to_implement_const_param_ty, type_allowed_to_implement_copy,
25};
· · ·
26▶use rustc_trait_selection::traits::{self, FulfillmentError, ObligationCause, ObligationCtxt};
27use tracing::debug;
28
+ 81 more matches in this file
2
3use std::collections::BTreeMap;
4▶use std::error::Error;
5use std::path::Path;
6use std::str::FromStr;
· · ·
8use std::{cmp, env, iter};
9
10▶use rustc_ast::expand::allocator::{ALLOC_ERROR_HANDLER, AllocatorKind, global_fn_name};
11use rustc_ast::{self as ast, *};
12use rustc_data_structures::fx::FxHashSet;
· · ·
41
42use crate::diagnostics;
43▶use crate::locator::{CrateError, CrateLocator, CratePaths, CrateRejections};
44use crate::rmeta::{
45 CrateDep, CrateMetadata, CrateNumMap, CrateRoot, MetadataBlob, TargetModifiers,
· · ·
65 /// If the above is true, then this field denotes the kind of the found allocator.
66 allocator_kind: Option<AllocatorKind>,
67▶ /// This crate needs an allocation error handler and either provides it itself, or finds it in a dependency.
68 /// If the above is true, then this field denotes the kind of the found allocator.
69 alloc_error_handler_kind: Option<AllocatorKind>,
· · ·
69▶ alloc_error_handler_kind: Option<AllocatorKind>,
70 /// This crate has a `#[global_allocator]` item.
71 has_global_allocator: bool,
+ 77 more matches in this file
19use rustc_data_structures::memmap::Mmap;
20use rustc_data_structures::temp_dir::MaybeTempDir;
21▶use rustc_errors::DiagCtxtHandle;
22use rustc_fs_util::{TempDirBuilder, fix_windows_verbatim_for_gcc, try_canonicalize};
23use rustc_hir::attrs::NativeLibKind;
· · ·
63use super::{apple, rmeta_link, versioned_llvm_target};
64use crate::base::needs_allocator_shim_for_linking;
65▶use crate::{CodegenLintLevelSpecs, CompiledModule, CompiledModules, CrateInfo, NativeLib, errors};
66
67pub fn ensure_removed(dcx: DiagCtxtHandle<'_>, path: &Path) {
· · ·
68 if let Err(e) = fs::remove_file(path) {
69▶ if e.kind() != io::ErrorKind::NotFound {
70 dcx.err(format!("failed to remove {}: {}", path.display(), e));
71 }
· · ·
88 let mut tempfiles_for_stdout_output: Vec<PathBuf> = Vec::new();
89 for &crate_type in &crate_info.crate_types {
90▶ // Ignore executable crates if we have -Z no-codegen, as they will error.
91 if (sess.opts.unstable_opts.no_codegen || !sess.opts.output_types.should_codegen())
92 && !output_metadata
· · ·
116 .prefix("rustc")
117 .tempdir_in(output.parent().unwrap_or_else(|| Path::new(".")))
118▶ .unwrap_or_else(|error| sess.dcx().emit_fatal(errors::CreateTempDir { error }));
119 let path = MaybeTempDir::new(tmpdir, sess.opts.cg.save_temps);
120
+ 83 more matches in this file
29use crate::{
30 Adjust, Adjustment, AutoBorrow, CallableDefId, InferBodyId, ParamEnvAndCrate,
31▶ consteval::ConstEvalError,
32 db::{GeneralConstId, HirDatabase, InternedClosure, InternedClosureId},
33 display::{DisplayTarget, HirDisplay, hir_display_with_store},
· · ·
41 },
42 inhabitedness::is_ty_uninhabited_from,
43▶ layout::LayoutError,
44 method_resolution::CandidateId,
45 mir::{
· · ·
99// FIXME: Make this smaller, its stored in database queries
100#[derive(Debug, Clone, PartialEq, Eq)]
101▶pub enum MirLowerError {
102 ConstEvalError(Box<str>, Box<ConstEvalError>),
103 LayoutError(LayoutError),
· · ·
102▶ ConstEvalError(Box<str>, Box<ConstEvalError>),
103 LayoutError(LayoutError),
104 IncompleteExpr,
· · ·
103▶ LayoutError(LayoutError),
104 IncompleteExpr,
105 IncompletePattern,
+ 85 more matches in this file