-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
More rustc_interface
cleanups
#117376
Merged
Merged
More rustc_interface
cleanups
#117376
Commits on Oct 30, 2023
-
Delay parsing of
--cfg
and--check-cfg
options.By storing the unparsed values in `Config` and then parsing them within `run_compiler`, the parsing functions can use the main symbol interner, and not create their own short-lived interners. This change also eliminates the need for one `EarlyErrorHandler` in rustdoc, because parsing errors can be reported by another, slightly later `EarlyErrorHandler`.
Configuration menu - View commit details
-
Copy full SHA for 678e01a - Browse repository at this point
Copy the full SHA 678e01aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bfcff79 - Browse repository at this point
Copy the full SHA bfcff79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e4ac98 - Browse repository at this point
Copy the full SHA 8e4ac98View commit details -
Make
Cfg
andCheckCfg
non-generic.They now only ever contains symbols.
Configuration menu - View commit details
-
Copy full SHA for 5c6a12c - Browse repository at this point
Copy the full SHA 5c6a12cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 371f972 - Browse repository at this point
Copy the full SHA 371f972View commit details -
It was added in 51938c6, a commit with a 7,720 line diff and a one line commit message. Even then the comment was incorrect; there was a removed a `build_output_filenames` call with a `&[]` argument in rustdoc, but the commit removed that call. In such a large commit, it's easy for small errors to occur.
Configuration menu - View commit details
-
Copy full SHA for 85e56e8 - Browse repository at this point
Copy the full SHA 85e56e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a60d643 - Browse repository at this point
Copy the full SHA a60d643View commit details -
Using `find` and `any` from `std` makes the code shorter and clearer.
Configuration menu - View commit details
-
Copy full SHA for 95b0088 - Browse repository at this point
Copy the full SHA 95b0088View commit details -
Streamline
collect_crate_types
.- The early return can be right at the top. - The control flow is simplified with `if let`. - The `collect` isn't necessary. - The "Unconditionally" comment is erroneously duplicated from `check_attr_crate_type`, and can be removed.
Configuration menu - View commit details
-
Copy full SHA for be8fd8b - Browse repository at this point
Copy the full SHA be8fd8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 90862f6 - Browse repository at this point
Copy the full SHA 90862f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c381ec - Browse repository at this point
Copy the full SHA 0c381ecView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.