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 4 pull requests #90899

Closed
wants to merge 10 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

JakobDegen and others added 10 commits November 13, 2021 16:28
…ggest references

When suggesting references, substitutions were being forgotten and some types were misused. This led to at
least one ICE and other incorrectly emitted diagnostics. This has been fixed; in some cases this leads to
diagnostics changing, and tests have been adjusted.
The macro now documents all generated items. Documentation notes
possible panics and unsafety.
Linker arguments must transformed when Rust is interacting with the
linker through a compiler. This commit introduces a helper function
that abstracts away details of this transformation.
This commit refactors linker argument generation to leverage a helper
function that abstracts away details governing how these arguments are
transformed and provided to the linker.

This fixes the misuse of the `-exported_symbols_list` when an ld-like
linker is used rather than a compiler. A compiler would expect
`-Wl,-exported_symbols_list,path` but ld would expect
`-exported_symbols_list` and `path` as two seperate arguments. Prior
to this change, an ld-like linker was given
`-exported_symbols_list,path`.
This is not a valid flag for ld64. When the ld64 linker is explicitly
provided through `config.toml`, rustc will not successfully compile.
Fix ld64 flags

- The `-exported_symbols_list` argument appears to be malformed for `ld64` (if you are not going through `clang`).
- The `-dynamiclib` argument isn't support for `ld64`. It should be guarded behind a compiler flag.

These problems are fixed by these changes. I have also refactored the way linker arguments are generated to be ld/compiler agnostic and therefore less error prone.

These changes are necessary to support cross-compilation to darwin targets.
Fixes incorrect handling of TraitRefs when emitting suggestions.

Closes rust-lang#90804 , although there were more issues here that were hidden by the thing that caused this ICE.

Underlying problem was that substitutions were being thrown out, which not only leads to an ICE but also incorrect diagnostics. On top of that, in some cases the self types from the root obligations were being mixed in with those from derived obligations.

This makes a couple diagnostics arguable worse ("`B<C>` does not implement `Copy`" instead of "`C` does not implement `Copy`") but the worse diagnostics are at least still correct and that downside is in my opinion clearly outweighed by the benefits of fixing the ICE and unambiguously wrong diagnostics.
…r=jackh726

Generate documentation in rustc `rustc_index::newtype_index` macro

The macro now documents all generated items. Documentation notes possible panics and unsafety.
…li-obk

fix ICE on Miri/CTFE copy of half a pointer

Fixes rust-lang/miri#1910
r? `@oli-obk`
@rustbot rustbot added the rollup A PR which is a rollup label Nov 14, 2021
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=4

@bors
Copy link
Contributor

bors commented Nov 14, 2021

📌 Commit cf1f1a2 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 Nov 14, 2021
@bors
Copy link
Contributor

bors commented Nov 14, 2021

⌛ Testing commit cf1f1a2 with merge 3d0d7c374444edd85a3da5fd35c090f7df1b480e...

@bors
Copy link
Contributor

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

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

Click to see the possible cause of the failure (guessed by this bot)
   Compiling build_helper v0.1.0 (/checkout/src/build_helper)
   Compiling thread_local v1.0.1
   Compiling walkdir v2.3.1
   Compiling getopts v0.2.21
error: could not compile `once_cell`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc --crate-name once_cell --edition=2018 /cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.7.2/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=0 --cfg 'feature="alloc"' --cfg 'feature="default"' --cfg 'feature="race"' --cfg 'feature="std"' -C metadata=5bf50caf48c031d7 -C extra-filename=-5bf50caf48c031d7 --out-dir /checkout/obj/build/bootstrap/debug/deps -L dependency=/checkout/obj/build/bootstrap/debug/deps --cap-lints allow -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings` (signal: 6, SIGABRT: process abort signal)
error: build failed
failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
Build completed unsuccessfully in 0:00:56
make: *** [prepare] Error 1
---
[RUSTC-TIMING] itoa test:false 0.103
   Compiling pest v2.1.3
   Compiling walkdir v2.3.1
[RUSTC-TIMING] build_script_build test:false 0.230
rustc exited with signal: 11 (core dumped)
error: could not compile `memchr`
Caused by:
Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc --crate-name build_script_build --edition=2018 /cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.4.1/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=dbf3c232759be82b -C extra-filename=-dbf3c232759be82b --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/build/memchr-dbf3c232759be82b -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/release/deps --cap-lints allow -Z binary-dep-depinfo` (exit status: 254)
[RUSTC-TIMING] same_file test:false 0.215
[RUSTC-TIMING] autocfg test:false 0.338
[RUSTC-TIMING] build_script_build test:false 0.366
[RUSTC-TIMING] build_script_build test:false 0.413

@matthiaskrgr matthiaskrgr deleted the rollup-b1p25q0 branch November 20, 2021 15:03
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.

8 participants