76,653 matches across 25 files for error lang:Rust
snippet_mode: auto · sorted by relevance
compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs RUST 155 matches · showing 5 view file →
9use rustc_data_structures::fx::{FxHashMap, FxHashSet};
10use rustc_data_structures::unord::UnordSet;
11use rustc_errors::codes::*;
12use rustc_errors::{
13 Applicability, Diag, ErrorGuaranteed, Level, MultiSpan, StashKey, StringPart, Suggestions, msg,
· · ·
12use 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;
24use rustc_middle::traits::select::OverflowError;
25use rustc_middle::ty::abstract_const::NotConstEvaluatable;
26use rustc_middle::ty::error::{ExpectedFound, TypeError};
· · ·
26use rustc_middle::ty::error::{ExpectedFound, TypeError};
27use rustc_middle::ty::print::{
28 PrintPolyTraitPredicateExt, PrintPolyTraitRefExt as _, PrintTraitPredicateExt as _,
+ 150 more matches in this file
compiler/rustc_parse/src/parser/expr.rs RUST 185 matches · showing 5 view file →
21use rustc_ast_pretty::pprust;
22use rustc_data_structures::stack::ensure_sufficient_stack;
23use rustc_errors::{Applicability, Diag, PResult, StashKey, Subdiagnostic};
24use rustc_literal_escaper::unescape_char;
25use rustc_session::errors::{ExprParenthesesNeeded, report_lit_error};
· · ·
25use rustc_session::errors::{ExprParenthesesNeeded, report_lit_error};
26use rustc_session::lint::builtin::BREAK_WITH_LABEL_AND_LOOP;
27use rustc_span::edition::Edition;
· · ·
28use 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};
39use 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
+ 180 more matches in this file
compiler/rustc_trait_selection/src/error_reporting/infer/nice_region_error/placeholder_error.rs RUST 21 matches · showing 5 view file →
2
3use rustc_data_structures::intern::Interned;
4use rustc_errors::{Diag, IntoDiagArg};
5use rustc_hir::def::Namespace;
6use rustc_hir::def_id::{CRATE_DEF_ID, DefId};
· · ·
7use rustc_middle::bug;
8use rustc_middle::ty::error::ExpectedFound;
9use rustc_middle::ty::print::{FmtPrinter, Print, PrintTraitRefExt as _, RegionHighlightMode};
10use rustc_middle::ty::{self, GenericArgsRef, RePlaceholder, Region, TyCtxt};
· · ·
11use tracing::{debug, instrument};
12
13use crate::error_reporting::infer::nice_region_error::NiceRegionError;
14use crate::errors::{
15 ActualImplExpectedKind, ActualImplExpectedLifetimeKind, ActualImplExplNotes,
· · ·
14use crate::errors::{
15 ActualImplExpectedKind, ActualImplExpectedLifetimeKind, ActualImplExplNotes,
16 TraitPlaceholderMismatch, TyOrSig,
· · ·
17};
18use crate::infer::{RegionResolutionError, SubregionOrigin, TypeTrace, ValuePairs};
19use crate::traits::{ObligationCause, ObligationCauseCode};
20
+ 16 more matches in this file
compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs RUST 179 matches · showing 5 view file →
5use rustc_ast as ast;
6use rustc_data_structures::fx::FxIndexSet;
7use rustc_errors::codes::*;
8use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, a_or_an, listify, pluralize};
9use rustc_hir as hir;
· · ·
8use 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;
20use 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;
24use rustc_session::errors::ExprParenthesesNeeded;
25use rustc_span::{DUMMY_SP, Ident, Span, kw, sym};
26use rustc_trait_selection::error_reporting::infer::{FailureCode, ObligationCauseExt};
· · ·
26use rustc_trait_selection::error_reporting::infer::{FailureCode, ObligationCauseExt};
27use rustc_trait_selection::infer::InferCtxtExt;
28use rustc_trait_selection::traits::{self, ObligationCauseCode, ObligationCtxt, SelectionContext};
+ 174 more matches in this file
compiler/rustc_hir_typeck/src/expr.rs RUST 183 matches · showing 5 view 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;
14use rustc_errors::codes::*;
15use rustc_errors::{
16 Applicability, Diag, ErrorGuaranteed, MultiSpan, StashKey, Subdiagnostic, listify, pluralize,
· · ·
15use 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};
· · ·
23use rustc_hir::{ExprKind, HirId, QPath, find_attr, is_range_literal};
24use rustc_hir_analysis::NoVariantNamed;
25use rustc_hir_analysis::errors::NoFieldOnType;
26use rustc_hir_analysis::hir_ty_lowering::HirTyLowerer as _;
27use rustc_infer::infer::{self, DefineOpaqueTypes, InferOk, RegionVariableOrigin};
+ 178 more matches in this file
compiler/rustc_resolve/src/diagnostics.rs RUST 124 matches · showing 5 view file →
12use rustc_data_structures::fx::{FxHashMap, FxHashSet};
13use rustc_data_structures::unord::{UnordMap, UnordSet};
14use rustc_errors::codes::*;
15use rustc_errors::{
16 Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, MultiSpan, SuggestionStyle,
· · ·
15use rustc_errors::{
16 Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, MultiSpan, SuggestionStyle,
17 struct_span_code_err,
· · ·
16 Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, MultiSpan, SuggestionStyle,
17 struct_span_code_err,
18};
· · ·
41use tracing::{debug, instrument};
42
43use crate::errors::{
44 self, AddedMacroUse, ChangeImportBinding, ChangeImportBindingSuggestion, ConsiderAddingADerive,
45 ExplicitUnsafeTraits, MacroDefinedLater, MacroRulesNot, MacroSuggMovePosition,
· · ·
50use crate::late::{DiagMetadata, PatternSource, Rib};
51use crate::{
52 AmbiguityError, AmbiguityKind, AmbiguityWarning, BindingError, BindingKey, Decl, DeclKind,
53 DelayedVisResolutionError, Finalize, ForwardGenericParamBanReason, HasGenericParams, IdentKey,
54 LateDecl, MacroRulesScope, Module, ModuleKind, ModuleOrUniformRoot, ParentScope, PathResult,
+ 119 more matches in this file
compiler/rustc_resolve/src/imports.rs RUST 98 matches · showing 5 view file →
9use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
10use rustc_data_structures::intern::Interned;
11use rustc_errors::codes::*;
12use rustc_errors::{
13 Applicability, BufferedEarlyLint, Diagnostic, MultiSpan, pluralize, struct_span_code_err,
· · ·
12use rustc_errors::{
13 Applicability, BufferedEarlyLint, Diagnostic, MultiSpan, pluralize, struct_span_code_err,
14};
· · ·
21use rustc_middle::span_bug;
22use rustc_middle::ty::{TyCtxt, Visibility};
23use rustc_session::errors::feature_err;
24use rustc_session::lint::LintId;
25use rustc_session::lint::builtin::{
· · ·
34use crate::Namespace::{self, *};
35use crate::diagnostics::{DiagMode, Suggestion, import_candidates};
36use crate::errors::{
37 self, CannotBeReexportedCratePublic, CannotBeReexportedCratePublicNS,
38 CannotBeReexportedPrivate, CannotBeReexportedPrivateNS, CannotDetermineImportResolution,
· · ·
42use crate::ref_mut::CmCell;
43use crate::{
44 AmbiguityError, BindingKey, CmResolver, Decl, DeclData, DeclKind, Determinacy, Finalize,
45 IdentKey, ImportSuggestion, ImportSummary, LocalModule, ModuleOrUniformRoot, ParentScope,
46 PathResult, PerNS, Res, ResolutionError, Resolver, ScopeSet, Segment, Used, module_to_string,
+ 93 more matches in this file
compiler/rustc_resolve/src/late.rs RUST 176 matches · showing 5 view file →
20use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
21use rustc_data_structures::unord::{UnordMap, UnordSet};
22use rustc_errors::codes::*;
23use rustc_errors::{
24 Applicability, Diag, DiagArgValue, Diagnostic, ErrorGuaranteed, IntoDiagArg, MultiSpan,
· · ·
23use 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};
35use 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, errors, path_names_to_string, rustdoc,
+ 171 more matches in this file
compiler/rustc_ast_passes/src/ast_validation.rs RUST 119 matches · showing 5 view file →
28use rustc_attr_parsing::validate_attr;
29use rustc_data_structures::fx::FxIndexMap;
30use rustc_errors::{DiagCtxtHandle, Diagnostic, LintBuffer};
31use rustc_feature::Features;
32use rustc_session::Session;
· · ·
33use rustc_session::errors::feature_err;
34use rustc_session::lint::builtin::{
35 DEPRECATED_WHERE_CLAUSE_LOCATION, MISSING_ABI, MISSING_UNSAFE_ON_EXTERN,
· · ·
40use thin_vec::thin_vec;
41
42use crate::errors::{self, TildeConstReason};
43
44/// Is `self` allowed semantically as the first parameter in an `FnDecl`?
· · ·
162 &mut self,
163 ty_alias: &TyAlias,
164 ) -> Result<(), errors::WhereClauseBeforeTypeAlias> {
165 if ty_alias.ty.is_none() || !ty_alias.generics.where_clause.has_where_token {
166 return Ok(());
· · ·
190 }
191
192 errors::WhereClauseBeforeTypeAliasSugg::Move {
193 left: span,
194 snippet: state.s.eof(),
+ 114 more matches in this file
compiler/rustc_parse/src/parser/item.rs RUST 108 matches · showing 5 view file →
9use rustc_ast::util::case::Case;
10use rustc_ast_pretty::pprust;
11use rustc_errors::codes::*;
12use rustc_errors::{Applicability, PResult, StashKey, msg, struct_span_code_err};
13use rustc_session::lint::builtin::VARARGS_WITHOUT_PATTERN;
· · ·
12use 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;
16use 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};
26use crate::errors::{self, FnPointerCannotBeAsync, FnPointerCannotBeConst, MacroExpandsToAdtField};
27use crate::exp;
28
· · ·
65
66 // There shouldn't be any stray semicolons before or after items.
67 // `parse_item` consumes the appropriate semicolons so any leftover is an error.
68 loop {
69 while self.maybe_consume_incorrect_semicolon(items.last().map(|x| &**x)) {} // Eat all bad semicolons
+ 103 more matches in this file
compiler/rustc_resolve/src/ident.rs RUST 77 matches · showing 5 view file →
4use Namespace::*;
5use rustc_ast::{self as ast, NodeId};
6use rustc_errors::ErrorGuaranteed;
7use rustc_hir::def::{DefKind, MacroKinds, Namespace, NonMacroAttrKind, PartialRes, PerNS};
8use rustc_middle::{bug, span_bug};
· · ·
9use rustc_session::errors::feature_err;
10use rustc_session::lint::builtin::PROC_MACRO_DERIVE_RESOLUTION_FALLBACK;
11use rustc_span::edition::Edition;
· · ·
15use tracing::{debug, instrument};
16
17use crate::errors::{ParamKindInEnumDiscriminant, ParamKindInNonTrivialAnonConst};
18use crate::hygiene::Macros20NormalizedSyntaxContext;
19use crate::imports::{Import, NameResolution};
· · ·
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, errors,
29};
+ 72 more matches in this file
src/tools/miri/src/shims/unix/socket.rs RUST 104 matches · showing 5 view file →
81 len: usize,
82 ecx: &mut MiriInterpCx<'tcx>,
83 finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
84 ) -> InterpResult<'tcx> {
85 assert!(communicate_allowed, "cannot have `Socket` with isolation enabled!");
· · ·
96 ptr: Pointer,
97 len: usize,
98 finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
99 } |this, result: Result<(), ()>| {
100 if result.is_err() {
· · ·
101 return finish.call(this, Err(LibcError("ENOTCONN")))
102 }
103
· · ·
127 len: usize,
128 ecx: &mut MiriInterpCx<'tcx>,
129 finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
130 ) -> InterpResult<'tcx> {
131 assert!(communicate_allowed, "cannot have `Socket` with isolation enabled!");
· · ·
142 ptr: Pointer,
143 len: usize,
144 finish: DynMachineCallback<'tcx, Result<usize, IoError>>
145 } |this, result: Result<(), ()>| {
146 if result.is_err() {
+ 99 more matches in this file
compiler/rustc_hir_typeck/src/pat.rs RUST 135 matches · showing 5 view file →
5use rustc_ast as ast;
6use rustc_data_structures::fx::FxHashMap;
7use rustc_errors::codes::*;
8use rustc_errors::{
9 Applicability, Diag, DiagCtxtHandle, Diagnostic, ErrorGuaranteed, Level, MultiSpan, pluralize,
· · ·
8use 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};
19use 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};
24use rustc_session::errors::feature_err;
25use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS;
26use rustc_span::edit_distance::find_best_match_for_name;
+ 130 more matches in this file
compiler/rustc_passes/src/check_attr.rs RUST 97 matches · showing 5 view file →
14use rustc_data_structures::thin_vec::ThinVec;
15use rustc_data_structures::unord::UnordMap;
16use rustc_errors::{DiagCtxtHandle, IntoDiagArg, MultiSpan, msg};
17use rustc_feature::BUILTIN_ATTRIBUTE_MAP;
18use rustc_hir::attrs::diagnostic::Directive;
· · ·
33use rustc_middle::query::Providers;
34use rustc_middle::traits::ObligationCause;
35use rustc_middle::ty::error::{ExpectedFound, TypeError};
36use rustc_middle::ty::{self, TyCtxt, TypingMode, Unnormalized};
37use rustc_middle::{bug, span_bug};
· · ·
38use rustc_session::config::CrateType;
39use rustc_session::errors::feature_err;
40use rustc_session::lint;
41use rustc_session::lint::builtin::{
· · ·
45use rustc_span::edition::Edition;
46use rustc_span::{DUMMY_SP, Ident, Span, Symbol, sym};
47use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
48use rustc_trait_selection::infer::{TyCtxtInferExt, ValuePairs};
49use rustc_trait_selection::traits::ObligationCtxt;
· · ·
50
51use crate::errors;
52
53#[derive(Diagnostic)]
+ 92 more matches in this file
src/tools/miri/src/shims/unix/fs.rs RUST 96 matches · showing 5 view file →
4use std::ffi::OsString;
5use std::fs::{
6 self, DirBuilder, File, FileType, OpenOptions, TryLockError, read_dir, remove_dir, remove_file,
7 rename,
8};
· · ·
9use std::io::{self, ErrorKind, Read, Seek, SeekFrom, Write};
10use std::path::{self, Path, PathBuf};
11use std::time::SystemTime;
· · ·
65 len: usize,
66 ecx: &mut MiriInterpCx<'tcx>,
67 finish: DynMachineCallback<'tcx, Result<usize, IoError>>,
68 ) -> InterpResult<'tcx> {
69 assert!(communicate_allowed, "isolation should have prevented even opening a file");
· · ·
71 // Emulates pread using seek + read + seek to restore cursor position.
72 // Correctness of this emulation relies on sequential nature of Miri execution.
73 // The closure is used to emulate `try` block, since we "bubble" `io::Error` using `?`.
74 let file = &mut &self.file;
75 let mut f = || {
· · ·
90 Ok(read_size)
91 }
92 Err(e) => Err(IoError::HostError(e)),
93 };
94 finish.call(ecx, result)
+ 91 more matches in this file
src/tools/rust-analyzer/crates/hir-ty/src/mir/eval/shim.rs RUST 84 matches · showing 5 view file →
15 mir::eval::{
16 Address, AdtId, Arc, Evaluator, FunctionId, GenericArgs, HasModule, HirDisplay, Interval,
17 IntervalAndTy, IntervalOrOwned, ItemContainerId, Layout, Locals, Lookup, MirEvalError,
18 MirSpan, Mutability, Result, Ty, TyKind, from_bytes, not_supported, pad16,
19 },
· · ·
202 ty: Ty::new_ref(
203 self.interner(),
204 Region::error(self.interner()),
205 ty,
206 Mutability::Not,
· · ·
232 {
233 let [size, align] = args else {
234 return Err(MirEvalError::InternalError(
235 "rustc_allocator args are not provided".into(),
236 ));
· · ·
244 _ if alloc_fn.contains(AttrFlags::RUSTC_REALLOCATOR) => {
245 let [ptr, old_size, align, new_size] = args else {
246 return Err(MirEvalError::InternalError(
247 "rustc_allocator args are not provided".into(),
248 ));
· · ·
306 let mut arg = args
307 .next()
308 .ok_or(MirEvalError::InternalError(
309 "argument of BeginPanic is not provided".into(),
310 ))?
+ 79 more matches in this file
src/tools/rust-analyzer/crates/hir-ty/src/mir/eval.rs RUST 122 matches · showing 5 view file →
3use std::{borrow::Cow, cell::RefCell, fmt::Write, iter, mem, ops::Range};
4
5use base_db::{Crate, target::TargetLoadError};
6use either::Either;
7use hir_def::{
· · ·
40use crate::{
41 CallableDefId, ComplexMemoryMap, InferenceResult, MemoryMap, ParamEnvAndCrate,
42 consteval::{self, ConstEvalError, try_const_usize},
43 db::{HirDatabase, InternedClosureId},
44 display::{ClosureStyle, DisplayTarget, HirDisplay},
· · ·
45 infer::PointerCast,
46 layout::{Layout, LayoutError, RustcEnumVariantIdx},
47 method_resolution::{is_dyn_method, lookup_impl_const},
48 next_solver::{
· · ·
49 AliasTy, Allocation, AllocationData, Const, ConstKind, DbInterner, ErrorGuaranteed,
50 GenericArgs, Region, StoredTy, Ty, TyKind, TypingMode, UnevaluatedConst, ValTree,
51 infer::{DbInternerInferExt, InferCtxt, traits::ObligationCause},
· · ·
57
58use super::{
59 AggregateKind, BasicBlockId, BinOp, CastKind, LocalId, MirBody, MirLowerError, MirSpan,
60 Operand, OperandKind, Place, PlaceElem, ProjectionElem, ProjectionStore, Rvalue, StatementKind,
61 TerminatorKind, UnOp, return_slot,
+ 117 more matches in this file
compiler/rustc_hir_analysis/src/check/wfcheck.rs RUST 119 matches · showing 5 view file →
6use rustc_ast as ast;
7use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
8use rustc_errors::codes::*;
9use rustc_errors::{Applicability, ErrorGuaranteed, msg, pluralize, struct_span_code_err};
10use rustc_hir as hir;
· · ·
9use 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;
21use 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};
30use rustc_session::errors::feature_err;
31use rustc_span::{DUMMY_SP, Span, sym};
32use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
· · ·
32use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
33use rustc_trait_selection::regions::{InferCtxtRegionExt, OutlivesEnvironmentBuildExt};
34use rustc_trait_selection::traits::misc::{
+ 114 more matches in this file
compiler/rustc_session/src/session.rs RUST 88 matches · showing 5 view file →
14 AppendOnlyVec, DynSend, DynSync, Lock, MappedReadGuard, ReadGuard, RwLock,
15};
16use rustc_errors::annotate_snippet_emitter_writer::AnnotateSnippetEmitter;
17use rustc_errors::codes::*;
18use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination};
· · ·
17use rustc_errors::codes::*;
18use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination};
19use rustc_errors::json::JsonEmitter;
· · ·
18use rustc_errors::emitter::{DynEmitter, HumanReadableErrorType, OutputTheme, stderr_destination};
19use rustc_errors::json::JsonEmitter;
20use rustc_errors::timings::TimingSectionHandler;
· · ·
19use rustc_errors::json::JsonEmitter;
20use rustc_errors::timings::TimingSectionHandler;
21use rustc_errors::{
· · ·
20use rustc_errors::timings::TimingSectionHandler;
21use rustc_errors::{
22 Diag, DiagCtxt, DiagCtxtHandle, DiagMessage, Diagnostic, ErrorGuaranteed, FatalAbort,
+ 83 more matches in this file
library/std/src/sys/fs/windows.rs RUST 91 matches · showing 5 view file →
4use crate::borrow::Cow;
5use crate::ffi::{OsStr, OsString, c_void};
6use crate::fs::TryLockError;
7use crate::io::{self, BorrowedCursor, Error, IoSlice, IoSliceMut, SeekFrom};
8use crate::mem::{self, MaybeUninit, offset_of};
· · ·
7use 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;
14use 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
src/tools/miri/src/bin/miri.rs RUST 47 matches · showing 5 view file →
63use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
64use rustc_middle::ty::{self, Ty, TyCtxt};
65use rustc_session::config::{CrateType, ErrorOutputType, OptLevel};
66use rustc_session::{EarlyDiagCtxt, Session};
67use rustc_span::def_id::DefId;
· · ·
143 eprintln!("FAILING SEED: {seed}");
144 if !many_seeds.keep_going {
145 // `abort_if_errors` would unwind but would not actually stop miri, since
146 // `par_for_each` waits for the rest of the threads to finish.
147 exit(return_code.get());
· · ·
168/// target features.
169fn make_miri_codegen_backend(sess: &Session) -> Box<dyn CodegenBackend> {
170 let early_dcx = EarlyDiagCtxt::new(sess.opts.error_format);
171
172 // Use the target_config method of the default codegen backend (eg LLVM) to ensure the
· · ·
203 // Compilation is done, interpretation is starting. Deal with diagnostics from the
204 // compilation part. We cannot call `sess.finish_diagnostics()` as then "aborting due to
205 // previous errors" gets printed twice.
206 tcx.dcx().emit_stashed_diagnostics();
207 tcx.dcx().abort_if_errors();
· · ·
207 tcx.dcx().abort_if_errors();
208 tcx.dcx().flush_delayed();
209
+ 42 more matches in this file
compiler/rustc_metadata/src/creader.rs RUST 98 matches · showing 5 view file →
2
3use std::collections::BTreeMap;
4use std::error::Error;
5use std::path::Path;
6use std::str::FromStr;
· · ·
8use std::{cmp, env, iter};
9
10use rustc_ast::expand::allocator::{ALLOC_ERROR_HANDLER, AllocatorKind, global_fn_name};
11use rustc_ast::{self as ast, *};
12use rustc_data_structures::fx::FxHashSet;
· · ·
40use tracing::{debug, info, trace};
41
42use crate::errors;
43use crate::locator::{CrateError, CrateLocator, CratePaths, CrateRejections};
44use crate::rmeta::{
· · ·
43use 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>,
+ 93 more matches in this file
compiler/rustc_borrowck/src/diagnostics/mod.rs RUST 76 matches · showing 5 view file →
5use rustc_abi::{FieldIdx, VariantIdx};
6use rustc_data_structures::fx::FxIndexMap;
7use rustc_errors::formatting::DiagMessageAddArg;
8use rustc_errors::{Applicability, Diag, DiagMessage, EmissionGuarantee, MultiSpan, listify, msg};
9use rustc_hir::def::{CtorKind, Namespace};
· · ·
8use 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};
15use 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;
26use 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};
· · ·
27use 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
compiler/rustc_hir_analysis/src/check/check.rs RUST 73 matches · showing 5 view file →
4use rustc_abi::{ExternAbi, FieldIdx, ScalableElt};
5use rustc_data_structures::unord::{UnordMap, UnordSet};
6use rustc_errors::codes::*;
7use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan};
8use rustc_hir as hir;
· · ·
7use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan};
8use rustc_hir as hir;
9use rustc_hir::attrs::ReprAttr::ReprPacked;
· · ·
17use rustc_middle::middle::resolve_bound_vars::ResolvedArg;
18use rustc_middle::middle::stability::EvalResult;
19use rustc_middle::ty::error::TypeErrorToStringExt;
20use rustc_middle::ty::layout::{LayoutError, MAX_SIMD_LANES};
21use rustc_middle::ty::util::Discr;
· · ·
20use rustc_middle::ty::layout::{LayoutError, MAX_SIMD_LANES};
21use rustc_middle::ty::util::Discr;
22use rustc_middle::ty::{
· · ·
26use rustc_session::lint::builtin::UNINHABITED_STATIC;
27use rustc_target::spec::{AbiMap, AbiMapping};
28use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
29use rustc_trait_selection::traits;
30use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt;
+ 68 more matches in this file
compiler/rustc_hir_analysis/src/check/compare_impl_item.rs RUST 115 matches · showing 5 view file →
6use hir::def_id::{DefId, DefIdMap, LocalDefId};
7use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
8use rustc_errors::codes::*;
9use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan, pluralize, struct_span_code_err};
10use rustc_hir::def::{DefKind, Res};
· · ·
9use 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;
15use 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};
23use 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};
+ 110 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.