about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-11-05Rollup merge of #103621 - fee1-dead-contrib:iat-fix-use, r=cjgillotDylan DPC-72/+66
Correctly resolve Inherent Associated Types I don't know if this is the best way to do this, but at least it is one way.
2022-11-05Auto merge of #103991 - matthiaskrgr:rollup-tj53nte, r=matthiaskrgrbors-295/+284
Rollup of 7 pull requests Successful merges: - #103868 (Use `TraitEngine` (by itself) less) - #103878 (Fix artifact version/channel detection for stable) - #103946 (Cleanup bind_pattern args) - #103956 (Make mir opt unused file check blessable) - #103977 (LLVM 16: Switch to using MemoryEffects) - #103980 (rustdoc: simplify search results CSS and DOM) - #103984 (Refactor tcx mk_const parameters.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-05Rollup merge of #103984 - V0ldek:103974-refactor-mk_const, r=BoxyUwUMatthias Krüger-104/+74
Refactor tcx mk_const parameters. Unroll the `ty::ConstS` parameter to `TyCtxt::mk_const` into separate `ty::ConstKind` and `Ty` parameters. Signature change is in: https://github.com/V0ldek/rust/blob/c97fd8183a98d6a89b8fc2e02eb068298e6fb7dc/compiler/rustc_middle/src/ty/context.rs#L2234 and https://github.com/V0ldek/rust/blob/c97fd8183a98d6a89b8fc2e02eb068298e6fb7dc/compiler/rustc_middle/src/ty/context.rs#L2572-L2575 the rest is callsites. Closes #103974 r? `@oli-obk`
2022-11-05Rollup merge of #103980 - notriddle:notriddle/search-results, r=GuillaumeGomezMatthias Krüger-32/+19
rustdoc: simplify search results CSS and DOM Preview: http://notriddle.com/notriddle-rustdoc-demos/search-results/std/index.html?search=vec There is a layout change caused by this commit, but it's subtle. You won't notice it unless you're looking for it. ## Before ![image](https://user-images.githubusercontent.com/1593513/200060877-05ae4135-db8d-4d24-8dfa-4c06b8ef671c.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200061474-b0ea9e8d-72c3-401f-9106-072307d9e2ff.png)
2022-11-05Rollup merge of #103977 - TimNN:memory-effects, r=nikicMatthias Krüger-12/+67
LLVM 16: Switch to using MemoryEffects This adapts the compiler to the changes required by https://github.com/llvm/llvm-project/commit/304f1d59ca41872c094def3aee0a8689df6aa398. AFAICT, `WriteOnly` isn't used by the compiler, all `ReadNone` uses were migrated and the remaining use of `ReadOnly` is only for function parameters. To simplify the FFI, this PR uses an enum to represent `MemoryEffects` across the FFI boundary, which then gets mapped to the matching static factory method when constructing the attribute. Fixes #103961. `@rustbot` label +llvm-main r? `@nikic`
2022-11-05Rollup merge of #103956 - JakobDegen:tidy-bless, r=jyn514Matthias Krüger-7/+11
Make mir opt unused file check blessable Makes it slightly nicer to work with. Can't write automated test but tested locally via ``` $ touch src/test/mir-opt/random $ x test tidy // shows failure $ x test tidy --bless // file gone ``` r? `@jyn514`
2022-11-05Rollup merge of #103946 - camsteffen:cleanup-bind-pattern, r=cjgillotMatthias Krüger-37/+14
Cleanup bind_pattern args Fixes #101896
2022-11-05Rollup merge of #103878 - Mark-Simulacrum:fix-stable-ci-download, r=jyn514Matthias Krüger-17/+42
Fix artifact version/channel detection for stable On stable, our artifacts are uploaded with the raw version number (e.g., 1.65.0), not the channel. This adjusts our detection logic to use the version number from src/version when we detect the stable channel. This is really only important for stable channel re-builds, I think, but those do happen from time to time. I'm backporting a similar commit in https://github.com/rust-lang/rust/pull/103859 to make that PR pass CI.
2022-11-05Rollup merge of #103868 - compiler-errors:trait-engine-less, r=jackh726Matthias Krüger-86/+57
Use `TraitEngine` (by itself) less Replace `TraitEngine` in favor of `ObligationCtxt` or `fully_solve_*`, improving code readability.
2022-11-04Auto merge of #103298 - ferrocene:pa-compile-flags-last, r=jyn514bors-39/+80
Ensure that compile-flags arguments are the last in UI tests Before this PR, compiletest would add `-L path/to/aux` at the end of the rustc flags, even after the custom ones set with the compile-flags header comment. This made it impossible to check how rustc would behave when a flag requiring an argument was passed without the argument, because the argument would become `-L`. This PR fixes that by adding the `-L path/to/aux` before the arguments defined in compile-flags, at least for UI tests. Other test suites might either be fixed as well by this change, or still present the old behavior (`-L` is now always passed before, but other tests suites might add additional flags after the custom ones).
2022-11-04Refactor tcx mk_const parameters.Mateusz-104/+74
2022-11-04rustdoc: get rid of CSS/DOM `div.desc span`, which isn't really neededMichael Howell-15/+12
2022-11-04Auto merge of #103978 - matthiaskrgr:rollup-iym9kmg, r=matthiaskrgrbors-407/+811
Rollup of 8 pull requests Successful merges: - #103367 (Remove std's transitive dependency on cfg-if 0.1) - #103397 (Port `dead_code` lints to be translatable.) - #103681 (libtest: run all tests in their own thread, if supported by the host) - #103792 (Migrate `codegen_ssa` to diagnostics structs - [Part 2]) - #103897 (asm: Work around LLVM bug on AArch64) - #103937 (minor changes to make method lookup diagnostic code easier to read) - #103958 (Test tidy should not count untracked paths towards entries limit) - #103964 (Give a specific lint for unsafety not being inherited) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-04rustdoc: simplify search results CSS and DOMMichael Howell-19/+9
There is a layout change caused by this commit, but it's subtle. You won't notice it unless you're looking for it.
2022-11-04LLVM 16: Switch to using MemoryEffectsTim Neumann-12/+67
2022-11-04Rollup merge of #103964 - clubby789:lint-enclosing-unsafe, r=compiler-errorsMatthias Krüger-9/+84
Give a specific lint for unsafety not being inherited In cases like ```rs static mut FOO: u64 = 0; fn main() { unsafe {static BAR: u64 = FOO;} } ``` and ```rs fn foo() { unsafe { fn bar() { unsafe_call(); } } } ``` Specifically inform the user that the unsafety is not inherited for the seperate enclosing items Fixes #94077 r? compiler-errors `@rustbot` label +A-diagnostics
2022-11-04Rollup merge of #103958 - chenyukang:yukang/fix-103951-count-limit, r=jyn514Matthias Krüger-26/+35
Test tidy should not count untracked paths towards entries limit Fixes #103951 r? `@jyn514`
2022-11-04Rollup merge of #103937 - BoxyUwU:misc_cleanups, r=compiler-errorsMatthias Krüger-101/+56
minor changes to make method lookup diagnostic code easier to read The end result of around 4 days of trying to understand this 1000+ line long function- a bunch of tiny nitpicks r? `@compiler-errors`
2022-11-04Rollup merge of #103897 - Amanieu:llvm-58384, r=davidtwcoMatthias Krüger-3/+70
asm: Work around LLVM bug on AArch64 Upstream issue: https://github.com/llvm/llvm-project/issues/58384 LLVM gets confused if we assign a 32-bit value to a 64-bit register, so pass the 32-bit register name to LLVM in that case.
2022-11-04Rollup merge of #103792 - ↵Matthias Krüger-99/+298
JhonnyBillM:migrate-codegen-ssa-to-diagnostics-structs-pt2, r=davidtwco Migrate `codegen_ssa` to diagnostics structs - [Part 2] Completes migrating `link.rs` in `codegen_ssa` module. _Part 1 - https://github.com/rust-lang/rust/pull/102612_ r? `@davidtwco`
2022-11-04Rollup merge of #103681 - RalfJung:libtest-thread, r=thomccMatthias Krüger-59/+42
libtest: run all tests in their own thread, if supported by the host This reverts the threading changes of https://github.com/rust-lang/rust/pull/56243, which made it so that with `-j1`, the test harness does not spawn any threads. Those changes were done to enable Miri to run the test harness, but Miri supports threads nowadays, so this is no longer needed. Using a thread for each test is useful because the thread's name can be set to the test's name which makes panic messages consistent between `-j1` and `-j2` runs and also a bit more readable. I did not revert the HashMap changes of https://github.com/rust-lang/rust/pull/56243; using a deterministic map seems fine for the test harness and the more deterministic testing is the better. Fixes https://github.com/rust-lang/rust/issues/59122 Fixes https://github.com/rust-lang/rust/issues/70492
2022-11-04Rollup merge of #103397 - crlf0710:port_dead_code_lint, r=davidtwcoMatthias Krüger-99/+215
Port `dead_code` lints to be translatable. This adds an additional comma to lists with three or more items, to be consistent with list formatters like `icu4x`. r? `@davidtwco`
2022-11-04Rollup merge of #103367 - chbaker0:update-std-getrandom, r=thomccMatthias Krüger-11/+11
Remove std's transitive dependency on cfg-if 0.1 After https://github.com/rust-lang/rust/pull/101946 this completes the move to cfg-if 1.0 by: * Updating getrandom 0.1.14->0.1.16 * Updating panic_abort's and unwind's dep to cfg-if 1.0 Fixes https://github.com/rust-lang/rust/issues/103365
2022-11-04Auto merge of #101703 - nicholasbishop:bishop-add-uefi-ci-2, r=jyn514bors-2/+159
Add QEMU test for x86_64-unknown-uefi The UEFI targets don't have std support yet, so the normal tests don't work. However, we can compile a simple no-std program and run it under QEMU to at least check that the target compiles, links, and runs. Tested locally with: `src/ci/docker/run.sh x86_64-uefi`
2022-11-04test tidy should not count untracked paths towards entries limityukang-26/+35
2022-11-04Auto merge of #103962 - matthiaskrgr:rollup-9av8i6k, r=matthiaskrgrbors-213/+334
Rollup of 7 pull requests Successful merges: - #103680 (CStr: add some doc links) - #103780 (Fix late-bound lifetime closure ICEs in HIR typeck and MIR borrowck) - #103845 (Add track_caller to some Lock methods) - #103935 (Remove rustdoc clean::Visibility type) - #103941 (Fixed typos) - #103950 (Fix ICE when negative impl is collected during eager mono) - #103953 (Remove unused argument from `throw_unresolved_import_error`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-04Formatting changes + add UI testclubby789-10/+59
2022-11-04Give a specific lint for unsafety not being inheritedclubby789-9/+35
2022-11-04Rollup merge of #103953 - ↵Matthias Krüger-18/+10
TaKO8Ki:remove-unused-arg-from-throw_unresolved_import_error, r=oli-obk Remove unused argument from `throw_unresolved_import_error` `throw_unresolved_import_error` does not need the second argument.
2022-11-04Rollup merge of #103950 - nbdd0121:master, r=tmiaskoMatthias Krüger-0/+16
Fix ICE when negative impl is collected during eager mono ```rust trait Foo { fn foo() {} } impl !Foo for () {} ``` This code will currently cause an ICE when mono collection mode is "eager" (with `-C link-dead-code=y` or `-Z print-mono-items=eager`.
2022-11-04Rollup merge of #103941 - douweschulte:patch-1, r=jyn514Matthias Krüger-2/+2
Fixed typos Fixed a typo that has been found on two locations in comments.
2022-11-04Rollup merge of #103935 - GuillaumeGomez:remove-rustdoc-visibility-ty, ↵Matthias Krüger-153/+129
r=notriddle Remove rustdoc clean::Visibility type Fixes #90852. Follow-up of https://github.com/rust-lang/rust/pull/103690. This PR completely removes the rustdoc `clean::Visibility` type to use the `rustc_middle` one instead. I don't think there will be any impact on perf. r? `@notriddle`
2022-11-04Rollup merge of #103845 - camsteffen:data-structures-track-caller, ↵Matthias Krüger-0/+11
r=compiler-errors Add track_caller to some Lock methods Would have helped to diagnose #103844.
2022-11-04Rollup merge of #103780 - compiler-errors:bound-closure-lifetimes, r=jackh726Matthias Krüger-38/+161
Fix late-bound lifetime closure ICEs in HIR typeck and MIR borrowck During HIR typeck, we need to teach astconv to treat late-bound regions within a closure body as free, fixing escaping bound vars ICEs in both of the issues below. However, this then gets us to MIR borrowck, which itself needs to be taught how to instantiate free region vids for late-bound regions that come from items that _aren't_ the typeck root (for now, just closures). Fixes #103771 Fixes #103736
2022-11-04Rollup merge of #103680 - RalfJung:cstr-links, r=JohnTitorMatthias Krüger-2/+5
CStr: add some doc links
2022-11-04Auto merge of #103098 - Amanieu:asm-tied-fixed, r=bjorn3bors-2/+11
asm: Match clang behavior for inlateout fixed register operands We have 2 options for representing LLVM constraints for `inlateout` operands on a fixed register (e.g. `r0`): `={r0},0` or `={r0},{r0}`. This PR changes the behavior to the latter, which matches the behavior of Clang since https://reviews.llvm.org/D87279.
2022-11-04Auto merge of #103954 - matthiaskrgr:rollup-tskpxnj, r=matthiaskrgrbors-83/+125
Rollup of 10 pull requests Successful merges: - #103825 (Remove let_underscore_must_use from list of uplifted lints) - #103884 (Add visit_fn_ret_ty to hir intravisit) - #103892 (Properly render asyncness for trait fns without default body) - #103905 (rustdoc: remove redundant mobile CSS `.sidebar-elems { background }`) - #103912 (Add howto for adding new targets) - #103915 (Improve use of ErrorGuaranteed and code cleanup) - #103930 (Move some tests from `src/test/ui` to more reasonable places) - #103931 (Add note to RELEASES.md regarding issue 102754.) - #103938 (rustdoc: clean up hardcoded CSS border color on search results) - #103940 (rustdoc: remove no-op CSS `#main-content > .item-info { margin-top: 0 }`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-03Make mir opt unused file check blessableJakob Degen-7/+11
2022-11-04Rollup merge of #103940 - ↵Matthias Krüger-1/+0
notriddle:notriddle/main-content-item-info-margin-top, r=GuillaumeGomez rustdoc: remove no-op CSS `#main-content > .item-info { margin-top: 0 }` When this line was added in 04b4c40682c01cad8f9bc8d5b3907be91d6f81d4, it overrode a negative `margin-top` that was set on it by default. https://github.com/rust-lang/rust/blob/04b4c40682c01cad8f9bc8d5b3907be91d6f81d4/src/librustdoc/html/static/rustdoc.css#L500-L516 That negative top margin was removed in 593d6d1cb15c55c88319470dabb40126c7b7f1e2.
2022-11-04Rollup merge of #103938 - notriddle:notriddle/search-results-border-bottom, ↵Matthias Krüger-2/+19
r=GuillaumeGomez rustdoc: clean up hardcoded CSS border color on search results Hardcoded colors in rustdoc.css should usually be avoided. Preview: http://notriddle.com/notriddle-rustdoc-demos/border-bottom-search/test_dingus/?search=test
2022-11-04Rollup merge of #103931 - pnkfelix:note-eh-personality-limit-atop-lld, ↵Matthias Krüger-0/+3
r=Mark-Simulacrum Add note to RELEASES.md regarding issue 102754. As discussed in [compiler triage meeting today](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202022-11-03/near/307746618); it would have been nice to get this in time for the stable notes, but having it only in nightly only is better than nothing... r? `@Mark-Simulacrum`
2022-11-04Rollup merge of #103930 - fee1-dead-contrib:mv-from-root, r=jyn514Matthias Krüger-8/+8
Move some tests from `src/test/ui` to more reasonable places
2022-11-04Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnrMatthias Krüger-51/+30
Improve use of ErrorGuaranteed and code cleanup Part of #103874
2022-11-04Rollup merge of #103912 - flba-eb:doc_adding_tier3_target, r=davidtwcoMatthias Krüger-0/+25
Add howto for adding new targets When new targets are added, often a reviewer finds out that e.g. the target-3-tier-policy is not filled out (missing), there is no description etc. This change adds a description of what I've learned while working on #102701. It should make reviews easier in the future with less rework. r? compiler-team
2022-11-04Rollup merge of #103905 - notriddle:notriddle/sidebar-elems-background, ↵Matthias Krüger-1/+0
r=GuillaumeGomez rustdoc: remove redundant mobile CSS `.sidebar-elems { background }` The exact same background is already set for its parent, the `nav.sidebar`.
2022-11-04Rollup merge of #103892 - compiler-errors:afit-rustdoc, r=GuillaumeGomezMatthias Krüger-18/+35
Properly render asyncness for trait fns without default body We weren't properly desugaring async fns in traits unless they had default bodies (in which case rustdoc treats them much like they came from an impl). cc ```@yoshuawuyts``` should help with https://rust-lang.zulipchat.com/#narrow/stream/330606-wg-async.2Fasync-fn-in-trait-impl/topic/type.20inside.20.60async.20fn.60.20body.20must.20be.20known.20in.20this.20context/near/306894869
2022-11-04Rollup merge of #103884 - spastorino:visit-fn-ret-ty-intravisit, ↵Matthias Krüger-1/+4
r=compiler-errors Add visit_fn_ret_ty to hir intravisit I'm working on some RPITIT changes and I need to specialize `visit_fn_ret_ty` in my visitor impl. So I guess it's better to land it separately. r? `@compiler-errors`
2022-11-04Rollup merge of #103825 - Mark-Simulacrum:fix-relnotes, r=pietroalbiniMatthias Krüger-1/+1
Remove let_underscore_must_use from list of uplifted lints Per https://internals.rust-lang.org/t/rust-1-65-0-pre-release-testing/17660/2 We probably won't backport this (not worth rebuilding stable artifacts over it) but still should be fixed.
2022-11-04UPDATE - accept dyn error and make Box<dyn error> conform to IntoDiagnosticArgJhonny Bill Mena-22/+22
2022-11-04UPDATE - address PR CommentsJhonny Bill Mena-83/+40
FIX - StrippingDebugInfoFailed typo DELETE - unneeded FIXME comment UPDATE - only declare the error with ExtractBundledLibsError as an enum and use the Diagnostic derive macro