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 10 pull requests #108052

Merged
merged 31 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e813132
--wip-- [skip ci]
SpanishPear Oct 23, 2022
5287004
Apply automatic suggestions from code review
SpanishPear Dec 1, 2022
655beb4
Attempt to address review comments via github web...
SpanishPear Dec 1, 2022
4447949
revert to previous span
SpanishPear Jan 22, 2023
8292d07
move tests to new rust-lang location
SpanishPear Jan 22, 2023
70bfcc2
move to multipart spans
SpanishPear Jan 31, 2023
a3d32bb
fix formatting + test syntax
SpanishPear Feb 1, 2023
44a2388
Make Ok value of repeat_while_none more general
spastorino Jan 31, 2023
873c83b
Extract try_move_finished_goal_to_global_cache from try_finalize_goal
spastorino Feb 13, 2023
826bee7
Implement repeat_while_none for both SearchGraph and EvalCtxt
spastorino Feb 6, 2023
ef6a59b
"Basic usage" is redundant for there is just one example
tshepang Feb 13, 2023
3180f1c
Fix #107998, avoid ICE when the generic_span is empty
chenyukang Feb 13, 2023
826abcc
Shrink size of array benchmarks
JulianKnodt Feb 14, 2023
2a5a1a8
add message to update Cargo.toml when x is changed
zephaniahong Feb 14, 2023
ba4b026
rustdoc: add more tooltips to intra-doc links
notriddle Feb 14, 2023
70fd729
change file path and improve message
zephaniahong Feb 14, 2023
936bf29
s/eval_usize/eval_target_usize/ for clarity
oli-obk Feb 14, 2023
0e185c2
Avoid using a dead email address as the main email address
oli-obk Feb 14, 2023
9e2947a
Ord entails its supertraits
eggyal Feb 14, 2023
c8dae10
Check for overflow in evaluate_canonical_goal
spastorino Feb 6, 2023
26136c6
Reduce visibility of some items
spastorino Feb 14, 2023
202c706
Rollup merge of #103478 - SpanishPear:spanishpear/issue_103366_fix, r…
matthiaskrgr Feb 14, 2023
9ee3c7a
Rollup merge of #107739 - spastorino:check-overflow-evaluate_canonica…
matthiaskrgr Feb 14, 2023
1f486f0
Rollup merge of #108003 - chenyukang:yukang/fix-107998, r=compiler-er…
matthiaskrgr Feb 14, 2023
3eb5731
Rollup merge of #108016 - tshepang:just-one-example, r=thomcc
matthiaskrgr Feb 14, 2023
d599be0
Rollup merge of #108023 - JulianKnodt:smaller_benchmark, r=workingjub…
matthiaskrgr Feb 14, 2023
43b42c5
Rollup merge of #108024 - zephaniahong:master, r=jyn514
matthiaskrgr Feb 14, 2023
8804e7f
Rollup merge of #108025 - notriddle:notriddle/intra-doc-link-tooltips…
matthiaskrgr Feb 14, 2023
f68864c
Rollup merge of #108029 - oli-obk:🞋_usize, r=RalfJung
matthiaskrgr Feb 14, 2023
7a9e6e8
Rollup merge of #108035 - oli-obk:oli_new_contributor_funkiness, r=Ma…
matthiaskrgr Feb 14, 2023
ea679fb
Rollup merge of #108038 - eggyal:remove_needless_supertrait_constrain…
matthiaskrgr Feb 14, 2023
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
24 changes: 12 additions & 12 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -419,18 +419,18 @@ Nixon Enraght-Moony <[email protected]>
NODA Kai <[email protected]>
oliver <[email protected]>
Oliver Middleton <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <public.[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]> <[email protected]>
Oliver Scherer <[email protected]>
Ömer Sinan Ağacan <[email protected]>
Ophir LOJKINE <[email protected]>
Ožbolt Menegatti <[email protected]> gareins <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
// than 1.
// If the length is larger than 1, the repeat expression will need to copy the
// element, so we require the `Copy` trait.
if len.try_eval_usize(tcx, self.param_env).map_or(true, |len| len > 1) {
if len.try_eval_target_usize(tcx, self.param_env).map_or(true, |len| len > 1) {
match operand {
Operand::Copy(..) | Operand::Constant(..) => {
// These are always okay: direct use of a const, or a value that can evidently be copied.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ fn codegen_stmt<'tcx>(
fn codegen_array_len<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, place: CPlace<'tcx>) -> Value {
match *place.layout().ty.kind() {
ty::Array(_elem_ty, len) => {
let len = fx.monomorphize(len).eval_usize(fx.tcx, ParamEnv::reveal_all()) as i64;
let len = fx.monomorphize(len).eval_target_usize(fx.tcx, ParamEnv::reveal_all()) as i64;
fx.bcx.ins().iconst(fx.pointer_type, len)
}
ty::Slice(_elem_ty) => {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
let idx_ty = fx.monomorphize(idx.ty(fx.mir, fx.tcx));
match idx_ty.kind() {
ty::Array(ty, len) if matches!(ty.kind(), ty::Uint(ty::UintTy::U32)) => len
.try_eval_usize(fx.tcx, ty::ParamEnv::reveal_all())
.try_eval_target_usize(fx.tcx, ty::ParamEnv::reveal_all())
.unwrap_or_else(|| {
span_bug!(span, "could not evaluate shuffle index array length")
})
Expand Down Expand Up @@ -735,7 +735,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
ty::Uint(i) if i.bit_width() == Some(expected_int_bits) => {}
ty::Array(elem, len)
if matches!(elem.kind(), ty::Uint(ty::UintTy::U8))
&& len.try_eval_usize(fx.tcx, ty::ParamEnv::reveal_all())
&& len.try_eval_target_usize(fx.tcx, ty::ParamEnv::reveal_all())
== Some(expected_bytes) => {}
_ => {
fx.tcx.sess.span_fatal(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/unsize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) fn unsized_info<'tcx>(
(&ty::Array(_, len), &ty::Slice(_)) => fx
.bcx
.ins()
.iconst(fx.pointer_type, len.eval_usize(fx.tcx, ParamEnv::reveal_all()) as i64),
.iconst(fx.pointer_type, len.eval_target_usize(fx.tcx, ParamEnv::reveal_all()) as i64),
(
&ty::Dynamic(ref data_a, _, src_dyn_kind),
&ty::Dynamic(ref data_b, _, target_dyn_kind),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/src/value_and_place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ impl<'tcx> CPlace<'tcx> {
CPlaceInner::Var(_local, var) => {
if let ty::Array(element, len) = dst_layout.ty.kind() {
// Can only happen for vector types
let len =
u32::try_from(len.eval_usize(fx.tcx, ParamEnv::reveal_all())).unwrap();
let len = u32::try_from(len.eval_target_usize(fx.tcx, ParamEnv::reveal_all()))
.unwrap();
let vector_ty = fx.clif_type(*element).unwrap().by(len).unwrap();

let data = match from.0 {
Expand Down
Loading