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 8 pull requests #83876

Closed
wants to merge 22 commits into from
Closed

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 5, 2021

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jyn514 and others added 22 commits March 22, 2021 02:34
This allows keeping the setting to a fixed value without having to
toggle it when you want to work on the compiler instead of on tools.
Add some inlines to trivial methods of IpAddr
Closes rust-lang#77583
…tc` is set

 ## Motivation

This avoids having to rebuild bootstrap and tidy each time you rebase
over master. In particular, it makes rebasing and running `x.py fmt` on
each commit in a branch significantly faster. It also avoids having to
rebuild bootstrap after setting `download-rustc = true`.

 ## Implementation

Instead of extracting the CI artifacts directly to `stage0/`, extract
them to `ci-rustc/` instead. Continue to copy them to the proper
sysroots as necessary for all stages except stage 0.

This also requires `bootstrap.py` to download both stage0 and CI
artifacts and distinguish between the two when checking stamp files.

Note that since tools have to be built by the same compiler that built
`rustc-dev` and the standard library, the downloaded artifacts can't be
reused when building with the beta compiler. To make sure this is still
a good user experience, warn when building with the beta compiler, and
default to building with stage 2.
This prevents us from warning on links such as `<hello@example.com>`.
Note that we still warn on links such as `<hello@localhost>` because
they have no dots in them. However, the links will still work, even
though a warning is reported.
Previously, the types looked like this:

- None means this is not an associated item (but may be a variant field)
- Some(Err) means this is known to be an error. I think the only way that can happen is if it resolved and but you had your own anchor.
- Some(Ok(_, None)) was impossible.

Now, this returns a nested Option and does the error handling and
fiddling with the side channel in the caller. As a side-effect, it also
removes duplicate error handling.

This has one small change in behavior, which is that
`resolve_primitive_associated_item` now goes through `variant_field` if
it fails to resolve something.  This is not ideal, but since it will be
quickly rejected anyway, I think the performance hit is worth the
cleanup.

This also fixes a bug where struct fields would forget to set the side
channel.
Now the family name is Source Serif 4 (upstream issue 77) instead of
Source Serif Pro.
…rk-Simulacrum

Use the beta compiler for building bootstrap tools when `download-rustc` is set

 ## Motivation

This avoids having to rebuild bootstrap and tidy each time you rebase
over master. In particular, it makes rebasing and running `x.py fmt` on
each commit in a branch significantly faster. It also avoids having to
rebuild bootstrap after setting `download-rustc = true`.

 ## Implementation

Instead of extracting the CI artifacts directly to `stage0/`, extract
them to `ci-rustc/` instead. Continue to copy them to the proper
sysroots as necessary for all stages except stage 0.

This also requires `bootstrap.py` to download both stage0 and CI
artifacts and distinguish between the two when checking stamp files.

Note that since tools have to be built by the same compiler that built
`rustc-dev` and the standard library, the downloaded artifacts can't be
reused when building with the beta compiler. To make sure this is still
a good user experience, warn when building with the beta compiler, and
default to building with stage 2.

I tested this by rebasing this PR from edeee91 over 1c77a1f and confirming that only the bootstrap library itself had to be rebuilt, not any dependencies and not `tidy`. I also tested that a clean build with `x.py build` builds rustdoc exactly once and does no other work, and that `touch src/librustdoc/lib.rs && x.py build` works. `x.py check` still behaves as before (checks using the beta compiler, even if there are changes to `compiler/`).

Helps with rust-lang#81930.

r? `@Mark-Simulacrum`
…k-Simulacrum

Add `download-rustc = "if-unchanged"`

This allows keeping the setting to a fixed value without having to
toggle it when you want to work on the compiler instead of on tools.

This sets `BOOTSTRAP_DOWNLOAD_RUSTC` in bootstrap.py so rustbuild doesn't have to try and replicate its logic.

Helps with rust-lang#81930.

r? ```````@Mark-Simulacrum``````` cc ```````@camelid```````
…eGomez

Update Source Serif to release 4.004

Now the family name is Source Serif 4 (upstream issue 77) instead of Source Serif Pro.
…order-shuffle, r=jyn514

List trait impls before deref methods in doc's sidebar

This PR is acting directly on a suggestion made by ``````@jyn514`````` in rust-lang#83133. I've tested the changes locally, and can confirm that it does in fact properly achieve what he thought it would. This PR also in turn closes rust-lang#83133.
…ine-for-ip, r=m-ou-se

Add `#[inline]` to IpAddr methods

