1. 02 7月, 2021 6 次提交
    • Y
      Rollup merge of #86779 - rylev:all-perf-labels, r=Mark-Simulacrum · 59674cb2
      Yuki Okushi 提交于
      Allow anyone to add or remove any label starting with perf-
      
      In order to fully realize planned changes to the performance tracking process, we'd like to allow anyone to change the perf related labels.
      
      r? ``@Mark-Simulacrum``
      59674cb2
    • Y
      Rollup merge of #86775 - fee1-dead:impl-const-test, r=jonas-schievink · 4262598d
      Yuki Okushi 提交于
      Test for const trait impls behind feature gates
      
       - Make the previous cross-crate tests use revisions instead of being separate files
       - Added test for gating const trait impls.
      
      cc ``@oli-obk`` ``@jonas-schievink``
      4262598d
    • Y
      Rollup merge of #86768 - fee1-dead:patch-2, r=bjorn3 · 6fc27cda
      Yuki Okushi 提交于
      Add myself to mailmap
      6fc27cda
    • Y
      Rollup merge of #86659 - notriddle:notriddle/generics-rustdoc, r=GuillaumeGomez · 45a3cd5e
      Yuki Okushi 提交于
      fix(rustdoc): generics search
      
      This commit adds a test case for generics, re-adds generics data
      to the search index, and tweaks function indexing to use less space in JSON.
      
      This partially reverts commit 14ca8944.
      45a3cd5e
    • Y
      Rollup merge of #86148 - FabianWolff:issue-85855, r=varkor · ab4d16fe
      Yuki Okushi 提交于
      Check the number of generic lifetime and const parameters of intrinsics
      
      This pull request fixes #85855. The current code for type checking intrinsics only checks the number of generic _type_ parameters, but does not check for an incorrect number of lifetime or const parameters, which can cause problems later on, such as the ICE in #85855, where the code thought that it was looking at a type parameter but found a lifetime parameter:
      ```
      error: internal compiler error: compiler/rustc_middle/src/ty/generics.rs:188:18:
          expected type parameter, but found another generic parameter
      ```
      
      The changes in this PR add checks for the number of lifetime and const parameters, expand the scope of `E0094` to also apply to these cases, and improve the error message by properly pluralizing the number of expected generic parameters.
      ab4d16fe
    • B
      Auto merge of #86304 - klensy:hex-length, r=jackh726 · ecef52ab
      bors 提交于
      rustc_mir: calc hex number length without string allocation
      ecef52ab
  2. 01 7月, 2021 34 次提交
    • F
      Minor adjustments and refactoring · fe933491
      Fabian Wolff 提交于
      fe933491
    • K
      2b57fc40
    • M
      fix(rustdoc): generics search · cedd2425
      Michael Howell 提交于
      This commit adds a test case for generics, re-adds generics data
      to the search index, and tweaks function indexing to use less space in JSON.
      
      This reverts commit 14ca8944.
      cedd2425
    • B
      Auto merge of #86769 - ehuss:update-cargo, r=ehuss · 64de4979
      bors 提交于
      Update cargo
      
      9 commits in 9233aa06c801801cff75df65df718d70905a235e..4952979031e2cf1d901c817a32e25a156a19db4c
      2021-06-22 21:32:55 +0000 to 2021-07-01 01:14:50 +0000
      - Fix `BorrowMutError` when calling `cargo doc --open` (rust-lang/cargo#9531)
      - Exclude `target` from content-indexing on Windows (rust-lang/cargo#9635)
      - Temporarily ignore 2021 edition fix. (rust-lang/cargo#9642)
      - Temporarily disable future_incompat tests. (rust-lang/cargo#9638)
      - Include toolchain specification in error message (rust-lang/cargo#9625)
      - Error when packaging with git dependencies without version (rust-lang/cargo#9612)
      - simply 'if' block (rust-lang/cargo#9615)
      - tidy some closures and iterators (rust-lang/cargo#9614)
      - use 'writeln' instead of appending newline character (rust-lang/cargo#9620)
      64de4979
    • R
      07aa46e9
    • D
      Test for const trait impls behind feature gates · ee9c614e
      Deadbeef 提交于
      ee9c614e
    • D
      Use revisions for cross-crate test · b3a79832
      Deadbeef 提交于
      b3a79832
    • B
      Auto merge of #86774 - GuillaumeGomez:rollup-rkcgvph, r=GuillaumeGomez · 3cb1c113
      bors 提交于
      Rollup of 6 pull requests
      
      Successful merges:
      
       - #86558 (Add suggestions for "undefined reference" link errors)
       - #86616 (rustc_span: Explicitly handle crates that differ from package names)
       - #86652 (Add support for leaf function frame pointer elimination)
       - #86666 (Fix misleading "impl Trait" error)
       - #86762 (mailmap: Add my work email address)
       - #86773 (Enable the tests developed with #86594)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      3cb1c113
    • G
      Rollup merge of #86773 - dns2utf8:rustdoc_enable_near_tests, r=GuillaumeGomez · d10af08f
      Guillaume Gomez 提交于
      Enable the tests developed with #86594
      
      This PR requires `browser-ui-test@0.4.1`. Can we centralise the version number somehow and maybe automatically install it when tests are run?
      
      r? `@GuillaumeGomez`
      d10af08f
    • G
      Rollup merge of #86762 - JohnTitor:mailmap-for-work, r=Mark-Simulacrum · 881b0fe9
      Guillaume Gomez 提交于
      mailmap: Add my work email address
      
      This de-duplicates the entry on the thanks.
      881b0fe9
    • G
      Rollup merge of #86666 - ptrojahn:compare_kinds, r=petrochenkov · 7e27209f
      Guillaume Gomez 提交于
      Fix misleading "impl Trait" error
      
      The kinds can't be compared directly, as types with references are treated as different because the lifetimes aren't bound in ty, but are in expected.
      Closes #84160
      7e27209f
    • G
      Rollup merge of #86652 - nagisa:nagisa/non-leaf-fp, r=petrochenkov · dfd30d7b
      Guillaume Gomez 提交于
      Add support for leaf function frame pointer elimination
      
      This PR adds ability for the target specifications to specify frame
      pointer emission type that's not just “always” or “whatever cg decides”.
      
      In particular there's a new mode that allows omission of the frame
      pointer for leaf functions (those that don't call any other functions).
      
      We then set this new mode for Aarch64-based Apple targets.
      
      Fixes #86196
      dfd30d7b
    • G
      Rollup merge of #86616 - joshtriplett:simplify-crate-package-discrepancies, r=varkor · 052e8d59
      Guillaume Gomez 提交于
      rustc_span: Explicitly handle crates that differ from package names
      
      The sha-1 and md-5 packages contain crates named sha1 and md5,
      respectively. This discrepancy makes it somewhat more challenging to
      automate detection of unused crates. Explicitly rename the packages to
      the names of the crates they contain, to simplify such detection.
      052e8d59
    • G
      Rollup merge of #86558 - Smittyvb:link-error-sugg, r=petrochenkov · 75f2263c
      Guillaume Gomez 提交于
      Add suggestions for "undefined reference" link errors
      
      This adds a suggestion for "undefined reference to ..." linking errors to install or specify the location to an external library. Since there is no defined error format for linkers, we just check if there was a failure and if that failure contains the string `undefined reference to`. This also makes it impossible to test this, since the output depends on the system linker. The output now looks like:
      ```
      error: linking with `cc` failed: exit status: 1
        |
        = note: "cc" "-m64" "linking_failure.linking_failure.7rcbfp3g-cgu.0.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.1.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.2.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.3.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.4.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.5.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.6.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.7.rcgu.o" "linking_failure.linking_failure.7rcbfp3g-cgu.8.rcgu.o" "linking_failure.53u64zklswtfazes.rcgu.o" "-Wl,--as-needed" "-L" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-01ce3ba5c629d02f.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-f1f2102409186354.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-1e8b6b56a999f838.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-d0e93eb4e14f1d19.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1d7e39d75d082b43.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-ade42e945045b261.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-1a65064fccf4ebc1.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-4d699c310fdfe72d.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-1cafa68a696ec800.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-e9f1c8c4dab2f046.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-ecc1a743be25c7f7.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e074031c4b66b6b6.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-9aa6ed9f1d3bfd53.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-7862bf96c2250ca0.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-f02ce0dc7895b5fd.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-3af9c60917570521.rlib" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-ca16fc7bb3645684.rlib" "-Wl,--end-group" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d8e1a5b7299604cc.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/smit/rustc-dev/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "linking_failure" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs"
        = note: /usr/bin/ld: linking_failure.linking_failure.7rcbfp3g-cgu.3.rcgu.o: in function `linking_failure::main':
                linking_failure.7rcbfp3g-cgu.3:(.text._ZN15linking_failure4main17h52b6e3052e444479E+0x3): undefined reference to `doesnt_exist_thiwthwfyl'
                clang: error: linker command failed with exit code 1 (use -v to see invocation)
      
        = help: some `extern` functions couldn't be found; you may need to install or specify the path to some dependencies
        = note: use the -L flag to specify the library lookup path
        = note: use the cargo:rustc-link-search directive to specify the library lookup path with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-search)
      
      error: aborting due to previous error
      ```
      75f2263c
    • S
      Update container browser-ui-test@0.4.1 · dbfbb76b
      Stefan Schindler 提交于
      dbfbb76b
    • S
      Enable the tests developed with #86594 · 36458510
      Stefan Schindler 提交于
      36458510
    • B
      Auto merge of #86190 - asquared31415:extern-main-86110-fix, r=varkor · f8ac8fda
      bors 提交于
      Fix ICE when `main` is declared in an `extern` block
      
      Changes in #84401 to implement `imported_main` changed how the crate entry point is found, and a declared `main` in an `extern` block was detected erroneously.  This was causing the ICE described in #86110.
      
      This PR adds a check for this case and emits an error instead.  Previously a `main` declaration in an `extern` block was not detected as an entry point at all, so emitting an error shouldn't break anything that worked previously.  In 1.52.1 stable this is demonstrated, with a `` `main` function not found`` error.
      
      Fixes #86110
      f8ac8fda
    • E
      Update cargo · 60608e53
      Eric Huss 提交于
      60608e53
    • B
      Auto merge of #86617 - joshtriplett:prune-dependencies, r=Mark-Simulacrum · 1034282b
      bors 提交于
      Remove unused dependencies from compiler crates
      
      Various compiler crates have dependencies that they don't appear to use. I used some scripting to detect such dependencies, filtered them based on some manual review, and removed those that do indeed appear to be entirely unused.
      1034282b
    • F
      Update mailmap for me · b24feb9d
      fee1-dead 提交于
      b24feb9d
    • B
      Auto merge of #86757 - JohnTitor:rollup-acevhz7, r=JohnTitor · 866335b3
      bors 提交于
      Rollup of 8 pull requests
      
      Successful merges:
      
       - #85504 (the foundation owns rust trademarks)
       - #85520 (Fix typo and improve documentation for E0632)
       - #86680 (Improve error for missing -Z with debugging option)
       - #86728 (Check node kind to avoid ICE in `check_expr_return()`)
       - #86740 (copy rust-lld as ld in dist)
       - #86746 (Fix rustdoc query type filter)
       - #86750 (Test cross-crate usage of `feature(const_trait_impl)`)
       - #86755 (alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`.)
      
      Failed merges:
      
      r? `@ghost`
      `@rustbot` modify labels: rollup
      866335b3
    • Y
      mailmap: Add my work email address · 2edf9559
      Yuki Okushi 提交于
      2edf9559
    • B
      Auto merge of #86489 - cjgillot:lower, r=petrochenkov · e6f450bc
      bors 提交于
      Simplify early compilation interface
      
      * separate resolver creation and AST configuration.
      * bundle lowering with global_ctxt creation.
      e6f450bc
    • S
      Add suggestions for "undefined reference" link errors · ce63d55b
      Smitty 提交于
      ce63d55b
    • Y
      Rollup merge of #86755 - ojeda:shrink, r=Mark-Simulacrum · 9e007e71
      Yuki Okushi 提交于
      alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`.
      
      Found in https://github.com/Rust-for-Linux/linux/pull/402.
      Signed-off-by: NMiguel Ojeda <ojeda@kernel.org>
      9e007e71
    • Y
      Rollup merge of #86750 - fee1-dead:impl-const-test, r=jonas-schievink · 7714a9a0
      Yuki Okushi 提交于
      Test cross-crate usage of `feature(const_trait_impl)`
      
      This PR does two things:
      
       - Fixes metadata not encoded properly for functions in const trait impls.
       - Adds tests for using const trait impls cross-crate with the feature gate on the user crate either enabled or disabled.
      
      AFAIK, this means we can now constify some trait impls in the standard library 🎉
      
      See #67792 for the tracking issue, cc `@oli-obk`
      7714a9a0
    • Y
      Rollup merge of #86746 - GuillaumeGomez:query-type-filter, r=notriddle · f458d8f6
      Yuki Okushi 提交于
      Fix rustdoc query type filter
      
      I realized while reviewing #86659 that the type filter was broken on search so I'd prefer it to get merged before merging #86659.
      
      r? `@notriddle`
      f458d8f6
    • Y
      Rollup merge of #86740 - 1000teslas:issue-71519-fix, r=petrochenkov · e52a0ec5
      Yuki Okushi 提交于
      copy rust-lld as ld in dist
      
      Fixes bug in https://github.com/rust-lang/rust/pull/85961. Linking seems to work for pure Rust projects, but not when a C library needs to be dynamically linked.
      e52a0ec5
    • Y
      Rollup merge of #86728 - FabianWolff:issue-86721, r=LeSeulArtichaut · dfe05c0e
      Yuki Okushi 提交于
      Check node kind to avoid ICE in `check_expr_return()`
      
      This PR fixes #86721. The ICE described there is apparently due to a misunderstanding:
      https://github.com/rust-lang/rust/blob/e98897e5dc9898707bf4331c43b2e76ab7e282fe/compiler/rustc_typeck/src/check/expr.rs#L684-L685
      
      Intuitively, one would think that calling `expect_item()` after `get_parent_item()` should succeed, but as it turns out, `get_parent_item()` can also return foreign, trait, and impl items as well as crates, whereas `expect_item()` specifically expects a `Node::Item`. I have therefore added an extra check to prevent this ICE.
      dfe05c0e
    • Y
      Rollup merge of #86680 - camsteffen:dbg-opt-error, r=petrochenkov · 56ddef8a
      Yuki Okushi 提交于
      Improve error for missing -Z with debugging option
      
      Before:
      ```text
      ❯ rustc --unpretty=hir
      error: Unrecognized option: 'unpretty'
      ```
      After:
      ```text
      ❯ rustc --unpretty=hir
      error: Unrecognized option: 'unpretty'. Did you mean `-Z unpretty`?
      ```
      56ddef8a
    • Y
      Rollup merge of #85520 - FabianWolff:issue-85475, r=jackh726 · 1823b3f2
      Yuki Okushi 提交于
      Fix typo and improve documentation for E0632
      
      Edit: After https://github.com/rust-lang/rust/pull/85520#issuecomment-870095546, this PR has been boiled down to just an extended description for `E0632` and a fixed typo.
      1823b3f2
    • Y
      Rollup merge of #85504 - liigo:patch-13, r=Mark-Simulacrum · 7c06191d
      Yuki Okushi 提交于
      the foundation owns rust trademarks
      7c06191d
    • C
      Update comments. · f6987742
      Camille GILLOT 提交于
      f6987742
    • C
      Fix AST pretty. · aa1bc587
      Camille GILLOT 提交于
      aa1bc587