Skip to content

Commit

Permalink
bump: rust 1.58.1 (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra authored Jan 23, 2022
1 parent b9ead75 commit 72dd828
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/mun_codegen/src/code_gen/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ pub enum CodeGenerationError {
#[error("error creating object file")]
CouldNotCreateObjectFile(io::Error),
#[error("error generating machine code")]
CodeGenerationError(String),
MachineCodeError(String),
}
2 changes: 1 addition & 1 deletion crates/mun_codegen/src/code_gen/object_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl ObjectFile {
) -> Result<Self, anyhow::Error> {
let obj = target_machine
.write_to_memory_buffer(module, FileType::Object)
.map_err(|e| CodeGenerationError::CodeGenerationError(e.to_string()))?;
.map_err(|e| CodeGenerationError::MachineCodeError(e.to_string()))?;

let mut obj_file = tempfile::NamedTempFile::new()
.map_err(CodeGenerationError::CouldNotCreateObjectFile)?;
Expand Down
4 changes: 2 additions & 2 deletions crates/mun_codegen/src/ir/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl<'db, 'ink, 't> BodyIrGenerator<'db, 'ink, 't> {
struct_ir_ty
.ptr_type(AddressSpace::Generic)
.ptr_type(AddressSpace::Generic),
&format!("{}_ptr_ptr", hir_struct.name(self.db).to_string()),
&format!("{}_ptr_ptr", hir_struct.name(self.db)),
)
.into_pointer_value();

Expand All @@ -420,7 +420,7 @@ impl<'db, 'ink, 't> BodyIrGenerator<'db, 'ink, 't> {
.builder
.build_load(
struct_ptr_ptr,
&format!("{}_mem_ptr", hir_struct.name(self.db).to_string()),
&format!("{}_mem_ptr", hir_struct.name(self.db)),
)
.into_pointer_value();

Expand Down
2 changes: 1 addition & 1 deletion crates/mun_codegen/src/type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl TypeInfo {
.ty(db)
.guid_string(db)
.expect("type should be convertible to a string");
format!("{}: {}", f.name(db).to_string(), ty_string)
format!("{}: {}", f.name(db), ty_string)
})
.collect();

Expand Down
2 changes: 1 addition & 1 deletion crates/mun_hir/src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl Ty {
.ty(db)
.guid_string(db)
.expect("type should be convertible to a string");
format!("{}: {}", f.name(db).to_string(), ty_string)
format!("{}: {}", f.name(db), ty_string)
})
.collect();

Expand Down
2 changes: 1 addition & 1 deletion crates/mun_language_server/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) fn diagnostics(db: &AnalysisDatabase, file_id: hir::FileId) -> Vec<Di
// Add all syntax errors
let parse = db.parse(file_id);
result.extend(parse.errors().iter().map(|err| Diagnostic {
message: format!("parse error: {}", err.to_string()),
message: format!("parse error: {}", err),
range: location_to_range(err.location()),
additional_annotations: vec![],
}));
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.57.0
1.58.1

0 comments on commit 72dd828

Please sign in to comment.