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 #90592

Closed
wants to merge 19 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

syvb and others added 19 commits November 3, 2021 09:24
Since rustc doesn't do the assembly parsing itself, it is unable
to detect when inline assembly ends with an instruction prefix,
which doesn't make sense since it would apply to instructions from
the compiler. This fixes rust-lang#82314 by mentioning that x86 instruction
prefixes must not be used in inline assembly.
Inspired by rust-lang#90521 , and by the
various `must_use` PRs; in all of those cases, the submitter of the PR
could know that `relnotes` applied, but couldn't apply it themselves.
People should be able to help triage by observing that a change needs an
FCP before we can apply it.
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
…r=notriddle

Simplify js tester a bit

r? ````@notriddle````
Add note about x86 instruction prefixes in asm! to unstable book

Since rustc doesn't do the assembly parsing itself, it is unable to detect when inline assembly ends with an instruction prefix, which doesn't make sense since it would apply to instructions from the compiler. This fixes rust-lang#82314 by mentioning that x86 instruction prefixes must not be used in inline assembly. AFAICT x86 is the only instruction set with instruction prefixes.
…henkov

Demote metadata load warning to "info".

There is a warn log message for whenever the crate loader fails to load metadata from a candidate file. I think this warning is too aggressive, as there are several situations where metadata information might not be found in a candidate file, which is normal. Also, this warning is somewhat confusing, and non-actionable in most cases for a user (most users will not know what it means).

If the crate loader ultimately does not find a valid crate, then an error will be reported (and hopefully rust-lang#88368 will improve that error message).

If a rustc developer wants to debug a loader problem, they can still use `RUSTC_LOG=rustc_metadata=debug` and get the details.

There is more discussion of this particular warning at rust-lang#89795 (comment).

Fixes rust-lang#90525
…oshtriplett

Clean up some `-Z unstable-options` in tests.

Several of these tests were for features that have been stabilized, or otherwise don't need `-Z unstable-options`.
…riplett

Add more text and examples to `carrying_{add|mul}`

`feature(bigint_helper_methods)` tracking issue rust-lang#85532

cc ````@clarfonthey````
…r=Mark-Simulacrum

rustbot allow labels

`relnotes` was inspired by rust-lang#90521 , and by the various `must_use` PRs; in all of those cases, the submitter of the PR could know that `relnotes` applied, but couldn't apply it themselves.

For `needs-fcp`, I think people should be able to help triage by observing that a change needs an FCP before we can apply it.
…r-sidebar, r=jsha

Fix missing bottom border for headings in sidebar

Fixes rust-lang#90568.

r? ``@jsha``
…n514

Fix ICE when rustdoc is scraping examples inside of a proc macro

This PR provides a clearer semantics for how --scrape-examples interacts with macros. If an expression's span AND it's enclosing item's span both are not `from_expansion`, then the example will be scraped. The added test case `rustdoc-scrape-examples-macros` shows a variety of situations.

* A macro-rules macro that takes a function call as input: good
* A macro-rules macro that generates a function call as output: bad
* A proc-macro that generates a function call as output: bad
* An attribute macro that generates a function call as output: bad
* An attribute macro that takes a function call as input: good, if the proc macro is designed to propagate the input spans

I ran this updated rustdoc on pyo3 and confirmed that it successfully scrapes examples from inside a proc macro, eg

<img width="1013" alt="Screen Shot 2021-11-04 at 1 11 28 PM" src="https://user-images.githubusercontent.com/663326/140412691-81a3bb6b-a448-4a1b-a293-f7a795553634.png">

(cc `@mejrs)`

Additionally, this PR fixes an ordering bug in the highlighting logic.

Fixes rust-lang#90567.

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

@bors r+ p=8 rollup=never

@bors
Copy link
Contributor

bors commented Nov 4, 2021

📌 Commit ad03584 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 4, 2021
@bors
Copy link
Contributor

bors commented Nov 5, 2021

⌛ Testing commit ad03584 with merge cdb38d38e26e9323e0d86be96ca2318412441947...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
test [run-make] run-make/emit-shared-files ... ok
test [run-make] run-make/rustdoc-scrape-examples-ordering ... ok
test [run-make] run-make/rustdoc-scrape-examples-multiple ... ok
test [run-make] run-make/thumb-none-cortex-m ... ok
Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-unknown-linux-gnu target=thumbv6m-none-eabi

failures:

---- [run-make] run-make/rustdoc-scrape-examples-macros stdout ----
---- [run-make] run-make/rustdoc-scrape-examples-macros stdout ----

error: make failed
status: exit status: 2
command: "make"
stdout:
------------------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros  -Clinker='arm-none-eabi-gcc' src/proc.rs --crate-name foobar_macro --edition=2021 --crate-type proc-macro --emit=dep-info,link
------------------------------------------
stderr:
------------------------------------------
------------------------------------------
error: linking with `arm-none-eabi-gcc` failed: exit status: 1
  |
  = note: "arm-none-eabi-gcc" "-m64" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.1.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.10.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.11.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.12.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.13.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.14.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.15.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.2.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.3.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.4.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.5.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.6.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.7.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.8.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.foobar_macro.51a9f759-cgu.9.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.522qhmis8l58hgod.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/foobar_macro.klt91je57imf15c.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-eed27eca17b77c00.rlib" "-Wl,--start-group" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4e888ad2557e7bcc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-dd8bf3fda2fc2c51.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-b69fd8507c8409af.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-2dff396b99681a6b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a78bd5aa183c7115.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-846c64d5a2fbc5ee.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-24c09062b6dc787b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-ce93f351ca41a57b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-e42af02528f038fc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-514cb174319eb6d4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-37c1534c42bc4f8c.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-06d0f7780fda2fd9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-4228e28a8f7a03ba.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-88bb1ba4dd271224.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a81f2980c3f58cf2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-0b5a376b429677a6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2a6a2797f7a73818.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0e3656b1fda5fd7b.rlib" "-Wl,--end-group" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-eecefd843a0dbc02.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/rustdoc-scrape-examples-macros/rustdoc-scrape-examples-macros/libfoobar_macro.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs"
  = note: arm-none-eabi-gcc: error: unrecognized command line option '-m64'

error: aborting due to previous error


make: *** [Makefile:6: all] Error 1
------------------------------------------




failures:
    [run-make] run-make/rustdoc-scrape-examples-macros

test result: FAILED. 18 passed; 1 failed; 25 ignored; 0 measured; 0 filtered out; finished in 21.62s



command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/thumbv6m-none-eabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/run-make" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make" "--stage-id" "stage2-thumbv6m-none-eabi" "--suite" "run-make" "--mode" "run-make" "--target" "thumbv6m-none-eabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "arm-none-eabi-gcc" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0  -Lnative=/checkout/obj/build/thumbv6m-none-eabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--llvm-version" "13.0.0-rust-1.58.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker dwp engine executionengine extensions filecheck frontendopenacc frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interfacestub interpreter ipo irreader jitlink libdriver lineeditor linker lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit orcshared orctargetprocess passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xray" "--llvm-bin-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin" "--cc" "arm-none-eabi-gcc" "--cxx" "arm-none-eabi-g++" "--cflags" "-ffunction-sections -fdata-sections -mthumb -march=armv6s-m" "--ar" "arm-none-eabi-ar" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--channel" "nightly" "--color" "always"


Build completed unsuccessfully in 0:16:02

@bors
Copy link
Contributor

bors commented Nov 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 Nov 5, 2021
@matthiaskrgr matthiaskrgr deleted the rollup-jjxcu11 branch November 20, 2021 15:04
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