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 7 pull requests #100985

Closed
wants to merge 19 commits into from
Closed

Commits on Aug 22, 2022

  1. Configuration menu
    Copy the full SHA
    f847388 View commit details
    Browse the repository at this point in the history
  2. sugg: suggest the usage of boolean value when there is a typo in the …

    …keyword
    
    Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
    vincenzopalazzo committed Aug 22, 2022
    Configuration menu
    Copy the full SHA
    69715c9 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. Configuration menu
    Copy the full SHA
    2a8fd51 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cb4cd73 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    289d7cc View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2022

  1. translations(rustc_session): migrate the file cgu_reuse_tracker

    This commit migrates the errors that indicates an incorrect
    CGU type and the fatal error that indicates that a CGU has
    not been correctly recorded
    beowolx committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    7119395 View commit details
    Browse the repository at this point in the history
  2. translations(rustc_session): migrate 80% of the file parse.rs

    This commit migrates around 80% of the parse file to use SsessionDiagnostic
    We still have to migrate struct_err and struct_warn.
    beowolx committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    77b01ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    36c42fa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    63700a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    89c74e8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d61ecec View commit details
    Browse the repository at this point in the history
  7. translations(rustc_session): migrate check_expected_reuse

    This commit migrates the errors in the function check_expected_reuse
    to use the new SessionDiagnostic. It also does some small refactor
    for the IncorrectCguReuseType to include the 'at least' word in the
    fluent translation file
    beowolx committed Aug 24, 2022
    Configuration menu
    Copy the full SHA
    d90f2a0 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2022

  1. Rollup merge of rust-lang#100640 - reitermarkus:socket-display-buffer…

    …, r=thomcc
    
    Use `DisplayBuffer` for socket addresses.
    
    Continuation of rust-lang#100625 for socket addresses.
    
    Renames `net::addr` to `net::addr::socket`, `net::ip` to `net::addr::ip` and `net::ip::display_buffer::IpDisplayBuffer` to `net::addr::display_buffer::DisplayBuffer`.
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    ddab42d View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#100732 - dpaoliello:import_name_type, r=wes…

    …leywiser
    
    Implementation of import_name_type
    
    Fixes rust-lang#96534 by implementing rust-lang/compiler-team#525
    
    Symbols that are exported or imported from a binary on 32bit x86 Windows can be named in four separate ways, corresponding to the [import name types](https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-name-type) from the PE-COFF spec. The exporting and importing binaries must use the same name encoding, otherwise mismatches can lead to link failures due to "missing symbols" or to 0xc0000139 (`STATUS_ENTRYPOINT_NOT_FOUND`) errors when the executable/library is loaded. For details, see the comments on the raw-dylib feature's rust-lang#58713. To generate the correct import libraries for these DLLs, therefore, rustc must know the import name type for each `extern` function, and there is currently no way for users to provide this information.
    
    This change adds a new `MetaNameValueStr` key to the `#[link]` attribute called `import_name_type`, and which accepts one of three values: `decorated`, `noprefix`, and `undecorated`.
    
    A single DLL is likely to export all its functions using the same import type name, hence `import_name_type` is a parameter of `#[link]` rather than being its own attribute that is applied per-function. It is possible to have a single DLL that exports different functions using different import name types, but users could express such cases by providing multiple export blocks for the same DLL, each with a different import name type.
    
    Note: there is a fourth import name type defined in the PE-COFF spec, `IMPORT_ORDINAL`. This case is already handled by the `#[link_ordinal]` attribute. While it could be merged into `import_type_name`, that would not make sense as `#[link_ordinal]` provides per-function information (namely the ordinal itself).
    
    Design decisions (these match the MCP linked above):
    * For GNU, `decorated` matches the PE Spec and MSVC rather than the default behavior of `dlltool` (i.e., there will be a leading `_` for `stdcall`).
    * If `import_name_type` is not present, we will keep our current behavior of matching the environment (MSVC vs GNU) default for decorating.
    * Using `import_name_type` on architectures other than 32bit x86 will result in an error.
    * Using `import_name_type` with link kinds other than `"raw-dylib"` will result in an error.
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    7269090 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#100753 - LuisCardosoOliveira:translation-mi…

    …grate-session, r=davidtwco
    
    translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1
    
    ## Description
    
    This is the first PR for the migration of the module `rustc_session`. You can follow my progress [here](rust-lang#100717 (comment)).
    
    The PR migrates the files `cgu_reuse_tracker` and `parse.rs` to use `SessionDiagnostic `.
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    7786b38 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#100759 - fee1-dead-contrib:const_eval_selec…

    …t_real_intrinsic, r=oli-obk,RalfJung
    
    Make `const_eval_select` a real intrinsic
    
    This fixes issues where `track_caller` functions do not have nice panic
    messages anymore when there is a call to the function, and uses the
    MIR system to replace the call instead of dispatching via lang items.
    
    Fixes rust-lang#100696.
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    6ba924a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#100817 - vincenzopalazzo:macros/bool_spelli…

    …ng_sugg, r=davidtwco
    
    sugg: suggest the usage of boolean value when there is a typo in the keyword
    
    Fixes rust-lang#100686
    
    This adds a new suggestion when there is a well-known typo
    
    With the following program
    
    ```rust
    fn main() {
        let x = True;
    }
    ```
    
    Now we have the following suggestion
    
    ```
    error[E0425]: cannot find value `True` in this scope
     --> test.rs:2:13
      |
    2 |     let x = True;
      |             ^^^^ not found in this scope
      |
    help: you may want to use a bool value instead
      |
    2 |     let x = true;
      |             ~~~~
    
    error: aborting due to previous error
    ```
    
    Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    5219ff6 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100897 - RalfJung:const-not-to-mutable, r=lcnr

    extra sanity check against consts pointing to mutable memory
    
    This should be both unreachable and redundant (since we already ensure that validation only reads from read-only memory, when validating consts), but I feel like we cannot be paranoid enough here, and also if this ever fails it'll be a nicer error than the "cannot read from mutable memory" error.
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    c50ee94 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100933 - a1phyr:cheap_assert_match_failed, …

    …r=JoshTriplett
    
    Reduce code size of `assert_matches_failed`
    
    Using `write_str` instead of `<str as Display>::fmt` avoids the `pad` function which is very expensive to have in size-constrained code.
    Dylan-DPC authored Aug 25, 2022
    Configuration menu
    Copy the full SHA
    d7fbdc2 View commit details
    Browse the repository at this point in the history