Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 11 pull requests #94164

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c05276a
Stabilize pin_static_ref.
m-ou-se Feb 2, 2022
bc4b0a7
Fix macro reexports duplicates in the sidebar
GuillaumeGomez Feb 14, 2022
d9ea7bc
Add test for duplicated macros in the sidebar
GuillaumeGomez Feb 14, 2022
1ab5b0b
removing architecture requirements for RustyHermit
stlankes Feb 15, 2022
227d106
remove compiler warnings
stlankes Feb 15, 2022
4b5beae
adapt static-nobundle test to use llvm-nm
krasimirgg Feb 15, 2022
0647e38
add llvm-nm to bootstrap dist bin's
krasimirgg Feb 16, 2022
5cf8274
Add module-level docs for `rustc_middle::query`
pierwill Feb 17, 2022
f7448a7
core: Implement trim functions on byte slices
dbrgn Feb 6, 2022
0f14bea
Optimize char_try_from_u32
digama0 Feb 18, 2022
7c3ebec
fix
digama0 Feb 18, 2022
b78123c
Fix miniz_oxide types showing up in std
GuillaumeGomez Feb 18, 2022
f2a404d
Convert `newtype_index` to a proc macro
Aaron1011 Feb 9, 2022
db0b3bd
Fix test
Aaron1011 Feb 18, 2022
cb2e4ee
Address review comments
Aaron1011 Feb 19, 2022
c5ce3e1
Don't render Const computed values in hexadecimal for Display
GuillaumeGomez Feb 17, 2022
296adba
Add rustdoc test for const computed value
GuillaumeGomez Feb 17, 2022
c2da477
Fix pretty printing of enums without variants
tmiasko Feb 17, 2022
318acc6
Rollup merge of #93580 - m-ou-se:stabilize-pin-static-ref, r=scottmcm
matthiaskrgr Feb 19, 2022
a1a40fc
Rollup merge of #93686 - dbrgn:trim-on-byte-slices, r=joshtriplett
matthiaskrgr Feb 19, 2022
3c4fa11
Rollup merge of #93878 - Aaron1011:newtype-macro, r=cjgillot
matthiaskrgr Feb 19, 2022
adc7d58
Rollup merge of #94002 - GuillaumeGomez:duplicated-sidebar-macro, r=n…
matthiaskrgr Feb 19, 2022
e710780
Rollup merge of #94019 - hermitcore:target, r=Mark-Simulacrum
matthiaskrgr Feb 19, 2022
2a0b08b
Rollup merge of #94023 - krasimirgg:head-llvm-use-llvm-nm, r=Mark-Sim…
matthiaskrgr Feb 19, 2022
db60c2b
Rollup merge of #94091 - GuillaumeGomez:rustdoc-const-computed-value,…
matthiaskrgr Feb 19, 2022
8517581
Rollup merge of #94093 - tmiasko:pp-no-variants, r=oli-obk
matthiaskrgr Feb 19, 2022
f4211a3
Rollup merge of #94097 - pierwill:doc-rustc-middle-query, r=cjgillot
matthiaskrgr Feb 19, 2022
a1e2b16
Rollup merge of #94112 - digama0:patch-3, r=scottmcm
matthiaskrgr Feb 19, 2022
83b2ab0
Rollup merge of #94122 - GuillaumeGomez:miniz-oxide-std, r=notriddle
matthiaskrgr Feb 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"hermit-abi 0.1.19",
"libc",
"winapi",
]
Expand Down Expand Up @@ -1610,6 +1610,15 @@ name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]

[[package]]
name = "hermit-abi"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ab7905ea95c6d9af62940f9d7dd9596d54c334ae2c15300c482051292d5637f"
dependencies = [
"compiler_builtins",
"libc",
Expand Down Expand Up @@ -2396,7 +2405,7 @@ version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
dependencies = [
"hermit-abi",
"hermit-abi 0.1.19",
"libc",
]

Expand Down Expand Up @@ -4782,7 +4791,7 @@ dependencies = [
"dlmalloc",
"fortanix-sgx-abi",
"hashbrown 0.12.0",
"hermit-abi",
"hermit-abi 0.2.0",
"libc",
"miniz_oxide",
"object 0.26.2",
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_const_eval/src/const_eval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ pub(crate) fn try_destructure_const<'tcx>(
// We go to `usize` as we cannot allocate anything bigger anyway.
let (field_count, variant, down) = match val.ty().kind() {
ty::Array(_, len) => (usize::try_from(len.eval_usize(tcx, param_env)).unwrap(), None, op),
// Checks if we have any variants, to avoid downcasting to a non-existing variant (when
// there are no variants `read_discriminant` successfully returns a non-existing variant
// index).
ty::Adt(def, _) if def.variants.is_empty() => throw_ub!(Unreachable),
ty::Adt(def, _) => {
let variant = ecx.read_discriminant(&op)?.1;
let down = ecx.operand_downcast(&op, variant)?;
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_index/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
pub mod bit_set;
pub mod interval;
pub mod vec;

pub use rustc_macros::newtype_index;
Loading