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 9 pull requests #128761

Merged
merged 30 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d495b84
PinCoerceUnsized trait into core
dingxiangfei2009 May 12, 2024
c2c46e3
Forbid unsafe_op_in_unsafe_fn in vxworks specific os and sys files
Aug 3, 2024
c369c20
Add a triagebot mention for `library/Cargo.lock`
tgross35 Aug 5, 2024
4af77df
implement BufReader::peek
lolbinarycat Jul 30, 2024
c8d50ef
Windows: Test if `\\.\NUL` works as an input file
ChrisDenton Aug 5, 2024
c6d9482
Don't ICE if getting the input's file_stem fails
ChrisDenton Aug 5, 2024
3fd645e
Check staticlib name falls back to `rust_out`
ChrisDenton Aug 5, 2024
fdb64b9
tests: add regression test to make sure `cfg_attr` isn't considered u…
jieyouxu Aug 6, 2024
97cbc20
check_attr: treat cfg_attr like cfg
jieyouxu Aug 6, 2024
522af10
interpret: refactor function call handling to be better-abstracted
RalfJung Aug 5, 2024
5783e73
make some Frame fields more private
RalfJung Aug 5, 2024
1c2705c
various cleanups based on review
RalfJung Aug 6, 2024
db6c05f
Maintain highlighting in `note` and `help` even when they have a span
estebank May 9, 2024
4868680
On trait bound mismatch, detect multiple crate versions in dep tree
estebank May 9, 2024
ba32673
Add test for mixing types from two incompatible crate versions
estebank May 13, 2024
d8b0771
Add `help` about using `cargo tree`
estebank May 13, 2024
edd4162
fix rebase
estebank Jul 12, 2024
f4bad4f
Change test to be only-linux and ignore-wasm32
estebank Jul 12, 2024
5e26c8d
Move test to be make instead of ui
estebank Aug 6, 2024
034b73b
fix test
estebank Aug 6, 2024
b9e8e99
std::thread: set_name implementation proposal for vxWorks.
devnexen Aug 6, 2024
38e631e
Rollup merge of #124944 - estebank:multiple-crate-versions, r=fee1-dead
matthiaskrgr Aug 6, 2024
16b251b
Rollup merge of #125048 - dingxiangfei2009:stable-deref, r=amanieu
matthiaskrgr Aug 6, 2024
7e1360b
Rollup merge of #128406 - lolbinarycat:bufreader_peek, r=Mark-Simulacrum
matthiaskrgr Aug 6, 2024
f00a551
Rollup merge of #128539 - biabbas:deny_unsafe, r=workingjubilee
matthiaskrgr Aug 6, 2024
52c365b
Rollup merge of #128687 - RalfJung:interpret-call-refactor, r=WaffleL…
matthiaskrgr Aug 6, 2024
03fabc0
Rollup merge of #128692 - tgross35:update-triagebot, r=Mark-Simulacrum
matthiaskrgr Aug 6, 2024
f9325b7
Rollup merge of #128710 - ChrisDenton:null, r=jieyouxu
matthiaskrgr Aug 6, 2024
3158a86
Rollup merge of #128718 - jieyouxu:check-cfg_attr, r=nnethercote
matthiaskrgr Aug 6, 2024
6ed9a33
Rollup merge of #128751 - devnexen:vxworks_set_thread_name, r=tgross35
matthiaskrgr Aug 6, 2024
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
4 changes: 3 additions & 1 deletion compiler/rustc_const_eval/src/const_eval/eval_queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ fn eval_body_using_ecx<'tcx, R: InterpretationResult<'tcx>>(
cid.promoted.map_or_else(String::new, |p| format!("::{p:?}"))
);

ecx.push_stack_frame(
// This can't use `init_stack_frame` since `body` is not a function,
// so computing its ABI would fail. It's also not worth it since there are no arguments to pass.
ecx.push_stack_frame_raw(
cid.instance,
body,
&ret.clone().into(),
Expand Down
17 changes: 8 additions & 9 deletions compiler/rustc_const_eval/src/const_eval/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ use crate::errors::{LongRunning, LongRunningWarn};
use crate::fluent_generated as fluent;
use crate::interpret::{
self, compile_time_machine, err_ub, throw_exhaust, throw_inval, throw_ub_custom, throw_unsup,
throw_unsup_format, AllocId, AllocRange, ConstAllocation, CtfeProvenance, FnArg, FnVal, Frame,
throw_unsup_format, AllocId, AllocRange, ConstAllocation, CtfeProvenance, FnArg, Frame,
GlobalAlloc, ImmTy, InterpCx, InterpResult, MPlaceTy, OpTy, Pointer, PointerArithmetic, Scalar,
StackPopCleanup,
};

/// When hitting this many interpreted terminators we emit a deny by default lint
Expand Down Expand Up @@ -306,17 +307,15 @@ impl<'tcx> CompileTimeInterpCx<'tcx> {
let align = ImmTy::from_uint(target_align, args[1].layout).into();
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty())?;

// We replace the entire function call with a "tail call".
// Note that this happens before the frame of the original function
// is pushed on the stack.
self.eval_fn_call(
FnVal::Instance(instance),
(CallAbi::Rust, fn_abi),
// Push the stack frame with our own adjusted arguments.
self.init_stack_frame(
instance,
self.load_mir(instance.def, None)?,
fn_abi,
&[FnArg::Copy(addr), FnArg::Copy(align)],
/* with_caller_location = */ false,
dest,
ret,
mir::UnwindAction::Unreachable,
StackPopCleanup::Goto { ret, unwind: mir::UnwindAction::Unreachable },
)?;
Ok(ControlFlow::Break(()))
} else {
Expand Down
Loading
Loading