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

Rollup of 6 pull requests #90732

Closed
wants to merge 12 commits into from

Commits on Sep 4, 2021

  1. proc_macro: Add an expand_expr method to TokenStream

    This feature is aimed at giving proc macros access to powers similar to
    those used by builtin macros such as `format_args!` or `concat!`. These
    macros are able to accept macros in place of string literal parameters,
    such as the format string, as they perform recursive macro expansion
    while being expanded.
    
    This can be especially useful in many cases thanks to helper macros like
    `concat!`, `stringify!` and `include_str!` which are often used to
    construct string literals at compile-time in user code.
    
    For now, this method only allows expanding macros which produce
    literals, although more expresisons will be supported before the method
    is stabilized.
    mystor committed Sep 4, 2021
    Configuration menu
    Copy the full SHA
    4449e9b View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2021

  1. Make compiler-docs only control the default instead of being a hard…

    … off-switch
    
    This also fixes `x doc src/tools/clippy` when compiler-docs is disabled.
    jyn514 committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    5bf3a5d View commit details
    Browse the repository at this point in the history
  2. x.py: remove fixme by deleting code

    As far as I can tell, this parameter was never used, so just delete it
    as unnecessary.
    jyn514 committed Nov 8, 2021
    Configuration menu
    Copy the full SHA
    6192246 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fefe1e9 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2021

  1. document Box and box_free connection

    asquared31415 committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    db4e60b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10d65a9 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#87264 - mystor:expand_literal, r=petrochenkov

    proc_macro: Add an expand_expr method to TokenStream
    
    This feature is aimed at giving proc macros access to powers similar to those used by builtin macros such as `format_args!` or `concat!`. These macros are able to accept macros in place of string literal parameters, such as the format string, as they perform recursive macro expansion while being expanded.
    
    This can be especially useful in many cases thanks to helper macros like `concat!`, `stringify!` and `include_str!` which are often used to construct string literals at compile-time in user code.
    
    For now, this method only allows expanding macros which produce literals, although more expressions will be supported before the method is stabilized.
    
    In earlier versions of this PR, this method exclusively returned `Literal`, and spans on returned literals were stripped of expansion context before being returned to be as conservative as possible about permission leakage. The method's naming has been generalized to eventually support arbitrary expressions, and the context stripping has been removed (rust-lang#87264 (comment)), which should allow for more general APIs like "format_args_implicits" (rust-lang#67984) to be supported as well.
    
    ## API Surface
    
    ```rust
    impl TokenStream {
        pub fn expand_expr(&self) -> Result<Expr, ExpandError>;
    }
    
    #[non_exhaustive]
    pub struct ExpandError;
    
    impl Debug for ExpandError { ... }
    impl Display for ExpandError { ... }
    impl Error for ExpandError {}
    impl !Send for ExpandError {}
    impl !Sync for ExpandError {}
    ```
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    28a83d1 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#90613 - GuillaumeGomez:specific-rustdoc-js-…

    …test, r=Mark-Simulacrum
    
    Allow to run a specific rustdoc-js* test
    
    r? `@Mark-Simulacrum`
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    4fbc640 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#90683 - jyn514:compiler-docs, r=Mark-Simula…

    …crum
    
    Make `compiler-docs` only control the default instead of being a hard off-switch
    
    This also fixes `x doc src/tools/clippy` when compiler-docs is disabled.
    
    See rust-lang#90354 (comment).
    
    r? `@Mark-Simulacrum`
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    58a1e9e View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#90685 - jyn514:remove-dead-code, r=Mark-Sim…

    …ulacrum
    
    x.py: remove fixme by deleting code
    
    As far as I can tell, this parameter was never used, so just delete it
    as unnecessary.
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    03299c5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#90701 - michaelwoerister:more-artifact-size…

    …s, r=davidtwco
    
    Record more artifact sizes during self-profiling.
    
    This PR adds artifact size recording for
    
    - "linked artifacts" (executables, RLIBs, dylibs, static libs)
    - object files
    - dwo files
    - assembly files
    - crate metadata
    - LLVM bitcode files
    - LLVM IR files
    - codegen unit size estimates
    
    Currently the identifiers emitted for these are hard-coded as string literals. Is it worth adding constants to https://github.com/rust-lang/measureme/blob/master/measureme/src/rustc.rs instead? We don't do that for query names and the like -- but artifact kinds might be more stable than query names.
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    47f5211 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#90723 - asquared31415:box_docs, r=jyn514

    Better document `Box` and `alloc::alloc::box_free` connection
    
    The internal `alloc::alloc::box_free` function requires that its signature matches the `owned_box` struct's declaration, but previously that connection was only documented on the `box_free` function.
    
    This PR makes the documentation two-way to help anyone making theoretical changes to `Box` to see the connection, since changes are more likely to originate from `Box`.
    matthiaskrgr committed Nov 9, 2021
    Configuration menu
    Copy the full SHA
    6ed9660 View commit details
    Browse the repository at this point in the history