forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] gather data on how frequently the compiler uses library feature…
…s that aren't in beta
- Loading branch information
Showing
4 changed files
with
230 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
dispatch_from_dyn | ||
cell_leak | ||
pointer_byte_offsets | ||
alloc_error_handler | ||
vec_into_raw_parts | ||
nonzero_ops | ||
result_option_inspect | ||
iter_is_partitioned | ||
hasher_prefixfree_extras | ||
exact_size_is_empty | ||
slice_internals | ||
proc_macro_diagnostic | ||
strict_provenance | ||
iter_order_by | ||
try_reserve_kind | ||
const_default_impls | ||
slice_ptr_get | ||
maybe_uninit_uninit_array | ||
allocator_api | ||
control_flow_enum | ||
hash_drain_filter | ||
drain_filter | ||
is_terminal | ||
unwrap_infallible | ||
assert_matches | ||
trusted_step | ||
const_option | ||
const_btree_len | ||
core_intrinsics | ||
int_roundings | ||
iterator_try_reduce | ||
proc_macro_quote | ||
alloc_layout_extra | ||
internal_output_capture | ||
unsize | ||
is_some_and | ||
generator_trait | ||
thread_id_value | ||
hash_raw_entry | ||
map_try_insert | ||
test | ||
array_windows | ||
trusted_len | ||
slice_partition_dedup | ||
discriminant_kind | ||
iter_from_generator | ||
maybe_uninit_slice | ||
never_type | ||
iter_intersperse | ||
proc_macro_span | ||
once_cell | ||
thread_spawn_unchecked | ||
map_many_mut | ||
const_trait_impl | ||
proc_macro_internals | ||
step_trait | ||
fmt_helpers_for_derive | ||
slice_as_chunks | ||
new_uninit | ||
option_get_or_insert_default | ||
variant_count | ||
is_sorted | ||
get_mut_unchecked | ||
const_black_box | ||
coerce_unsized | ||
extend_one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
while read -r feature; do | ||
echo "Looking for $feature (commit is $commit)" | ||
# Commit where this feature was first introduced. | ||
commit=$(git log --pretty=%H --reverse --pickaxe-regex -S 'feature\s*=\s*"'$feature \ | ||
-- library/ src/lib{core,alloc,std,test,proc_macro,unwind,stdarch,unwind,rtstartup,portable-simd,panic_unwind,panic_abort,backtrace} \ | ||
| tee /dev/tty | head -n1 | tee /dev/tty) | ||
echo "$feature introduced in $commit" | ||
# src/version was first introduced in 1.48. Before that we have to parse `channel.rs`. | ||
# As a hack, just pretend that any feature introduced earlier was introduced in 1.47; we don't | ||
# actually care about the exact version, just whether it was used in the compiler on beta or | ||
# nightly. | ||
if ! version=$(git show $commit:src/version 2>/dev/null); then | ||
if ! [ -e src/version ]; then | ||
# We are *currently* in 1.47 or earlier; no version is reliable. | ||
# TODO: parse `CFG_RELEASE_NUM` instead. | ||
echo "error: detecting versions not supported for compiler versions earlier than 1.48" | ||
exit 1 | ||
fi | ||
version="1.47.0" | ||
fi | ||
echo "$feature introduced in $version" | ||
done < libs_features.txt |