1. 29 1月, 2022 1 次提交
  2. 28 1月, 2022 1 次提交
  3. 26 1月, 2022 1 次提交
  4. 23 1月, 2022 3 次提交
  5. 22 1月, 2022 27 次提交
    • M
      Rollup merge of #93172 - jsha:re-remove-line, r=camelid · 19e414a9
      Matthias Krüger 提交于
      rustdoc: remove dashed underline under main heading
      
      This was removed in #92797 but accidentally re-introduced by a bad merge in #92861.
      
      r? ```@camelid```
      19e414a9
    • M
      Rollup merge of #93170 - GuillaumeGomez:gui-tests-explanations, r=jsha · 86c096e2
      Matthias Krüger 提交于
      Add missing GUI test explanations
      
      Some GUI tests didn't have a global explanation about what they were testing. This fixes it.
      
      r? ```@jsha```
      86c096e2
    • M
      Rollup merge of #93153 - tmiasko:reject-unsupported-naked-functions, r=Amanieu · a8f64c04
      Matthias Krüger 提交于
      Reject unsupported naked functions
      
      Transition unsupported naked functions future incompatibility lint into an error:
      
      * Naked functions must contain a single inline assembly block. Introduced as future incompatibility lint in 1.50 #79653. Change into an error fixes a soundness issue described in #32489.
      
      * Naked functions must not use any forms of inline attribute. Introduced as future incompatibility lint in 1.56 #87652.
      
      Closes #32490.
      Closes #32489.
      
      r? ```@Amanieu``` ```@npmccallum``` ```@joshtriplett```
      a8f64c04
    • M
      Rollup merge of #93147 - nnethercote:interner-cleanups, r=lcnr · 5fd9c059
      Matthias Krüger 提交于
      Interner cleanups
      
      Improve some code that I have found confusing.
      
      r? ```@lcnr```
      5fd9c059
    • M
      Rollup merge of #93132 - Urgau:fix-rustdoc-json-format-version, r=oli-obk · 45f5f342
      Matthias Krüger 提交于
      Increase the format version of rustdoc-json-types
      
      PR https://github.com/rust-lang/rust/pull/87648 changed `rustdoc-json-types` without increasing the format version.
      https://github.com/rust-lang/rust/commit/e7529d6a3867ed1692818702b40814ee992eba2d#diff-ede26372490522288745c5b3df2b6b2a1cc913dcd09b29af3a49935afe00c7e6
      
      This PR increase the format version by +1 and move the `FORMAT_VERSION` constant to the start of the file to hopefully make it more clear that `rustdoc-json-types` is versioned.
      45f5f342
    • M
      Rollup merge of #93116 - rust-lang:oli-obk-patch-1, r=jackh726 · 2ecbc4b4
      Matthias Krüger 提交于
      Simplify use of `map_or`
      2ecbc4b4
    • M
      Rollup merge of #93012 - GuillaumeGomez:pulldown-list, r=camelid · f8335d96
      Matthias Krüger 提交于
      Update pulldown-cmark version to fix markdown list issue
      
      Fixes #92971.
      
      r? ```@camelid```
      f8335d96
    • M
      Rollup merge of #92828 - Amanieu:unwind-abort, r=dtolnay · 9d7c8edd
      Matthias Krüger 提交于
      Print a helpful message if unwinding aborts when it reaches a nounwind function
      
      This is implemented by routing `TerminatorKind::Abort` back through the panic handler, but with a special flag in the `PanicInfo` which indicates that the panic handler should *not* attempt to unwind the stack and should instead abort immediately.
      
      This is useful for the planned change in https://github.com/rust-lang/lang-team/issues/97 which would make `Drop` impls `nounwind` by default.
      
      ### Code
      
      ```rust
      #![feature(c_unwind)]
      
      fn panic() {
          panic!()
      }
      
      extern "C" fn nounwind() {
          panic();
      }
      
      fn main() {
          nounwind();
      }
      ```
      
      ### Before
      
      ```
      $ ./test
      thread 'main' panicked at 'explicit panic', test.rs:4:5
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      Illegal instruction (core dumped)
      ```
      
      ### After
      
      ```
      $ ./test
      thread 'main' panicked at 'explicit panic', test.rs:4:5
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      thread 'main' panicked at 'panic in a function that cannot unwind', test.rs:7:1
      stack backtrace:
         0:     0x556f8f86ec9b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdccefe11a6ac4396
         1:     0x556f8f88ac6c - core::fmt::write::he152b28c41466ebb
         2:     0x556f8f85d6e2 - std::io::Write::write_fmt::h0c261480ab86f3d3
         3:     0x556f8f8654fa - std::panicking::default_hook::{{closure}}::h5d7346f3ff7f6c1b
         4:     0x556f8f86512b - std::panicking::default_hook::hd85803a1376cac7f
         5:     0x556f8f865a91 - std::panicking::rust_panic_with_hook::h4dc1c5a3036257ac
         6:     0x556f8f86f079 - std::panicking::begin_panic_handler::{{closure}}::hdda1d83c7a9d34d2
         7:     0x556f8f86edc4 - std::sys_common::backtrace::__rust_end_short_backtrace::h5b70ed0cce71e95f
         8:     0x556f8f865592 - rust_begin_unwind
         9:     0x556f8f85a764 - core::panicking::panic_no_unwind::h2606ab3d78c87899
        10:     0x556f8f85b910 - test::nounwind::hade6c7ee65050347
        11:     0x556f8f85b936 - test::main::hdc6e02cb36343525
        12:     0x556f8f85b7e3 - core::ops::function::FnOnce::call_once::h4d02663acfc7597f
        13:     0x556f8f85b739 - std::sys_common::backtrace::__rust_begin_short_backtrace::h071d40135adb0101
        14:     0x556f8f85c149 - std::rt::lang_start::{{closure}}::h70dbfbf38b685e93
        15:     0x556f8f85c791 - std::rt::lang_start_internal::h798f1c0268d525aa
        16:     0x556f8f85c131 - std::rt::lang_start::h476a7ee0a0bb663f
        17:     0x556f8f85b963 - main
        18:     0x7f64c0822b25 - __libc_start_main
        19:     0x556f8f85ae8e - _start
        20:                0x0 - <unknown>
      thread panicked while panicking. aborting.
      Aborted (core dumped)
      ```
      9d7c8edd
    • M
      Rollup merge of #85967 - atopia:update-l4re-target, r=petrochenkov · ffd199d7
      Matthias Krüger 提交于
      add support for the l4-bender linker on the x86_64-unknown-l4re-uclibc tier 3 target
      
      This PR contains the work by ```@humenda``` to update support for the `x86_64-unknown-l4re-uclibc` tier 3 target (published at [humenda/rust](https://github.com/humenda/rust)), rebased and adapted to current rust in follow up commits by myself. The publishing of the rebased changes is authorized and preferred by the original author. As the goal was to distort the original work as little as possible, individual commits introduce changes that are incompatible to the newer code base that the changes were rebased on. These incompatibilities have been remedied in follow up commits, so that the PR as a whole should result in a clean update of the target.
      If you prefer another strategy to mainline these changes while preserving attribution, please let me know.
      ffd199d7
    • A
      Disable test_try_reserve on Android · 537439c1
      Amanieu d'Antras 提交于
      537439c1
    • B
      Auto merge of #93173 - matthiaskrgr:rollup-49bj7ta, r=matthiaskrgr · ecf72996
      bors 提交于
      Rollup of 10 pull requests
      
      Successful merges:
      
       - #91965 (Add more granular `--exclude` in `x.py`)
       - #92467 (Ensure that early-bound function lifetimes are always 'local')
       - #92586 (Set the allocation MIN_ALIGN for espidf to 4.)
       - #92835 (Improve error message for key="value" cfg arguments.)
       - #92843 (Improve string concatenation suggestion)
       - #92963 (Implement tuple array diagnostic)
       - #93046 (Use let_else in even more places)
       - #93109 (Improve `Arc` and `Rc` documentation)
       - #93134 (delete `Stdin::split` forwarder)
       - #93139 (rustdoc: fix overflow-wrap for table layouts)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      ecf72996
    • M
      Rollup merge of #93139 - jsha:fix-wrapped-names, r=Nemo157 · 26e9357f
      Matthias Krüger 提交于
      rustdoc: fix overflow-wrap for table layouts
      
      For all table layouts, set overflow-wrap: break-word.
      
      Fixes #93135
      
      Demo: https://rustdoc.crud.net/jsha/fix-wrapped-names/std/intrinsics/index.html#functions
      
      (Compare vs https://doc.rust-lang.org/nightly/std/intrinsics/index.html - you may have to make your browser narrower to see the effect)
      
      r? `@Nemo157`
      26e9357f
    • M
      Rollup merge of #93134 - tlyu:delete-stdin-split, r=Amanieu · 081d65fa
      Matthias Krüger 提交于
      delete `Stdin::split` forwarder
      
      Part of #87096. Delete the `Stdin::split` forwarder because it's seen as too niche to expose at this level.
      
      `@rustbot` label T-libs-api A-io
      081d65fa
    • M
      Rollup merge of #93109 - JakobDegen:arc-docs, r=m-ou-se · 9474c74f
      Matthias Krüger 提交于
      Improve `Arc` and `Rc` documentation
      
      This makes two changes (I can split the PR if necessary, but the changes are pretty small):
       1. A bunch of trait implementations claimed to be zero cost; however, they use the `Arc<T>: From<Box<T>>` impl which is definitely not free, especially for large dynamically sized `T`.
       2.  The code in deferred initialization examples unnecessarily used excessive amounts of `unsafe`. This has been reduced.
      9474c74f
    • M
      Rollup merge of #93046 - est31:let_else, r=davidtwco · ab19d4a5
      Matthias Krüger 提交于
      Use let_else in even more places
      
      Followup of #89933, #91018, #91481.
      ab19d4a5
    • M
      1f3a2dd0
    • M
      Rollup merge of #92843 - camelid:str-concat-sugg, r=davidtwco · 430673f2
      Matthias Krüger 提交于
      Improve string concatenation suggestion
      
      Before:
      
          error[E0369]: cannot add `&str` to `&str`
           --> file.rs:2:22
            |
          2 |     let _x = "hello" + " world";
            |              ------- ^ -------- &str
            |              |       |
            |              |       `+` cannot be used to concatenate two `&str` strings
            |              &str
            |
          help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
            |
          2 |     let _x = "hello".to_owned() + " world";
            |              ~~~~~~~~~~~~~~~~~~
      
      After:
      
          error[E0369]: cannot add `&str` to `&str`
           --> file.rs:2:22
            |
          2 |     let _x = "hello" + " world";
            |              ------- ^ -------- &str
            |              |       |
            |              |       `+` cannot be used to concatenate two `&str` strings
            |              &str
            |
            = note: string concatenation requires an owned `String` on the left
          help: create an owned `String` from a string reference
            |
          2 |     let _x = "hello".to_owned() + " world";
            |                     +++++++++++
      430673f2
    • M
      Rollup merge of #92835 - iwanders:issue-66450-improve-cfg-error-message, r=nagisa · e38cbc78
      Matthias Krüger 提交于
      Improve error message for key="value" cfg arguments.
      
      Hi, I ran into difficulties using the `--cfg` flag syntax, first hit when googling for the error was issue https://github.com/rust-lang/rust/issues/66450. Reading that issue, it sounded like the best way to improve the experience was to improve the error message, this is low risk and doesn't introduce any additional argument parsing.
      
      The issue mentions that it is entirely dependent on the shell, while this may be true, I think guiding the the user into the realization that the quotes may need to be escaped is helpful. The two suggested escapings both work in Bash and in the Windows command prompt.
      
      fyi `@ehuss`
      e38cbc78
    • M
      Rollup merge of #92586 - esp-rs:bugfix/allocation-alignment-espidf, r=yaahc · 701a8330
      Matthias Krüger 提交于
      Set the allocation MIN_ALIGN for espidf to 4.
      
      Closes https://github.com/esp-rs/rust/issues/99.
      
      cc: `@ivmarkov`
      701a8330
    • M
      Rollup merge of #92467 - Aaron1011:extern-local-region, r=oli-obk · 10c9ec39
      Matthias Krüger 提交于
      Ensure that early-bound function lifetimes are always 'local'
      
      During borrowchecking, we treat any free (early-bound) regions on
      the 'defining type' as `RegionClassification::External`. According
      to the doc comments, we should only have 'external' regions when
      checking a closure/generator.
      
      However, a plain function can also have some if its regions
      be considered 'early bound' - this occurs when the region is
      constrained by an argument, appears in a `where` clause, or
      in an opaque type. This was causing us to incorrectly mark these
      regions as 'external', which caused some diagnostic code
      to act as if we were referring to a 'parent' region from inside
      a closure.
      
      This PR marks all instantiated region variables as 'local'
      when we're borrow-checking something other than a
      closure/generator/inline-const.
      10c9ec39
    • M
      Rollup merge of #91965 - ferrocene:pa-more-granular-exclude, r=Mark-Simulacrum · fc694064
      Matthias Krüger 提交于
      Add more granular `--exclude` in `x.py`
      
      x.py has support for excluding some steps from the current invocation, but unfortunately that's not granular enough: some steps have the same name in different modules, and that prevents excluding only *some* of them.
      
      As a practical example, let's say you need to run everything in `./x.py test` except for the standard library tests, as those tests require IPv6 and need to be executed on a separate machine. Before this commit, if you were to just run this:
      
          ./x.py test --exclude library/std
      
      ...the invocation would eventually fail, as that would not only exclude running the tests for the standard library (`library/std` in the `test` module), it would also exclude generating its documentation (`library/std` in the `doc` module), breaking linkchecker.
      
      This commit adds support to the `--exclude` flag for prefixing paths with the name of the module their step is defined in, allowing the user to choose which module to exclude from:
      
          ./x.py test --exclude test::library/std
      
      This maintains backward compatibility with existing invocations, while allowing more ganular exclusion. Examples of the behavior:
      
      | `--exclude`         | Docs    | Tests   |
      | ------------------- | ------- | ------- |
      | `library/std`       | Skipped | Skipped |
      | `doc::library/std`  | Skipped | Run     |
      | `test::library/std` | Run     | Skipped |
      
      Note that this PR only changes the `--exclude` flag, and not in other `x.py` arguments or flags yet.
      
      In the implementation I tried to limit the impact this would have with rustbuild as a whole as much as possible. The module name is extracted from the step by parsing the result of `std::any::type_name()`: unfortunately that output can change at any point in time, but IMO it's better than having to annotate all the existing and future `Step` implementations with the module name. I added a test to ensure the parsing works as expected, so hopefully if anyone makes changes to the output of `std::any::type_name()` they'll also notice they have to update rustbuild.
      
      r? `@Mark-Simulacrum`
      fc694064
    • B
      Auto merge of #92363 - the8472:less-compiletest-normalization, r=Mark-Simulacrum · 17d29dcd
      bors 提交于
      Override rustc version in ui and mir-opt tests to get stable hashes
      
      Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles.
      
      UI test timings on my machine:
      
      OLD: 39.63s
      NEW: 30.27s
      17d29dcd
    • J
      2eb8bfc6
    • G
      Add missing GUI test explanations · 78cee22f
      Guillaume Gomez 提交于
      78cee22f
    • B
      Auto merge of #92983 - pietroalbini:pa-bump-runner-images, r=Mark-Simulacrum · cbaeec14
      bors 提交于
      Update Linux runners to Ubuntu 20.04
      
      r? `@Mark-Simulacrum`
      cbaeec14
    • A
      361a2f9a
    • A
      Update hashbrown to 0.12.0 · 88149d13
      Amanieu d'Antras 提交于
      88149d13
  6. 21 1月, 2022 7 次提交