376 matches across 25 files for error lang:
snippet_mode: grep · sorted by relevance
compiler/rustc_codegen_llvm/src/llvm/ffi.rs RUST 12 matches · showing 5 view file →
102 pub(crate) fn to_rust(self) -> T
103 where
104 T::Error: Debug,
105 {
106 // If this fails, the Rust-side enum is out of sync with LLVM's enum.
· · ·
124///
125/// In order for Rust-C LTO to work, we must specify behaviors compatible with Clang. Notably,
126/// 'Error' and 'Warning' cannot be mixed for a given flag.
127///
128/// There is a stable LLVM-C version of this enum (`LLVMModuleFlagBehavior`),
· · ·
132#[repr(C)]
133pub(crate) enum ModuleFlagMergeBehavior {
134 Error = 1,
135 Warning = 2,
136 Require = 3,
· · ·
556#[allow(dead_code)] // Variants constructed by C++.
557pub(crate) enum DiagnosticLevel {
558 Error,
559 Warning,
560 Note,
· · ·
882pub(crate) type GetSymbolsCallback =
883 unsafe extern "C" fn(*mut c_void, *const c_char) -> *mut c_void;
884pub(crate) type GetSymbolsErrorCallback = unsafe extern "C" fn(*const c_char) -> *mut c_void;
885
886unsafe extern "C" {
+ 7 more matches in this file
compiler/rustc_error_messages/src/lib.rs RUST 6 matches · showing 5 view file →
7
8pub use fluent_bundle::types::FluentType;
9pub use fluent_bundle::{self, FluentArgs, FluentError, FluentValue};
10use rustc_macros::{Decodable, Encodable, StableHash};
11use rustc_span::Span;
· · ·
20 .add_function("STREQ", |positional, _named| match positional {
21 [FluentValue::String(a), FluentValue::String(b)] => format!("{}", (a == b)).into(),
22 _ => FluentValue::Error,
23 })
24 .expect("Failed to add a function to the bundle.");
· · ·
87///
88/// - They can be *primary spans*. In this case they are the locus of
89/// the error, and would be rendered with `^^^`.
90/// - They can have a *label*. In this case, the label is written next
91/// to the mark in the snippet when we render.
· · ·
220}
221
222fn icu_locale_from_unic_langid(lang: LanguageIdentifier) -> Option<icu_locale::Locale> {
223 icu_locale::Locale::try_from_str(&lang.to_string()).ok()
224}
· · ·
267 impl intl_memoizer::Memoizable for MemoizableListFormatter {
268 type Args = ();
269 type Error = ();
270
271 fn construct(lang: LanguageIdentifier, _args: Self::Args) -> Result<Self, Self::Error> {
+ 1 more matches in this file
compiler/rustc_target/src/spec/mod.rs RUST 31 matches · showing 5 view file →
49use rustc_abi::{
50 Align, CVariadicStatus, CanonAbi, Endian, ExternAbi, Integer, Size, TargetDataLayout,
51 TargetDataLayoutError,
52};
53use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
· · ·
54use rustc_error_messages::{DiagArgValue, IntoDiagArg, into_diag_arg_using_display};
55use rustc_fs_util::try_canonicalize;
56use rustc_macros::{BlobDecodable, Decodable, Encodable, StableHash};
· · ·
190 }
191
192 parse_error_type = "LLD flavor";
193}
194
· · ·
196 /// At this point the target's reference linker flavor doesn't yet exist and we need to infer
197 /// it. The inference always succeeds and gives some result, and we don't report any flavor
198 /// incompatibility errors for json target specs. The CLI flavor is used as the main source
199 /// of truth, other flags are used in case of ambiguities.
200 fn from_cli_json(cli: LinkerFlavorCli, lld_flavor: LldFlavor, is_gnu: bool) -> LinkerFlavor {
· · ·
613impl LinkSelfContainedDefault {
614 /// Returns whether the target spec has self-contained linking explicitly disabled. Used to emit
615 /// errors if the user then enables it on the CLI.
616 pub fn is_disabled(self) -> bool {
617 self == LinkSelfContainedDefault::False
+ 26 more matches in this file
library/compiler-builtins/compiler-builtins/build.rs RUST 4 matches view file →
202 let build = &mut cc::Build::new();
203
204 // AArch64 GCCs exit with an error condition when they encounter any kind of floating point
205 // code if the `nofp` and/or `nosimd` compiler flags have been set.
206 //
· · ·
239 build.flag("-ffreestanding");
240 // Avoid the following warning appearing once **per file**:
241 // clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
242 //
243 // Note that compiler-rt's build system also checks
· · ·
251 if let "aarch64" | "arm64ec" = cfg.target_arch.as_str() {
252 // FIXME(llvm20): Older GCCs on A64 fail to build with
253 // -Werror=implicit-function-declaration due to a compiler-rt bug.
254 // With a newer LLVM we should be able to enable the flag everywhere.
255 // https://github.com/llvm/llvm-project/commit/8aa9d6206ce55bdaaf422839c351fbd63f033b89
· · ·
256 } else {
257 // Avoid implicitly creating references to undefined functions
258 build.flag("-Werror=implicit-function-declaration");
259 }
260 }
library/core/src/panicking.rs RUST 4 matches view file →
34
35#[cfg(feature = "panic_immediate_abort")]
36compile_error!(
37 "panic_immediate_abort is now a real panic strategy! \
38 Enable it with `panic = \"immediate-abort\"` in Cargo.toml, \
· · ·
160// reducing binary size impact.
161macro_rules! panic_const {
162 ($($lang:ident = $message:expr,)+) => {
163 $(
164 /// This is a panic called with a message that's a result of a MIR-produced Assert.
· · ·
216
217/// Like `panic`, but without unwinding and track_caller to reduce the impact on codesize on the caller.
218/// If you want `#[track_caller]` for nicer errors, call `panic_nounwind_fmt` directly.
219#[cfg_attr(not(panic = "immediate-abort"), inline(never), cold)]
220#[cfg_attr(panic = "immediate-abort", inline)]
· · ·
238#[rustc_diagnostic_item = "unreachable_display"] // needed for `non-fmt-panics` lint
239pub fn unreachable_display<T: fmt::Display>(x: &T) -> ! {
240 panic_fmt(format_args!("internal error: entered unreachable code: {}", *x));
241}
242
src/bootstrap/src/core/build_steps/compile.rs RUST 12 matches · showing 5 view file →
470 } else if target.is_windows_gnu() || target.is_windows_gnullvm() {
471 for obj in ["crt2.o", "dllcrt2.o"].iter() {
472 let src = compiler_file(builder, &builder.cc(target), target, CLang::C, obj);
473 let dst = libdir_self_contained.join(obj);
474 builder.copy_link(&src, &dst, FileType::NativeLibrary);
· · ·
1235
1236 // If the rustc output is piped to e.g. `head -n1` we want the process to be killed, rather than
1237 // having an error bubble up and cause a panic.
1238 //
1239 // FIXME(jieyouxu): this flag is load-bearing for rustc to not ICE on broken pipes, because
· · ·
1240 // rustc internally sometimes uses std `println!` -- but std `println!` by default will panic on
1241 // broken pipes, and uncaught panics will manifest as an ICE. The compiler *should* handle this
1242 // properly, but this flag is set in the meantime to paper over the I/O errors.
1243 //
1244 // See <https://github.com/rust-lang/rust/issues/131059> for details.
· · ·
1245 //
1246 // Also see the discussion for properly handling I/O errors related to broken pipes, i.e. safe
1247 // variants of `println!` in
1248 // <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F>.
· · ·
1250
1251 // Building with protected visibility reduces the number of dynamic relocations needed, giving
1252 // us a faster startup time. However GNU ld < 2.40 will error if we try to link a shared object
1253 // with direct references to protected symbols, so for now we only use protected symbols if
1254 // linking with LLD is enabled.
+ 7 more matches in this file
src/bootstrap/src/core/build_steps/doc.rs RUST 11 matches · showing 5 view file →
24
25macro_rules! book {
26 ($($name:ident, $path:expr, $book_name:expr, $lang:expr ;)+) => {
27 $(
28 #[derive(Debug, Clone, Hash, PartialEq, Eq)]
· · ·
1232
1233#[derive(Debug, Clone, Hash, PartialEq, Eq)]
1234pub struct ErrorIndex {
1235 compilers: RustcPrivateCompilers,
1236}
· · ·
1237
1238impl Step for ErrorIndex {
1239 type Output = ();
1240 const IS_HOST: bool = true;
· · ·
1241
1242 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1243 run.path("src/tools/error_index_generator")
1244 }
1245
· · ·
1249
1250 fn make_run(run: RunConfig<'_>) {
1251 run.builder.ensure(ErrorIndex {
1252 compilers: RustcPrivateCompilers::new(run.builder, run.builder.top_stage, run.target),
1253 });
+ 6 more matches in this file
src/bootstrap/src/core/build_steps/llvm.rs RUST 11 matches · showing 5 view file →
394 || target.contains("apple-visionos")
395 {
396 // Prevent cmake from adding -bundle to CFLAGS automatically, which leads to a compiler error because "-bitcode_bundle" also gets added.
397 cfg.define("LLVM_ENABLE_PLUGINS", "OFF");
398 // Zlib fails to link properly, leading to a compiler error.
· · ·
398 // Zlib fails to link properly, leading to a compiler error.
399 cfg.define("LLVM_ENABLE_ZLIB", "OFF");
400 }
· · ·
653
654 if builder.config.quiet {
655 // Only log errors and warnings from `cmake`.
656 cfg.define("CMAKE_MESSAGE_LOG_LEVEL", "WARNING");
657
· · ·
736 cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
737
738 // These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error.
739 cfg.define("CMAKE_OSX_SYSROOT", "/");
740 cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");
· · ·
801 // https://github.com/llvm/llvm-project/issues/88780 to be fixed.
802 for flag in builder
803 .cc_handled_clags(target, CLang::C)
804 .into_iter()
805 .chain(builder.cc_unhandled_cflags(target, GitRepo::Llvm, CLang::C))
+ 6 more matches in this file
src/bootstrap/src/core/build_steps/test.rs RUST 25 matches · showing 5 view file →
288 if run.builder.top_stage == 0 {
289 eprintln!(
290 "ERROR: running cargotest with stage 0 is currently unsupported. Use at least stage 1."
291 );
292 exit!(1);
· · ·
723
724 // Miri has its own "target dir" for ui test dependencies. Make sure it gets cleared when
725 // the sysroot gets rebuilt, to avoid "found possibly newer version of crate `std`" errors.
726 if !builder.config.dry_run() {
727 // This has to match `CARGO_TARGET_TMPDIR` in Miri's `ui.rs`.
· · ·
783 // `MIRI_SKIP_UI_CHECKS` and `RUSTC_BLESS` are incompatible
784 cargo.env_remove("RUSTC_BLESS");
785 // Optimizations can change error locations and remove UB so don't run `fail` tests.
786 cargo.args(["tests/pass", "tests/panic"]);
787
· · ·
906 if builder.top_stage == 0 && !builder.config.compiletest_allow_stage0 {
907 eprintln!("\
908ERROR: `--stage 0` causes compiletest to query information from the stage0 (precompiled) compiler, instead of the in-tree compiler, which can cause some tests to fail inappropriately
909NOTE: if you're sure you want to do this, please open an issue as to why. In the meantime, you can override this with `--set build.compiletest-allow-stage0=true`."
910 );
· · ·
1083 let _guard = builder.msg_test("clippy", target, target_compiler.stage);
1084
1085 // Clippy reports errors if it blessed the outputs
1086 if cargo.allow_failure().run(builder) {
1087 // The tests succeeded; nothing to do.
+ 20 more matches in this file
src/bootstrap/src/core/builder/cargo.rs RUST 10 matches · showing 5 view file →
389 let env = format!("CFLAGS_{triple_underscored}");
390 let mut cflags =
391 builder.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::C).join(" ");
392 if let Ok(var) = std::env::var(&env) {
393 cflags.push(' ');
· · ·
410 let env = format!("CXXFLAGS_{triple_underscored}");
411 let mut cxxflags =
412 builder.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::Cxx).join(" ");
413 if let Ok(var) = std::env::var(&env) {
414 cxxflags.push(' ');
· · ·
562
563 // Bootstrap only supports modern FIFO jobservers. Older pipe-based jobservers can run into
564 // "invalid file descriptor" errors, as the jobserver file descriptors are not inherited by
565 // scripts like bootstrap.py, while the environment variable is propagated. So, we pass
566 // MAKEFLAGS only if we detect a FIFO jobserver, otherwise we clear it.
· · ·
779 // supported by the target.
780 if target != compiler.host && cmd_kind != Kind::Check {
781 let error = self
782 .rustc_cmd(compiler)
783 .arg("--target")
· · ·
794 .stderr();
795
796 let not_supported = error
797 .lines()
798 .any(|line| line.contains("unsupported crate type `proc-macro`"));
+ 5 more matches in this file
src/bootstrap/src/core/config/config.rs RUST 30 matches · showing 5 view file →
118 pub skip: Vec<PathBuf>,
119 pub include_default_paths: bool,
120 pub rustc_error_format: Option<String>,
121 pub json_output: bool,
122 pub compile_time_deps: bool,
· · ·
177 pub llvm_allow_old_toolchain: bool,
178 pub llvm_polly: bool,
179 pub llvm_clang: bool,
180 pub llvm_enable_warnings: bool,
181 pub llvm_from_ci: bool,
· · ·
365 pub(crate) fn parse_inner(
366 flags: Flags,
367 get_toml: impl Fn(&Path) -> Result<TomlConfig, toml::de::Error>,
368 ) -> Config {
369 // Destructure flags to ensure that we use all its fields
· · ·
383 skip: flags_skip,
384 include_default_paths: flags_include_default_paths,
385 rustc_error_format: flags_rustc_error_format,
386 on_fail: flags_on_fail,
387 dry_run: flags_dry_run,
· · ·
622 offload_clang_dir: llvm_clang_dir,
623 polly: llvm_polly,
624 clang: llvm_clang,
625 enable_warnings: llvm_enable_warnings,
626 download_ci_llvm: llvm_download_ci_llvm,
+ 25 more matches in this file
src/bootstrap/src/core/config/toml/llvm.rs RUST 2 matches view file →
37 polly: Option<bool> = "polly",
38 offload_clang_dir: Option<String> = "offload-clang-dir",
39 clang: Option<bool> = "clang",
40 enable_warnings: Option<bool> = "enable-warnings",
41 download_ci_llvm: Option<StringOrBool> = "download-ci-llvm",
· · ·
56 if Some(current) != $expected.as_ref() {
57 return Err(format!(
58 "ERROR: Setting `llvm.{}` is incompatible with `llvm.download-ci-llvm`. \
59 Current value: {:?}, Expected value(s): {}{:?}",
60 stringify!($expected).replace("_", "-"),
src/bootstrap/src/lib.rs RUST 13 matches · showing 5 view file →
460 Some(_sudo_user) => {
461 // SAFETY: getuid() system call is always successful and no return value is reserved
462 // to indicate an error.
463 //
464 // For more context, see https://man7.org/linux/man-pages/man2/geteuid.2.html
· · ·
616 crate::core::sanity::check(&mut build);
617
618 // Make sure we update these before gathering metadata so we don't get an error about missing
619 // Cargo.toml files.
620 let rust_submodules = ["library/backtrace"];
· · ·
1046 } else {
1047 // Return the most normal file name, even though
1048 // it doesn't exist, so that any error message
1049 // refers to that.
1050 filecheck
· · ·
1286 }
1287 let base = match c {
1288 CLang::C => self.cc[&target].clone(),
1289 CLang::Cxx => self.cxx[&target].clone(),
1290 };
· · ·
1289 CLang::Cxx => self.cxx[&target].clone(),
1290 };
1291
+ 8 more matches in this file
src/bootstrap/src/utils/cc_detect.rs RUST 5 matches view file →
114
115 build.cc.insert(target, compiler.clone());
116 let mut cflags = build.cc_handled_clags(target, CLang::C);
117 cflags.extend(build.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::C));
118
· · ·
117 cflags.extend(build.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::C));
118
119 // If we use llvm-libunwind, we will need a C++ compiler as well for all targets
· · ·
141 build.do_if_verbose(|| println!("CFLAGS_{} = {cflags:?}", target.triple));
142 if let Ok(cxx) = build.cxx(target) {
143 let mut cxxflags = build.cc_handled_clags(target, CLang::Cxx);
144 cxxflags.extend(build.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::Cxx));
145 build.do_if_verbose(|| println!("CXX_{} = {cxx:?}", target.triple));
· · ·
144 cxxflags.extend(build.cc_unhandled_cflags(target, GitRepo::Rustc, CLang::Cxx));
145 build.do_if_verbose(|| println!("CXX_{} = {cxx:?}", target.triple));
146 build.do_if_verbose(|| println!("CXXFLAGS_{} = {cxxflags:?}", target.triple));
· · ·
225 } else {
226 if build.config.is_running_on_ci() {
227 panic!("ERROR: WASI_SDK_PATH must be configured for a -wasi target on CI");
228 }
229 println!("WARNING: WASI_SDK_PATH not set, using default cc/cxx compiler");
src/bootstrap/src/utils/helpers.rs RUST 4 matches view file →
43/// * The file/line of the panic
44/// * The expression that failed
45/// * The error itself
46///
47/// This is currently used judiciously throughout the build system rather than
· · ·
188pub fn move_file<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()> {
189 match fs::rename(&from, &to) {
190 Err(e) if e.kind() == io::ErrorKind::CrossesDevices => {
191 std::fs::copy(&from, &to)?;
192 std::fs::remove_file(&from)
· · ·
346///
347/// When `clang-cl` is used with instrumentation, we need to add clang's runtime library resource
348/// directory to the linker flags, otherwise there will be linker errors about the profiler runtime
349/// missing. This function returns the path to that directory.
350pub fn get_clang_cl_resource_dir(builder: &Builder<'_>, clang_cl_path: &str) -> PathBuf {
· · ·
352 // - we ask `clang-cl` to locate the `clang_rt.builtins` lib.
353 let mut builtins_locator = command(clang_cl_path);
354 builtins_locator.args(["/clang:-print-libgcc-file-name", "/clang:--rtlib=compiler-rt"]);
355
356 let clang_rt_builtins = builtins_locator.run_capture_stdout(builder).stdout();
src/doc/rustc/src/linker-plugin-lto.md MARKDOWN 5 matches view file →
146
147You will want to make sure your rust major LLVM version matches your installed LLVM tooling version,
148otherwise it is likely you will get linker errors:
149
150```bat
· · ·
153```
154
155If you are compiling any proc-macros, you will get this error:
156
157```bash
· · ·
158error: Linker plugin based LTO is not supported together with `-C prefer-dynamic` when
159targeting Windows-like targets
160```
· · ·
170set CC=clang-cl
171set CXX=clang-cl
172set CFLAGS=/clang:-flto=thin /clang:-fuse-ld=lld-link
173set CXXFLAGS=/clang:-flto=thin /clang:-fuse-ld=lld-link
174REM Needed because msvc's lib.exe crashes on LLVM LTO .obj files
· · ·
173set CXXFLAGS=/clang:-flto=thin /clang:-fuse-ld=lld-link
174REM Needed because msvc's lib.exe crashes on LLVM LTO .obj files
175set AR=llvm-lib
src/tools/clippy/clippy_lints/src/doc/mod.rs RUST 13 matches · showing 5 view file →
6use clippy_utils::{is_entrypoint_fn, is_trait_impl_item};
7use rustc_data_structures::fx::FxHashSet;
8use rustc_errors::Applicability;
9use rustc_hir::{Attribute, FieldDef, ImplItemKind, ItemKind, Node, Safety, TraitItemKind};
10use rustc_lint::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext};
· · ·
424 /// ### What it does
425 /// Checks the doc comments of publicly visible functions that
426 /// return a `Result` type and warns if there is no `# Errors` section.
427 ///
428 /// ### Why is this bad?
· · ·
429 /// Documenting the type of errors that can be returned from a
430 /// function can help callers write code to handle the errors appropriately.
431 ///
· · ·
430 /// function can help callers write code to handle the errors appropriately.
431 ///
432 /// ### Examples
· · ·
433 /// Since the following function returns a `Result` it has an `# Errors` section in
434 /// its doc comment:
435 ///
+ 8 more matches in this file
src/tools/miri/src/shims/unix/freebsd/sync.rs RUST 7 matches · showing 5 view file →
103
104 let Some(umtx_time) = this.read_umtx_time(&umtx_time_place)? else {
105 return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest);
106 };
107
· · ·
124 let timespec = this.ptr_to_mplace(uaddr2, timespec_layout);
125 let Some(duration) = this.read_timespec(&timespec)? else {
126 return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest);
127 };
128
· · ·
131 // code (umtx_copyin_umtx_time() in kern_umtx.c), it seems to default to CLOCK_REALTIME,
132 // so that's what we also do.
133 // Discussion in golang: https://github.com/golang/go/issues/17168#issuecomment-250235271
134 Some(this.machine.timeout(
135 TimeoutClock::RealTime,
· · ·
138 ))
139 } else {
140 return this.set_errno_and_return_neg1(LibcError("EINVAL"), dest);
141 }
142 };
· · ·
159 }
160 UnblockKind::TimedOut => {
161 ecx.set_errno_and_return_neg1(LibcError("ETIMEDOUT"), &dest)
162 }
163 }
+ 2 more matches in this file
src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower.rs RUST 33 matches · showing 5 view file →
600 // FIXME: Keyword check?
601 let lifetime_ref = match &*lifetime.text() {
602 "" | "'" => LifetimeRef::Error,
603 "'static" => LifetimeRef::Static,
604 "'_" => LifetimeRef::Placeholder,
· · ·
636 .and_then(|it| self.lower_path(it, impl_trait_lower_fn))
637 .map(TypeRef::Path)
638 .unwrap_or(TypeRef::Error),
639 ast::Type::PtrType(inner) => {
640 let inner_ty = self.lower_type_ref_opt(inner.ty(), impl_trait_lower_fn);
· · ·
708 if self.outer_impl_trait {
709 // Disallow nested impl traits
710 TypeRef::Error
711 } else {
712 return self.with_outer_impl_trait_scope(true, |this| {
· · ·
734 return id;
735 }
736 None => TypeRef::Error,
737 },
738 };
· · ·
741
742 pub(crate) fn lower_type_ref_disallow_impl_trait(&mut self, node: ast::Type) -> TypeRefId {
743 self.lower_type_ref(node, &mut Self::impl_trait_error_allocator)
744 }
745
+ 28 more matches in this file
src/tools/rust-analyzer/crates/hir-def/src/expr_store/lower/format_args.rs RUST 3 matches view file →
281 // Ensure all argument indexes actually fit in 16 bits, as we truncated them to 16 bits before.
282 if argmap.len() > u16::MAX as usize {
283 // FIXME: Emit an error.
284 // ctx.dcx().span_err(macsp, "too many format arguments");
285 }
· · ·
1010 let new_fn = self.store.exprs.alloc(Expr::Path(new_fn));
1011 if let Some(arg_ptr) = arg_ptr {
1012 // Trait errors (the argument does not implement the expected fmt trait) will show
1013 // on this path, so to not end up with synthetic syntax we insert this mapping. We
1014 // don't want to insert the other way's mapping in order to not override the source
· · ·
1027 fn ty_rel_lang_path_desugared_expr(
1028 &mut self,
1029 lang: Option<impl Into<LangItemTarget>>,
1030 relative_name: Symbol,
1031 ) -> ExprId {
src/tools/rust-analyzer/crates/ide-completion/src/context.rs RUST 2 matches view file →
735 .generic_def()
736 .and_then(|def| ty.try_rebase_into_owner(self.db, def))
737 .unwrap_or_else(|| ty.instantiate_with_errors())
738 }
739}
· · ·
932}
933
934const OP_TRAIT_LANG: &[hir::LangItem] = &[
935 hir::LangItem::AddAssign,
936 hir::LangItem::Add,
src/tools/rust-analyzer/editors/code/src/config.ts TYPESCRIPT 3 matches view file →
28 readonly extensionId = "rust-lang.rust-analyzer";
29
30 configureLang: vscode.Disposable | undefined;
31 workspaceState: vscode.Memento;
32
· · ·
424 }
425
426 get useRustcErrorCode() {
427 return this.get<boolean>("diagnostics.useRustcErrorCode");
428 }
· · ·
427 return this.get<boolean>("diagnostics.useRustcErrorCode");
428 }
429
src/tools/rustbook/src/main.rs RUST 8 matches · showing 5 view file →
4use clap::{ArgMatches, Command, arg, crate_version};
5use mdbook_driver::MDBook;
6use mdbook_driver::errors::Result as Result3;
7use mdbook_i18n_helpers::preprocessors::Gettext;
8use mdbook_spec::Spec;
· · ·
83 Some(("build", sub_matches)) => {
84 if let Err(e) = build(sub_matches) {
85 handle_error(e);
86 }
87 }
· · ·
88 Some(("test", sub_matches)) => {
89 if let Err(e) = test(sub_matches) {
90 handle_error(e);
91 }
92 }
· · ·
126 book_dir: &Path,
127 dest_dir: Option<&PathBuf>,
128 lang: Option<&String>,
129 rust_root: Option<PathBuf>,
130) -> Result3<MDBook> {
· · ·
146 }
147
148 // NOTE: Replacing preprocessors using this technique causes error
149 // messages to be displayed when the original preprocessor doesn't work
150 // (but it otherwise succeeds).
+ 3 more matches in this file
src/tools/tidy/src/extra_checks/mod.rs RUST 87 matches · showing 5 view file →
93
94 macro_rules! extra_check {
95 ($lang:ident, $kind:ident) => {
96 lint_args.iter().any(|arg| arg.matches(ExtraCheckLang::$lang, ExtraCheckKind::$kind))
97 };
· · ·
96 lint_args.iter().any(|arg| arg.matches(ExtraCheckLang::$lang, ExtraCheckKind::$kind))
97 };
98 }
· · ·
182 Ok(p) => Some(p),
183 Err(e) => {
184 check.error(e);
185 None
186 }
· · ·
192
193 if let Err(e) = rustdoc_js::npm_install(root_path, outdir, npm) {
194 check.error(e.to_string());
195 return None;
196 }
· · ·
229 {
230 show_bless_help("spellcheck", "fix typos", bless);
231 check.error(e);
232 }
233}
+ 82 more matches in this file
src/tools/tidy/src/extra_checks/tests.rs RUST 16 matches · showing 5 view file →
1use std::str::FromStr;
2
3use crate::extra_checks::{ExtraCheckArg, ExtraCheckKind, ExtraCheckLang, ExtraCheckParseError};
4
5#[test]
· · ·
11 auto: true,
12 if_installed: true,
13 lang: ExtraCheckLang::Spellcheck,
14 kind: None,
15 },
· · ·
20 auto: true,
21 if_installed: true,
22 lang: ExtraCheckLang::Spellcheck,
23 kind: None,
24 },
· · ·
29 auto: true,
30 if_installed: false,
31 lang: ExtraCheckLang::Spellcheck,
32 kind: None,
33 },
· · ·
38 auto: false,
39 if_installed: true,
40 lang: ExtraCheckLang::Spellcheck,
41 kind: None,
42 },
+ 11 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.