mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 02:06:57 +00:00
Merge commit 'af40101841' into sync-from-ra
This commit is contained in:
parent
79fa976864
commit
3afeb24198
115 changed files with 3106 additions and 3623 deletions
|
|
@ -322,12 +322,13 @@ impl Evaluator<'_> {
|
|||
let hir_def::resolver::ValueNs::FunctionId(format_fn) = format_fn else {
|
||||
not_supported!("std::fmt::format is not a function")
|
||||
};
|
||||
let message_string = self.interpret_mir(
|
||||
let interval = self.interpret_mir(
|
||||
self.db
|
||||
.mir_body(format_fn.into())
|
||||
.map_err(|e| MirEvalError::MirLowerError(format_fn, e))?,
|
||||
args.map(|x| IntervalOrOwned::Owned(x.clone())),
|
||||
)?;
|
||||
let message_string = interval.get(self)?;
|
||||
let addr =
|
||||
Address::from_bytes(&message_string[self.ptr_size()..2 * self.ptr_size()])?;
|
||||
let size = from_bytes!(usize, message_string[2 * self.ptr_size()..]);
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ fn eval_main(db: &TestDB, file_id: FileId) -> Result<(String, String), MirEvalEr
|
|||
db.trait_environment(func_id.into()),
|
||||
)
|
||||
.map_err(|e| MirEvalError::MirLowerError(func_id.into(), e))?;
|
||||
let (result, stdout, stderr) = interpret_mir(db, body, false, None);
|
||||
let (result, output) = interpret_mir(db, body, false, None);
|
||||
result?;
|
||||
Ok((stdout, stderr))
|
||||
Ok((output.stdout().into_owned(), output.stderr().into_owned()))
|
||||
}
|
||||
|
||||
fn check_pass(ra_fixture: &str) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue