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

bump: rust 1.58.1 #360

Merged
merged 1 commit into from
Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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