- Feature Name:
const if
- Start Date: 2024-12-21
- RFC PR: rust-lang/rfcs#0000
- Rust Issue: rust-lang/rust#0000
const if
allows type-checked conditional compilation.
Exception in thread "main" java.lang.IllegalArgumentException: Multiple methods in multimethod 'simple-dispatch' match dispatch value: class babashka.process.Process -> interface clojure.lang.IPersistentMap and interface clojure.lang.IDeref, and neither is preferred | |
at clojure.lang.MultiFn.findAndCacheBestMethod(MultiFn.java:179) | |
at clojure.lang.MultiFn.getMethod(MultiFn.java:150) | |
at clojure.lang.MultiFn.getFn(MultiFn.java:154) | |
at clojure.lang.MultiFn.invoke(MultiFn.java:229) | |
at clojure.pprint$write_out.invokeStatic(pprint_base.clj:194) | |
at clojure.pprint$pprint_map$fn__11193$fn__11195.invoke(dispatch.clj:113) | |
at clojure.pprint$pprint_map$fn__11193.invoke(dispatch.clj:113) | |
at clojure.pprint$pprint_map.invokeStatic(dispatch.clj:112) | |
at clojure.pprint$pprint_map.invoke(dispatch.clj:106) |
Exception in thread "main" clojure.lang.ExceptionInfo: Syntax error compiling fn* at (0:0). {:type :sci/error, :line 1, :column 1, :message "Syntax error compiling fn* at (0:0).", :sci.impl/callstack #object[clojure.lang.Volatile 0x71bca854 {:status :ready, :val ({:ns #object[sci.lang.Namespace 0x373a6109 "user"], :file nil, :sci.impl/f-meta nil} {:ns #object[sci.lang.Namespace 0x373a6109 "user"], :file nil, :sci.impl/f-meta nil} {:ns #object[sci.lang.Namespace 0x373a6109 "user"], :file nil, :sci.impl/f-meta {:name eval, :doc "Evaluates the form data structure (not text!) and returns the result.", :arglists ([form]), :sci/built-in true, :ns #object[sci.lang.Namespace 0x1562e300 "clojure.core"]}} {:line 1, :column 1, :ns #object[sci.lang.Namespace 0x373a6109 "user"], :file nil} {:line 1, :column 1, :ns #object[sci.lang.Namespace 0x373a6109 "user"], :file nil, :sci.impl/f-meta {:ns #object[sci.lang.Namespace 0x32eff675 "hiccup2.core"], :name html, :macro true, :doc "Render Clojure data structures to a compiled |
const if
const if
allows type-checked conditional compilation.
diff --git a/src/config.c b/src/config.c | |
index de3be1c..d482e7c 100644 | |
--- a/src/config.c | |
+++ b/src/config.c | |
@@ -17,6 +17,7 @@ | |
#include <unistd.h> | |
#include <libgen.h> | |
+#include "config.h" | |
#include "keyd.h" |
rustc src/main.rs -Ztreat-err-as-bug=3 | |
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: failed while formatting fluent string `borrowck_returned_lifetime_short`: | |
the fluent string has an argument `category_desc` that was not found. | |
help: no arguments are available | |
the fluent string has an argument `free_region_name` that was not found. | |
help: no arguments are available | |
the fluent string has an argument `outlived_fr_name` that was not found. | |
help: no arguments are available | |
', compiler/rustc_errors/src/emitter.rs:2397:77 | |
stack backtrace: |
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs | |
index 5bc4d164265..211d45e022e 100644 | |
--- a/src/tools/compiletest/src/runtest.rs | |
+++ b/src/tools/compiletest/src/runtest.rs | |
@@ -1939,6 +1939,17 @@ fn make_compile_args( | |
// Use a single thread for efficiency and a deterministic error message order | |
rustc.arg("-Zthreads=1"); | |
+ // Hide libstd sources from ui tests to make sure we generate the stderr | |
+ // output that users will see. |
Checking stage0 compiler artifacts {rustc_middle} (x86_64-unknown-linux-gnu) | |
Checking rustc_middle v0.0.0 (/home/jyn/src/rust/compiler/rustc_middle) | |
time: 0.635; rss: 51MB -> 310MB ( +259MB) expand_crate | |
time: 0.635; rss: 51MB -> 310MB ( +259MB) macro_expand_crate | |
time: 0.018; rss: 310MB -> 310MB ( +0MB) AST_validation | |
time: 0.127; rss: 312MB -> 346MB ( +33MB) late_resolve_crate | |
time: 0.011; rss: 346MB -> 346MB ( +0MB) resolve_check_unused | |
time: 0.021; rss: 346MB -> 346MB ( +0MB) resolve_postprocess | |
time: 0.173; rss: 310MB -> 346MB ( +35MB) resolve_crate | |
time: 0.011; rss: 346MB -> 346MB ( +0MB) complete_gated_feature_checking |
#!/usr/bin/env python3 | |
import re | |
import sys | |
def sizeof_fmt(num, suffix="B"): | |
for unit in ["", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"]: | |
if abs(num) < 1024.0: | |
return f"{num:3.1f}{unit}{suffix}" | |
num /= 1024.0 | |
return f"{num:.1f}Yi{suffix}" |
#!/usr/bin/env bash | |
set -x | |
error() { | |
echo "$@" >&2 | |
} | |
usage() { | |
error "usage: $0 <src> <dest>" |