103 pub(crate) fn to_rust(self) -> T
104 where
105▶ T::Error: Debug,
106 {
107 // If this fails, the Rust-side enum is out of sync with LLVM's enum.
· · ·
125///
126/// In order for Rust-C LTO to work, we must specify behaviors compatible with Clang. Notably,
127▶/// 'Error' and 'Warning' cannot be mixed for a given flag.
128///
129/// There is a stable LLVM-C version of this enum (`LLVMModuleFlagBehavior`),
· · ·
133#[repr(C)]
134pub(crate) enum ModuleFlagMergeBehavior {
135▶ Error = 1,
136 Warning = 2,
137 Require = 3,
· · ·
531#[allow(dead_code)] // Variants constructed by C++.
532pub(crate) enum DiagnosticLevel {
533▶ Error,
534 Warning,
535 Note,
· · ·
858pub(crate) type GetSymbolsCallback =
859 unsafe extern "C" fn(*mut c_void, *const c_char) -> *mut c_void;
860▶pub(crate) type GetSymbolsErrorCallback = unsafe extern "C" fn(*const c_char) -> *mut c_void;
861
862unsafe extern "C" {
+ 7 more matches in this file
7
8pub use fluent_bundle::types::FluentType;
9▶pub 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
222▶fn 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
49use rustc_abi::{
50 Align, CVariadicStatus, CanonAbi, Endian, ExternAbi, Integer, Size, TargetDataLayout,
51▶ TargetDataLayoutError,
52};
53use rustc_data_structures::fx::{FxHashSet, FxIndexSet};
· · ·
54▶use rustc_error_messages::{DiagArgValue, IntoDiagArg, into_diag_arg_using_display};
55use rustc_fs_util::try_canonicalize;
56use rustc_macros::{BlobDecodable, Decodable, Encodable, StableHash};
· · ·
194 }
195
196▶ parse_error_type = "LLD flavor";
197}
198
· · ·
200 /// At this point the target's reference linker flavor doesn't yet exist and we need to infer
201 /// it. The inference always succeeds and gives some result, and we don't report any flavor
202▶ /// incompatibility errors for json target specs. The CLI flavor is used as the main source
203 /// of truth, other flags are used in case of ambiguities.
204 fn from_cli_json(cli: LinkerFlavorCli, lld_flavor: LldFlavor, is_gnu: bool) -> LinkerFlavor {
· · ·
629impl LinkSelfContainedDefault {
630 /// Returns whether the target spec has self-contained linking explicitly disabled. Used to emit
631▶ /// errors if the user then enables it on the CLI.
632 pub fn is_disabled(self) -> bool {
633 self == LinkSelfContainedDefault::False
+ 26 more matches in this file
199 let build = &mut cc::Build::new();
200
201▶ // AArch64 GCCs exit with an error condition when they encounter any kind of floating point
202 // code if the `nofp` and/or `nosimd` compiler flags have been set.
203 //
· · ·
236 build.flag("-ffreestanding");
237 // Avoid the following warning appearing once **per file**:
238▶ // clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
239 //
240 // Note that compiler-rt's build system also checks
· · ·
248 if let "aarch64" | "arm64ec" = cfg.target_arch.as_str() {
249 // FIXME(llvm20): Older GCCs on A64 fail to build with
250▶ // -Werror=implicit-function-declaration due to a compiler-rt bug.
251 // With a newer LLVM we should be able to enable the flag everywhere.
252 // https://github.com/llvm/llvm-project/commit/8aa9d6206ce55bdaaf422839c351fbd63f033b89
· · ·
253 } else {
254 // Avoid implicitly creating references to undefined functions
255▶ build.flag("-Werror=implicit-function-declaration");
256 }
257 }
34
35#[cfg(feature = "panic_immediate_abort")]
36▶compile_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
460 } else if target.is_windows_gnu() || target.is_windows_gnullvm() {
461 for obj in ["crt2.o", "dllcrt2.o"].iter() {
462▶ let src = compiler_file(builder, &builder.cc(target), target, CLang::C, obj);
463 let dst = libdir_self_contained.join(obj);
464 builder.copy_link(&src, &dst, FileType::NativeLibrary);
· · ·
1225
1226 // If the rustc output is piped to e.g. `head -n1` we want the process to be killed, rather than
1227▶ // having an error bubble up and cause a panic.
1228 //
1229 // FIXME(jieyouxu): this flag is load-bearing for rustc to not ICE on broken pipes, because
· · ·
1230 // rustc internally sometimes uses std `println!` -- but std `println!` by default will panic on
1231 // broken pipes, and uncaught panics will manifest as an ICE. The compiler *should* handle this
1232▶ // properly, but this flag is set in the meantime to paper over the I/O errors.
1233 //
1234 // See <https://github.com/rust-lang/rust/issues/131059> for details.
· · ·
1235 //
1236▶ // Also see the discussion for properly handling I/O errors related to broken pipes, i.e. safe
1237 // variants of `println!` in
1238 // <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F>.
· · ·
1240
1241 // Building with protected visibility reduces the number of dynamic relocations needed, giving
1242▶ // us a faster startup time. However GNU ld < 2.40 will error if we try to link a shared object
1243 // with direct references to protected symbols, so for now we only use protected symbols if
1244 // linking with LLD is enabled.
+ 7 more matches in this file
24
25macro_rules! book {
26▶ ($($name:ident, $path:expr, $book_name:expr, $lang:expr ;)+) => {
27 $(
28 #[derive(Debug, Clone, Hash, PartialEq, Eq)]
· · ·
1218
1219#[derive(Debug, Clone, Hash, PartialEq, Eq)]
1220▶pub struct ErrorIndex {
1221 compilers: RustcPrivateCompilers,
1222}
· · ·
1223
1224▶impl Step for ErrorIndex {
1225 type Output = ();
1226 const IS_HOST: bool = true;
· · ·
1227
1228 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1229▶ run.path("src/tools/error_index_generator")
1230 }
1231
· · ·
1235
1236 fn make_run(run: RunConfig<'_>) {
1237▶ run.builder.ensure(ErrorIndex {
1238 compilers: RustcPrivateCompilers::new(run.builder, run.builder.top_stage, run.target),
1239 });
+ 6 more matches in this 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
276 if run.builder.top_stage == 0 {
277 eprintln!(
278▶ "ERROR: running cargotest with stage 0 is currently unsupported. Use at least stage 1."
279 );
280 exit!(1);
· · ·
694
695 // Miri has its own "target dir" for ui test dependencies. Make sure it gets cleared when
696▶ // the sysroot gets rebuilt, to avoid "found possibly newer version of crate `std`" errors.
697 if !builder.config.dry_run() {
698 // This has to match `CARGO_TARGET_TMPDIR` in Miri's `ui.rs`.
· · ·
754 // `MIRI_SKIP_UI_CHECKS` and `RUSTC_BLESS` are incompatible
755 cargo.env_remove("RUSTC_BLESS");
756▶ // Optimizations can change error locations and remove UB so don't run `fail` tests.
757 cargo.args(["tests/pass", "tests/panic"]);
758
· · ·
876 if builder.top_stage == 0 && !builder.config.compiletest_allow_stage0 {
877 eprintln!("\
878▶ERROR: `--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
879NOTE: 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`."
880 );
· · ·
990 let _guard = builder.msg_test("clippy", target, target_compiler.stage);
991
992▶ // Clippy reports errors if it blessed the outputs
993 if cargo.allow_failure().run(builder) {
994 // The tests succeeded; nothing to do.
+ 20 more matches in this 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(' ');
· · ·
567
568 // Bootstrap only supports modern FIFO jobservers. Older pipe-based jobservers can run into
569▶ // "invalid file descriptor" errors, as the jobserver file descriptors are not inherited by
570 // scripts like bootstrap.py, while the environment variable is propagated. So, we pass
571 // MAKEFLAGS only if we detect a FIFO jobserver, otherwise we clear it.
· · ·
784 // supported by the target.
785 if target != compiler.host && cmd_kind != Kind::Check {
786▶ let error = self
787 .rustc_cmd(compiler)
788 .arg("--target")
· · ·
799 .stderr();
800
801▶ let not_supported = error
802 .lines()
803 .any(|line| line.contains("unsupported crate type `proc-macro`"));
+ 5 more matches in this file
117 pub skip: Vec<PathBuf>,
118 pub include_default_paths: bool,
119▶ pub rustc_error_format: Option<String>,
120 pub json_output: bool,
121 pub compile_time_deps: bool,
· · ·
175 pub llvm_allow_old_toolchain: bool,
176 pub llvm_polly: bool,
177▶ pub llvm_clang: bool,
178 pub llvm_enable_warnings: bool,
179 pub llvm_from_ci: bool,
· · ·
363 pub(crate) fn parse_inner(
364 flags: Flags,
365▶ get_toml: impl Fn(&Path) -> Result<TomlConfig, toml::de::Error>,
366 ) -> Config {
367 // Destructure flags to ensure that we use all its fields
· · ·
381 skip: flags_skip,
382 include_default_paths: flags_include_default_paths,
383▶ rustc_error_format: flags_rustc_error_format,
384 on_fail: flags_on_fail,
385 dry_run: flags_dry_run,
· · ·
619 offload_clang_dir: llvm_clang_dir,
620 polly: llvm_polly,
621▶ clang: llvm_clang,
622 enable_warnings: llvm_enable_warnings,
623 download_ci_llvm: llvm_download_ci_llvm,
+ 25 more matches in this 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("_", "-"),
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
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");
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();
6use clippy_utils::{is_entrypoint_fn, is_trait_impl_item};
7use rustc_data_structures::fx::FxHashSet;
8▶use rustc_errors::Applicability;
9use rustc_hir::{Attribute, 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
103
104 let Some(umtx_time) = this.read_umtx_time(&umtx_time_place)? else {
105▶ return this.set_last_error_and_return(LibcError("EINVAL"), dest);
106 };
107
· · ·
120 let timespec = this.ptr_to_mplace(uaddr2, timespec_layout);
121 let Some(duration) = this.read_timespec(×pec)? else {
122▶ return this.set_last_error_and_return(LibcError("EINVAL"), dest);
123 };
124
· · ·
127 // code (umtx_copyin_umtx_time() in kern_umtx.c), it seems to default to CLOCK_REALTIME,
128 // so that's what we also do.
129▶ // Discussion in golang: https://github.com/golang/go/issues/17168#issuecomment-250235271
130 Some((TimeoutClock::RealTime, TimeoutAnchor::Relative, duration))
131 } else {
· · ·
132▶ return this.set_last_error_and_return(LibcError("EINVAL"), dest);
133 }
134 };
· · ·
151 }
152 UnblockKind::TimedOut => {
153▶ ecx.set_last_error_and_return(LibcError("ETIMEDOUT"), &dest)
154 }
155 }
+ 2 more matches in this file
596 // FIXME: Keyword check?
597 let lifetime_ref = match &*lifetime.text() {
598▶ "" | "'" => LifetimeRef::Error,
599 "'static" => LifetimeRef::Static,
600 "'_" => LifetimeRef::Placeholder,
· · ·
632 .and_then(|it| self.lower_path(it, impl_trait_lower_fn))
633 .map(TypeRef::Path)
634▶ .unwrap_or(TypeRef::Error),
635 ast::Type::PtrType(inner) => {
636 let inner_ty = self.lower_type_ref_opt(inner.ty(), impl_trait_lower_fn);
· · ·
709 if self.outer_impl_trait {
710 // Disallow nested impl traits
711▶ TypeRef::Error
712 } else {
713 return self.with_outer_impl_trait_scope(true, |this| {
· · ·
731 return id;
732 }
733▶ None => TypeRef::Error,
734 },
735 };
· · ·
738
739 pub(crate) fn lower_type_ref_disallow_impl_trait(&mut self, node: ast::Type) -> TypeRefId {
740▶ self.lower_type_ref(node, &mut Self::impl_trait_error_allocator)
741 }
742
+ 27 more matches in this file
280 // Ensure all argument indexes actually fit in 16 bits, as we truncated them to 16 bits before.
281 if argmap.len() > u16::MAX as usize {
282▶ // FIXME: Emit an error.
283 // ctx.dcx().span_err(macsp, "too many format arguments");
284 }
· · ·
998 fn ty_rel_lang_path_desugared_expr(
999 &mut self,
1000▶ lang: Option<impl Into<LangItemTarget>>,
1001 relative_name: Symbol,
1002 ) -> ExprId {
4use clap::{ArgMatches, Command, arg, crate_version};
5use mdbook_driver::MDBook;
6▶use 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
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
1use std::str::FromStr;
2
3▶use 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
73pub struct CollectedFeatures {
74 pub lib: Features,
75▶ pub lang: Features,
76}
77
· · ·
124 for (i, line) in contents.lines().enumerate() {
125 let mut err = |msg: &str| {
126▶ check.error(format!("{}:{}: {}", file.display(), i + 1, msg));
127 };
128
· · ·
178
179 if !gate_untested.is_empty() {
180▶ check.error(format!("Found {} features without a gate test.", gate_untested.len()));
181 }
182
· · ·
192 let line = feature.line;
193 if since > version && since != Version::CurrentPlaceholder {
194▶ check.error(format!(
195 "{file}:{line}: The stabilization version {since} of {kind} feature `{feature_name}` is newer than the current {version}"
196 ));
· · ·
197 }
198 if channel == "nightly" && since == version {
199▶ check.error(format!(
200 "{file}:{line}: The stabilization version {since} of {kind} feature `{feature_name}` is written out but should be {}",
201 version::VERSION_PLACEHOLDER
+ 11 more matches in this file
18
19 let errs = compile("omit").run_fail();
20▶ // The linker's exact error output changes between Xcode versions, depends on
21 // linker invocation details, and the linker sometimes outputs more warnings.
22 errs.assert_stderr_contains_regex(r"error: linking with `.*` failed");
· · ·
22▶ errs.assert_stderr_contains_regex(r"error: linking with `.*` failed");
23 errs.assert_stderr_contains_regex(r"(Undefined symbols|ld: symbol[^\s]* not found)");
24 errs.assert_stderr_contains_regex(r".?_CFRunLoopGetTypeID.?, referenced from:");
· · ·
25▶ errs.assert_stderr_contains("clang: error: linker command failed with exit code 1");
26}
27