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 9 pull requests #91621

Closed
wants to merge 21 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

oli-obk and others added 21 commits December 3, 2021 15:23
…n it existed.

Also, no tests fail when turning that arm into an ICE
Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was
supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05
nightly while rust-lang#85360 didn't land until 2021-09-03. The reason for that
is d34a3a4 **also** resolves that
issue.

To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted
d34a3a4 and found that rust-lang#85868 does
indeed resolve rust-lang#85360.

With that question resolved, add a test case to our incremental test
suite for the original Ok(EvaluatedToOkModuloRegions) ICE.

Thanks to @lqd for helping track this down!
As suggested via reviewer feedback.
Signed-off-by: TennyZhuang <zty0826@gmail.com>
Currently fails with:

    ---- [pretty] pretty/async.rs stdout ----

    error: pretty-printed source does not match expected source
    expected:
    ------------------------------------------
    // pp-exact
    // pretty-compare-only
    // edition:2021

    async fn f() {
        let first = async { 1 };
        let second = async move { 2 };
        join(first, second).await
    }

    ------------------------------------------
    actual:
    ------------------------------------------
    // pp-exact
    // pretty-compare-only
    // edition:2021

    async fn f() {
        let first = async  { 1 };
        let second = async move  { 2 };
        join(first, second).await
    }

    ------------------------------------------
    diff:
    ------------------------------------------
    3	// edition:2021
    4
    5	async fn f() {
    -	    let first = async { 1 };
    -	    let second = async move { 2 };
    +	    let first = async  { 1 };
    +	    let second = async move  { 2 };
    8	    join(first, second).await
    9	}
    10
Also:

- Review and edit current docs
- Enforce documentation for crate

Co-authored-by: r00ster <r00ster91@protonmail.com>
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
Add test

Apply suggestions

Switch to match

Apply cargofmt
…rk-Simulacrum

Recommend fix `count()` -> `len()` on slices

Fixes rust-lang#87302
…s, r=cjgillot

Document all public items in `rustc_incremental`

Also:

- Review and edit current docs
- Enforce documentation for the module.
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE

Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was
supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05
nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that
is d34a3a4 **also** resolves that
issue.

To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted
d34a3a4 and found that rust-lang#85868 does
indeed resolve rust-lang#85360.

With that question resolved, add a test case to our incremental test
suite for the original Ok(EvaluatedToOkModuloRegions) ICE.

Thanks to ```@lqd``` for helping track this down!
…kh726

Fix AnonConst ICE

I am not sure if this is even the correct place to fix this issue, but i went down the path where the generic args came from and i wasn't able to find a clear cause for this down there. But if anybody has a suggestion what i should do, just tell me.
This fixes: rust-lang#91267
Remove a dead code path.

It is neither documented nor can I see any way it could ever be reached.

Also, no tests fail when turning that arm into an ICE
…rister

Tweak "call this function" suggestion to have smaller span
…scottmcm

Suggest try_reserve in try_reserve_exact

During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
Pretty print async block without redundant space

**Repro:**

```rust
macro_rules! m {
    ($e:expr) => { stringify!($e) };
}
fn main() {
    println!("{:?}", m!(async {}));
}
```

**Before:** <code>"async&nbsp;&nbsp;{}"</code>
**After:** `"async {}"`

<br>

In this function:

https://github.com/rust-lang/rust/blob/65c55bf931a55e6b1e5ed14ad8623814a7386424/compiler/rustc_ast_pretty/src/pprust/state.rs#L2049-L2051

the `print_capture_clause` and `word_nbsp`/`word_space` calls already put a space after the `async` and `move` keywords being printed. The extra `self.s.space()` call removed by this PR resulted in the redundant double space.

https://github.com/rust-lang/rust/blob/65c55bf931a55e6b1e5ed14ad8623814a7386424/compiler/rustc_ast_pretty/src/pprust/state.rs#L2640-L2645

https://github.com/rust-lang/rust/blob/65c55bf931a55e6b1e5ed14ad8623814a7386424/compiler/rustc_ast_pretty/src/helpers.rs#L34-L37

https://github.com/rust-lang/rust/blob/65c55bf931a55e6b1e5ed14ad8623814a7386424/compiler/rustc_ast_pretty/src/helpers.rs#L5-L8
Update books