Add some inlines to trivial methods of IpAddr
Closes rust-lang#77583
rustdoc: Cleanup handling of associated items for intra-doc links

Helps with rust-lang#83761 (right now the uses of the resolver are all intermingled with uses of the tyctxt). Best reviewed one commit at a time.

r? ```@bugadani``` maybe? Feel free to reassign :)
Render destructured struct function param names as underscore

Fixes rust-lang#83852

r? ```@GuillaumeGomez```
Don't report disambiguator error if link would have been ignored

Fixes rust-lang#83859.

This prevents us from warning on links such as `<hello@example.com>`.
Note that we still warn on links such as `<hello@localhost>` because
they have no dots in them. However, the links will still work, even
though a warning is reported.

r? ```@jyn514```
@rustbot rustbot added the rollup A PR which is a rollup label Apr 5, 2021
@jyn514
Copy link
Member Author

jyn514 commented Apr 5, 2021

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 5, 2021

📌 Commit baaa85a has been approved by jyn514

@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 Apr 5, 2021
@bors
Copy link
Contributor

bors commented Apr 5, 2021

⌛ Testing commit baaa85a with merge bdc42c256adbf5f2bf879fd5688281ed432523f7...

@bors
Copy link
Contributor

bors commented Apr 5, 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 Apr 5, 2021
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
 Documenting rustc_trait_selection v0.0.0 (/checkout/compiler/rustc_trait_selection)
[RUSTC-TIMING] rustc_codegen_ssa test:false 3.029
    Checking rustc_codegen_llvm v0.0.0 (/checkout/compiler/rustc_codegen_llvm)
 Documenting rustc_codegen_llvm v0.0.0 (/checkout/compiler/rustc_codegen_llvm)
error: public documentation for `ModuleData` links to private item `ModuleData::kind`
    |
    |
496 | /// You can use [`ModuleData::kind`] to determine the kind of module this is.
    |
    |
    = note: `-D rustdoc::private-intra-doc-links` implied by `-D warnings`
    = note: this link resolves only because you passed `--document-private-items`, but will break without
error: aborting due to previous error

error: could not document `rustc_resolve`


Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name rustc_resolve compiler/rustc_resolve/src/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/doc --error-format=json --json=diagnostic-rendered-ansi -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/deps --extern bitflags=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-7ec83cf720989e83.rmeta --extern rustc_arena=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_arena-e14df766a9a1d97d.rmeta --extern rustc_ast=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_ast-7ff7bb95d4c16229.rmeta --extern rustc_ast_lowering=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_ast_lowering-2281b2f55822a76b.rmeta --extern rustc_ast_pretty=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_ast_pretty-16fc105755939491.rmeta --extern rustc_attr=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_attr-8faf4f50e38a7d30.rmeta --extern rustc_data_structures=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-055eae6340fba688.rmeta --extern rustc_errors=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-bd9f33b8039500ac.rmeta --extern rustc_expand=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_expand-6ae81af4a5399ebe.rmeta --extern rustc_feature=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_feature-b4709a95b05971d1.rmeta --extern rustc_hir=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_hir-b0994d339cc6ad76.rmeta --extern rustc_index=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_index-7016c32b6dbe287c.rmeta --extern rustc_metadata=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_metadata-a586983d9479653f.rmeta --extern rustc_middle=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_middle-a1422b32a9ede3da.rmeta --extern rustc_session=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_session-a82c5457cab381b1.rmeta --extern rustc_span=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_span-2cfda9c12eeb510a.rmeta --extern smallvec=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/libsmallvec-bfb7de8be7e4e175.rmeta --extern tracing=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/deps/libtracing-d866109bfaeb9bb9.rmeta -Dwarnings '-Wrustdoc::invalid_codeblock_attributes' --crate-version '1.53.0-nightly
  (bdc42c256
  2021-04-05)' --document-private-items --enable-index-page -Zunstable-options -Znormalize-docs` (exit code: 1)
[RUSTC-TIMING] rustc_query_impl test:false 5.149
[RUSTC-TIMING] rustc_resolve test:false 3.003
warning: could not parse code block as Rust code
  --> compiler/rustc_trait_selection/src/opaque_types.rs:45:9
---
[RUSTC-TIMING] rustc_trait_selection test:false 4.285
error: build failed


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


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap dist --host x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu --include-default-paths src/tools/build-manifest --rust-profile-use=/tmp/rustc-pgo.profdata
Build completed unsuccessfully in 0:07:48

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.

10 participants