Remove InputIngot constructor helper#1072
Remove InputIngot constructor helper#1072micahscopes wants to merge 1 commit intoargotorg:masterfrom
InputIngot constructor helper#1072Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the manual InputIngot constructor helper in favor of a generated constructor via the salsa attribute. The key changes include updating all call sites to convert their path parameters using .into() and adjusting the parameters passed to InputIngot::new.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/language-server/src/backend/workspace.rs | Updated the constructor call to pass config_path with into(). |
| crates/hir/src/lib.rs | Modified test setup to use into() and extra parameters. |
| crates/hir/src/hir_def/module_tree.rs | Changed the path literal to use into() and added default values. |
| crates/hir-analysis/tests/test_db.rs | Updated stand-alone ingot creation with into() and added parameters. |
| crates/driver/src/db.rs | Updated multiple InputIngot::new calls to reflect new parameter requirements. |
| crates/common/src/input.rs | Removed the helper constructor and updated a reference in core(). |
Comments suppressed due to low confidence (1)
crates/common/src/input.rs:71
- Replacing the call to __new_impl with Self::new may result in unexpected recursion if Self::new refers back to itself. Verify that the generated new function provided by the salsa attribute is used without creating an infinite loop.
Self::new(
It's only useful if you also remove the subsequent |
|
Ahh, right! Thank you |
|
Hmm, I'm realizing now that this would clash with the changes in #1070 |
|
I moved over to here: #1073 |
I'm having second thoughts on how useful this is 😅