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 10 pull requests #111140

Closed
wants to merge 29 commits into from
Closed

Commits on Apr 17, 2023

  1. Configuration menu
    Copy the full SHA
    1a7132d View commit details
    Browse the repository at this point in the history
  2. rustdoc: restructure type search engine to pick-and-use IDs

    This change makes it so, instead of mixing string distance with
    type unification, function signature search works by
    mapping names to IDs at the start, reporting to the user any
    cases where it had to make corrections, and then matches with
    IDs when going through the items.
    
    This only changes function searches. Name searches are left alone,
    and corrections are only done when there's a single item in the
    search query.
    notriddle committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    4c11822 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2023

  1. Configuration menu
    Copy the full SHA
    1ece1ea View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2023

  1. Configuration menu
    Copy the full SHA
    b6f81e0 View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. Configuration menu
    Copy the full SHA
    e0a7462 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7529d87 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    395840c View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. Configuration menu
    Copy the full SHA
    d5e7ac5 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2023

  1. Configuration menu
    Copy the full SHA
    ed468ee View commit details
    Browse the repository at this point in the history

Commits on May 1, 2023

  1. Change rlink serialization from MemEncoder to FileEncoder.

    Because we're writing to a file, so `FileEncoder` is better because we
    don't have to write all the data to memory first.
    nnethercote committed May 1, 2023
    Configuration menu
    Copy the full SHA
    b4ba2f0 View commit details
    Browse the repository at this point in the history
  2. remove pointless FIXME in bootstrap::download

    The suggestion given by `FIXME` to use `CompilerMetadata` for
    `download_toolchain` in `bootstrap::download` can result in more
    confusion. This is because `stamp_key` is not always a date; it
    can also be a commit hash. Additionally, unlike in `download_beta_toolchain`,
    in the `download_ci_rustc` function, `version` and `commit` values
    are calculated separately.
    
    Signed-off-by: ozkanonur <work@onurozkan.dev>
    onur-ozkan committed May 1, 2023
    Configuration menu
    Copy the full SHA
    bc68de9 View commit details
    Browse the repository at this point in the history
  3. Don't print backtrace on ICEs in issue-86800.rs.

    Because it then just has to be filtered out.
    
    This change makes this test more like these other tests:
    - tests/ui/treat-err-as-bug/err.rs
    - tests/ui/treat-err-as-bug/delay_span_bug.rs
    - tests/ui/mir/validate/storage-live.rs
    - tests/ui/associated-inherent-types/bugs/ice-substitution.rs
    - tests/ui/layout/valid_range_oob.rs
    nnethercote committed May 1, 2023
    Configuration menu
    Copy the full SHA
    6edb4ca View commit details
    Browse the repository at this point in the history
  4. Improve filtering in default-backtrace-ice.rs.

    This test is supposed to ensure that full backtraces are used for ICEs.
    But it doesn't actually do that -- the filtering done cannot distinguish
    between a full backtrace versus a short backtrace.
    
    So this commit changes the filtering to preserve the existence of
    `__rust_{begin,end}_short_backtrace` markers, which only appear in full
    backtraces. This change means the test now tests what it is supposed to
    test.
    
    Also, the existing filtering included a rule that excluded any line
    starting with two spaces. This was too strong because it filtered out
    some parts of the error message. (This was not a showstopper). It was
    also not strong enough because it didn't work with three digit stack
    frame numbers, which just started seeing after upgrading my Ubuntu
    distro to 23.04 machine (this *was* a showstopper).
    
    So the commit replaces that rule with two more precise rules, one for
    lines with stack frame numbers, and one for "at ..." lines.
    nnethercote committed May 1, 2023
    Configuration menu
    Copy the full SHA
    5f45c69 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Move some Encodable/Decodable tests.

    Round-trip encoding/decoding of many types is tested in
    `compiler/rustc_serialize/tests/opaque.rs`. There is also a small amount
    of encoding/decoding testing in three files in `tests/ui-fulldeps`.
    
    There is no obvious reason why these three files are necessary. They
    were originally added in 2014. Maybe it wasn't possible for a proc
    macro to run in a unit test back then?
    
    This commit just moves the testing from those three files into the unit
    test.
    nnethercote committed May 2, 2023
    Configuration menu
    Copy the full SHA
    8d359e4 View commit details
    Browse the repository at this point in the history
  2. Remove MemEncoder.

    It's only used in tests. Which is bad, because it means that
    `FileEncoder` is used in the compiler but isn't used in tests!
    
    `tests/opaque.rs` now tests encoding/decoding round-trips via file.
    Because this is slower than memory, this commit also adjusts the
    `u16`/`i16` tests so they are more like the `u32`/`i32` tests, i.e. they
    don't test every possible value.
    nnethercote committed May 2, 2023
    Configuration menu
    Copy the full SHA
    ebee3f8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ef77dd2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eb23f47 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6af761a View commit details
    Browse the repository at this point in the history
  6. Amend the triagebot comment for Cargo.lock changes.

    I don't like the current wording. It's obnoxious to be told by a bot
    that a change I made intentionally is "probably unintentional"! I also
    don't like describing unintentional changes as "Random", it's not the
    right word.
    nnethercote committed May 2, 2023
    1 Configuration menu
    Copy the full SHA
    51b9f78 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. Rollup merge of rust-lang#109677 - dpaoliello:rawdylib, r=michaelwoer…

    …ister,wesleywiser
    
    Stabilize raw-dylib, link_ordinal, import_name_type and -Cdlltool
    
    This stabilizes the `raw-dylib` feature (rust-lang#58713) for all architectures (i.e., `x86` as it is already stable for all other architectures).
    
    Changes:
    * Permit the use of the `raw-dylib` link kind for x86, the `link_ordinal` attribute and the `import_name_type` key for the `link` attribute.
    * Mark the `raw_dylib` feature as stable.
    * Stabilized the `-Zdlltool` argument as `-Cdlltool`.
    * Note the path to `dlltool` if invoking it failed (we don't need to do this if `dlltool` returns an error since it prints its path in the error message).
    * Adds tests for `-Cdlltool`.
    * Adds tests for being unable to find the dlltool executable, and dlltool failing.
    * Fixes a bug where we were checking the exit code of dlltool to see if it failed, but dlltool always returns 0 (indicating success), so instead we need to check if anything was written to `stderr`.
    
    NOTE: As previously noted (rust-lang#104218 (comment)) using dlltool within rustc is temporary, but this is not the first time that Rust has added a temporary tool use and argument: rust-lang#104218 (comment)
    
    Big thanks to `````@tbu-````` for the first version of this PR (rust-lang#104218)
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    cd963c9 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#110371 - notriddle:notriddle/search-correct…

    …ions, r=GuillaumeGomez
    
    rustdoc: restructure type search engine to pick-and-use IDs
    
    Fixes rust-lang#110029
    
    Preview: https://notriddle.com/rustdoc-demo-html-3/search-corrections/std/index.html?search=-%3E%20streaming
    
    ![image](https://user-images.githubusercontent.com/1593513/233494900-ae77d5b4-e395-41f8-bbac-53ee55bb4a76.png)
    
    This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items.
    
    This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    9a6ac2c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#110908 - petrochenkov:notagain4, r=compiler…

    …-errors
    
    resolve: One more attempt to simplify `module_children`
    
    If the next step is performed and `fn module_children_local` is merged with the `module_children` query, then it causes perf regressions, regardless of whether query result feeding is [used](https://perf.rust-lang.org/compare.html?start=43a78029b4f4d92978b8fde0a677ea300b113c41&end=2eb5bcc5068b9d92f74bcb1797da664865d6981d&stat=instructions:u) or [not](https://perf.rust-lang.org/compare.html?start=2fce2290865f012391b8f3e581c3852a248031fa&end=2a33d6cd99481d1712037a79e7d66a8aefadbf72&stat=instructions:u).
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    52cc430 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#110946 - RalfJung:tls-realstd, r=m-ou-se

    avoid duplicating TLS state between test std and realstd
    
    This basically re-lands rust-lang#100201 and rust-lang#106638, which got reverted by rust-lang#110861. This works around 2 Miri limitations:
    - Miri doesn't support the magic linker section that our Windows TLS support relies on, and instead knows where in std to find the symbol that stores the thread callback.
    - For macOS, Miri only supports at most one destructor to be registered per thread.
    
    The 2nd would not be very hard to fix (though the intended destructor order is unclear); the first would be a lot of work to fix. Neither of these is a problem for regular Rust code, but in the std test suite we have essentially 2 copies of the std code and then these both become issues. To avoid that we have the std test crate import the TLS code from the real std instead of having its own copy.
    
    r? `````@m-ou-se`````
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    086e4e3 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#111039 - compiler-errors:foreign-span-rpiti…

    …t, r=tmiasko
    
    Encode def span for foreign return-position `impl Trait` in trait
    
    Fixes rust-lang#111031, yet another def-span encoding issue :/
    
    Includes a smaller repro than the issue, but I can confirm it ICEs:
    
    ```
    query stack during panic:
    #0 [def_span] looking up span for `rpitit::Foo::bar::{opaque#0}`
    #1 [object_safety_violations] determining object safety of trait `rpitit::Foo`
    rust-lang#2 [check_is_object_safe] checking if trait `rpitit::Foo` is object safe
    rust-lang#3 [typeck] type-checking `main`
    rust-lang#4 [used_trait_imports] finding used_trait_imports `main`
    rust-lang#5 [analysis] running analysis passes on this crate
    ```
    
    Luckily since this only affects nightly, this desn't need to be backported.
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    a151ad8 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#111052 - nnethercote:fix-ice-test, r=Nilstrieb

    Fix problems with backtraces in two ui tests.
    
    `default-backtrace-ice.rs` started started failing for me recently,
    because on my Ubuntu 23.04 system there are 100 stack frames, and the
    current stack filtering pattern doesn't match on a stack frame with a
    three digit number.
    
    `issue-86800.rs` can also be improved, backtrace-wise.
    
    r? ```@Nilstrieb```
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    30196e9 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#111069 - ozkanonur:remove-pointless-fixme, …

    …r=albertlarsan68
    
    remove pointless `FIXME` in `bootstrap::download`
    
    The suggestion given by `FIXME` to use `CompilerMetadata` for `download_toolchain` in `bootstrap::download` can result in more confusion. This is because `stamp_key` is not always a date; it can also be a commit hash. Additionally, unlike in `download_beta_toolchain`, in the `download_ci_rustc` function, `version` and `commit` values are calculated separately.
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    1601bb3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#111086 - nnethercote:rm-MemEncoder, r=cjgillot

    Remove `MemEncoder`
    
    `MemEncoder` only has one non-test use, and `FileEncoder` would be more appropriate there anyway.
    
    r? `@cjgillot`
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    ae78f17 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#111100 - BoxyUwU:array_repeat_expr_wf, r=co…

    …mpiler-errors
    
    check array type of repeat exprs is wf
    
    Fixes rust-lang#111091
    
    Also makes sure that we actually renumber regions in the length of repeat exprs which we previously weren't doing and would cause ICEs in `adt_const_params` + `generic_const_exprs` from attempting to prove the wf goals when the length was an unevaluated constant with `'erased` in the `ty` field of `Const`
    
    The duplicate errors are caused by the fact that `const_arg_to_const`/`array_len_to_const` in `FnCtxt` adds a `WellFormed` goal for the created `Const` which is also checked by the added `WellFormed(array_ty)`. I don't want to change this to just emit a `T: Sized` goal for the element type since that would ignore `ConstArgHasType` wf requirements and generally uncomfortable with the idea of trying to sync up `wf::obligations` for arrays and the code in hir typeck for repeat exprs.
    
    r? ``@compiler-errors``
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    8215170 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#111112 - nnethercote:triagebot, r=compiler-…

    …errors
    
    Add some triagebot notifications for nnethercote.
    
    r? ```@compiler-errors```
    Dylan-DPC committed May 3, 2023
    Configuration menu
    Copy the full SHA
    72bfcfe View commit details
    Browse the repository at this point in the history