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

rustc_span cleanups #117507

Merged
merged 9 commits into from
Nov 3, 2023
Merged

rustc_span cleanups #117507

merged 9 commits into from
Nov 3, 2023

Commits on Nov 2, 2023

  1. Configuration menu
    Copy the full SHA
    d76661b View commit details
    Browse the repository at this point in the history
  2. Fix some comments.

    The comment just below the first one describes how the `impl !Send for
    FatalError` makes it impossible to `panic!(FatalError)`.
    
    And the second one should be `panic_any` instead of `panic!`.
    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    1bcb600 View commit details
    Browse the repository at this point in the history
  3. Tweak use items.

    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    16e9713 View commit details
    Browse the repository at this point in the history
  4. Minimize pub usage in hygiene.rs.

    And remove dead functions revealed by this.
    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    222c223 View commit details
    Browse the repository at this point in the history
  5. Formatting tweaks.

    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    84773b3 View commit details
    Browse the repository at this point in the history
  6. Minimize pub usage in source_map.rs.

    Most notably, this commit changes the `pub use crate::*;` in that file
    to `use crate::*;`. This requires a lot of `use` items in other crates
    to be adjusted, because everything defined within `rustc_span::*` was
    also available via `rustc_span::source_map::*`, which is bizarre.
    
    The commit also removes `SourceMap::span_to_relative_line_string`, which
    is unused.
    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    f405ce8 View commit details
    Browse the repository at this point in the history
  7. Deinline all session global functions.

    These are all called very rarely, so there is no need for them to be
    inline.
    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    edb357f View commit details
    Browse the repository at this point in the history
  8. Replace two create_default_session_if_not_set_then uses.

    With `create_default_session_globals_then`, which is preferable when it
    is appropriate.
    nnethercote committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    9893b75 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    6358411 View commit details
    Browse the repository at this point in the history