## nomicon

1 commits in c6b4bf831e9a40aec34f53067d20634839a6778b..49681ea4a9fa81173dbe9ffed74b4d4a35eae9e3
2021-11-09 02:30:56 +0900 to 2021-11-24 16:27:28 +0900
- Clarify that drop flag fields only apply to older Rust versions (rust-lang/nomicon#324)

## reference

2 commits in c0f222da23568477155991d391c9ce918e381351..954f3d441ad880737a13e241108f791a4d2a38cd
2021-11-22 10:30:57 -0800 to 2021-11-29 11:11:30 -0800
- Say that bare trait objects are rejected in the 2021 edition (rust-lang/reference#1111)
- Update 'Subtyping and Variance' example to use `dyn Trait` syntax (rust-lang/reference#1110)

## book

5 commits in a5e0c5b2c5f9054be3b961aea2c7edfeea591de8..5f9358faeb1f46e19b8a23a21e79fd7fe150491e
2021-11-19 17:06:19 -0500 to 2021-12-05 21:33:16 -0500
- 1.57
- Update to 1.56
- Snapshot of ch 11 for nostarch
- Clarify how to check for an error in tests returning Result
- Update book repo links for default branch rename

## rust-by-example

1 commits in 43f82530210b83cf888282b207ed13d5893da9b2..1ca6a7bd1d73edc4a3e6c7d6a40f5d4b66c1e517
2021-11-21 22:31:50 -0300 to 2021-11-23 17:48:53 -0300
- Removed `u32` at the end of ints (rust-lang/rust-by-example#1477)

## rustc-dev-guide

10 commits in a2fc9635029c04e692474965a6606f8e286d539a..a374e7d8bb6b79de45b92295d06b4ac0ef35bc09
2021-11-18 13:31:13 -0500 to 2021-12-03 09:26:47 -0800
- Update LLVM coverage mapping format version supported by rustc (rust-lang/rustc-dev-guide#1267)
- Improve 'Running tests manually' section
- Fix some links
- Update for review comments.
- Document rustfix-only-machine-applicable
- Apply suggestions from pierwill
- Document more compiletest headers.
- make it compile with 1.56.0 no warning
- make it compile with 1.56.0
- make it compile with 1.56.0

## edition-guide

1 commits in 8e0ec8c77d8b28b86159fdee9d33a758225ecf9c..beea0a3cdc3885375342fd010f9ad658e6a5e09a
2021-11-12 06:30:23 -0800 to 2021-12-05 07:06:45 -0800
- Fix typo (neccesary -&gt; necessary) (rust-lang/edition-guide#274)
@rustbot rustbot added the rollup A PR which is a rollup label Dec 7, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Dec 7, 2021

📌 Commit 71e3343 has been approved by matthiaskrgr

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 7, 2021
@bors
Copy link
Contributor

bors commented Dec 7, 2021

⌛ Testing commit 71e3343 with merge 75d07e6bde650c3f4eaeb0831a8bbe1643d2283d...

@bors
Copy link
Contributor

bors commented Dec 7, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 7, 2021
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_incremental test:false 1.270
 Documenting rustc_save_analysis v0.0.0 (/checkout/compiler/rustc_save_analysis)
[RUSTC-TIMING] rustc_monomorphize test:false 1.301
 Documenting rustc_mir_dataflow v0.0.0 (/checkout/compiler/rustc_mir_dataflow)
error: unresolved link to `rustc_incremental::persist::save::build_dep_graph`
   --> compiler/rustc_incremental/src/persist/fs.rs:143:11
    |
143 | /// see [`rustc_incremental::persist::save::build_dep_graph`].
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `rustc_incremental` in scope
    |
    = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`

error: unresolved link to `DepGraph`
   --> compiler/rustc_incremental/src/persist/fs.rs:196:67
    |
196 | /// If loading fails for some reason, we fallback to a disabled [`DepGraph`].
    |                                                                   ^^^^^^^^ no item named `DepGraph` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
[RUSTC-TIMING] rustc_mir_dataflow test:false 2.190
error: could not document `rustc_incremental`

Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2021 --crate-type lib --crate-name rustc_incremental compiler/rustc_incremental/src/lib.rs --target aarch64-unknown-linux-gnu -o /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/doc --error-format=json --json=diagnostic-rendered-ansi -C metadata=4417e124d42c6188 -L dependency=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/release/deps --extern rand=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librand-5db77235b2cfedde.rmeta --extern rustc_ast=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_ast-1ba410238aec7dc2.rmeta --extern rustc_data_structures=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_data_structures-d513ff27df0cac76.rmeta --extern rustc_errors=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_errors-ee4be6447727d5ee.rmeta --extern rustc_fs_util=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_fs_util-5c759bced7af0dce.rmeta --extern rustc_graphviz=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_graphviz-b50a397d5805453e.rmeta --extern rustc_hir=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_hir-12fd03e2c6512588.rmeta --extern rustc_macros=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/release/deps/librustc_macros-6777ca596ba94fcc.so --extern rustc_middle=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_middle-5599b6493e95c3dc.rmeta --extern rustc_serialize=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_serialize-cbfb0cc45e66dba3.rmeta --extern rustc_session=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_session-d84fdae80b6e656d.rmeta --extern rustc_span=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/librustc_span-fdba9d3248eed195.rmeta --extern tracing=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/deps/libtracing-8eb19f6f60afcda5.rmeta --extern-html-root-url 'rand=https://docs.rs/rand/0.7.3/' --extern-html-root-url 'tracing=https://docs.rs/tracing/0.1.28/' -Zunstable-options -Zsymbol-mangling-version=v0 -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version '1.59.0-nightly
  (75d07e6bd
  2021-12-07)' --document-private-items '-Arustdoc::private-intra-doc-links' --enable-index-page -Zunstable-options -Znormalize-docs --show-type-layout --generate-link-to-definition --extern-html-root-url 'ena=https://docs.rs/ena/latest/'` (exit status: 1)
[RUSTC-TIMING] rustc_passes test:false 2.584
[RUSTC-TIMING] rustc_metadata test:false 3.679
[RUSTC-TIMING] rustc_infer test:false 6.214
[RUSTC-TIMING] rustc_query_impl test:false 10.891
[RUSTC-TIMING] rustc_query_impl test:false 10.891
error: build failed


command did not execute successfully: "/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo" "doc" "--target" "aarch64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "14" "--release" "--locked" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "-Zunstable-options" "-Zskip-rustdoc-fingerprint" "--no-deps" "-Zrustdoc-map" "-p" "rustc_feature" "-p" "rustc_borrowck" "-p" "rustc_ty_utils" "-p" "rustc_mir_transform" "-p" "rustc_expand" "-p" "rustc_symbol_mangling" "-p" "rustc_privacy" "-p" "rustc_trait_selection" "-p" "rustc_data_structures" "-p" "rustc_hir" "-p" "rustc_attr" "-p" "rustc_type_ir" "-p" "rustc_lint_defs" "-p" "rustc_codegen_ssa" "-p" "rustc_interface" "-p" "rustc_index" "-p" "rustc_traits" "-p" "rustc_ast_passes" "-p" "rustc_passes" "-p" "rustc_error_codes" "-p" "rustc_ast_pretty" "-p" "rustc_lexer" "-p" "rustc_mir_dataflow" "-p" "rustc_serialize" "-p" "rustc_const_eval" "-p" "rustc_infer" "-p" "rustc_resolve" "-p" "rustc_fs_util" "-p" "rustc_builtin_macros" "-p" "rustc_hir_pretty" "-p" "rustc_ast_lowering" "-p" "rustc_incremental" "-p" "rustc_graphviz" "-p" "rustc_macros" "-p" "rustc_errors" "-p" "coverage_test_macros" "-p" "rustc_middle" "-p" "rustc_apfloat" "-p" "rustc_codegen_llvm" "-p" "rustc_monomorphize" "-p" "rustc_driver" "-p" "rustc_lint" "-p" "rustc_parse_format" "-p" "rustc_metadata" "-p" "rustc_save_analysis" "-p" "rustc_plugin_impl" "-p" "rustc_parse" "-p" "rustc_query_system" "-p" "rustc_query_impl" "-p" "rustc_arena" "-p" "rustc_span" "-p" "rustc_target" "-p" "rustc_session" "-p" "rustc_mir_build" "-p" "rustc_typeck" "-p" "rustc_llvm" "-p" "rustc_ast"


Build completed unsuccessfully in 0:43:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.