about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-12-23Always suggest as `MachineApplicable` in `recover_intersection_pat`Yuki Okushi-35/+81
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22Auto merge of #103957 - JakobDegen:drop-retag, r=RalfJungbors-15/+199
Retag as FnEntry on `drop_in_place` This commit changes the mir drop shim to always retag its argument as if it were a `&mut`. cc rust-lang/unsafe-code-guidelines#373
2022-12-22Auto merge of #106000 - nikic:lld-build, r=Mark-Simulacrumbors-99/+58
Make LLD build forward-compatible with LLVM 16 Switch to using the cmake module instead of llvm-config. I believe this also removes the need for llvm-config-wrapper.
2022-12-22Use LLVM_CMAKE_DIR for lld buildNikita Popov-95/+58
LLVM_CONFIG_PATH is no longer supported as of LLVM 16, switch to using the cmake module instead. We separately return the llvm-config and cmake directory paths, because llvm-config always refers to the host binary, while the cmake directory is for the target triple.
2022-12-22Auto merge of #106034 - matthiaskrgr:rollup-2zpql33, r=matthiaskrgrbors-126/+414
Rollup of 8 pull requests Successful merges: - #104741 (Switch `#[track_caller]` back to a no-op unless feature gate is enabled) - #105769 (add function to tell the identical errors for ambiguity_errors) - #105843 (Suggest associated const on possible capitalization mistake) - #105966 (Re-enable `Fn` trait call notation error for non-tuple argument) - #106002 (codegen tests: adapt patterns to also work with v0 symbol mangling) - #106010 (Give opaque types a better coherence error) - #106016 (rustdoc: simplify link anchor to section expand JS) - #106024 (Fix ICE due to `todo!()` in `rustdoc` for `Term`s) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Rollup merge of #106024 - JulianKnodt:add_term_html_docs, r=notriddleMatthias Krüger-4/+18
Fix ICE due to `todo!()` in `rustdoc` for `Term`s Left a todo awhile ago (I think), so fill it in to print a const for `Term`s. Fixes #105952. Should I add some annotations to the rustdoc test?
2022-12-22Rollup merge of #106016 - notriddle:notriddle/link-has-onclick, r=GuillaumeGomezMatthias Krüger-7/+5
rustdoc: simplify link anchor to section expand JS
2022-12-22Rollup merge of #106010 - oli-obk:tait_coherence_diagnostic, r=compiler-errorsMatthias Krüger-9/+16
Give opaque types a better coherence error
2022-12-22Rollup merge of #106002 - krasimirgg:v0sym, r=tmiaskoMatthias Krüger-2/+4
codegen tests: adapt patterns to also work with v0 symbol mangling No functional changes intended. These tests were failing under `new-symbol-mangling = true`, cf. https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/a.20few.20panic-abort.20tests.20fail.20under.20.60new-symbol-mangling.60. This adapts the patterns to work in this case.
2022-12-22Rollup merge of #105966 - compiler-errors:issue-105936, r=eholkMatthias Krüger-1/+27
Re-enable `Fn` trait call notation error for non-tuple argument I have no idea why I delayed this bug... but also there doesn't seem to be a UI test that actually shows a change, so maybe that's why. Fixes #105936
2022-12-22Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnrMatthias Krüger-13/+178
Suggest associated const on possible capitalization mistake Suggest `i32::MAX` if we typed `i32::max` without making a function call. Fixes #93844
2022-12-22Rollup merge of #105769 - lyming2007:issue-105177-fix, r=eholkMatthias Krüger-56/+32
add function to tell the identical errors for ambiguity_errors if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same we call these 2 ambiguity errors identical prevent identical ambiguity error from pushing into vector of ambiguity_errors this will fix #105177
2022-12-22Rollup merge of #104741 - bryangarza:bug-104588-async-track-caller, ↵Matthias Krüger-34/+134
r=compiler-errors Switch `#[track_caller]` back to a no-op unless feature gate is enabled This patch fixes a regression, in which `#[track_caller]`, which was previously a no-op, was changed to actually turn on the behavior. This should instead only happen behind the `closure_track_caller` feature gate. Also, add a warning for the user to understand how their code will compile depending on the feature gate being turned on or not. Fixes #104588
2022-12-22Auto merge of #104889 - GuillaumeGomez:fix-impl-block-in-const-expr, r=notriddlebors-56/+193
Fix impl block in const expr Fixes #83026. The problem was that we didn't visit block expressions. Considering how big the [walk_expr](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_hir/intravisit.rs.html#678) function is, I decided to instead implement the `hir` visitor on the struct. It also answers the question which was in a comment for `RustdocVisitor`: we should have used a visitor instead of our ad-hoc implementation. Adding this visitor also added some extra checks that weren't present before (check changes in `rustdoc-ui` tests). r? `@notriddle`
2022-12-22Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgrbors-99/+181
Rollup of 6 pull requests Successful merges: - #105837 (Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity) - #105932 (Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15) - #105960 (Various cleanups) - #105985 (Method chain nitpicks) - #105996 (Test that async blocks are `UnwindSafe`) - #106012 (Clarify that raw retags are not permitted in Mir) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-22Suggest associated const on capitalization errorMichael Goulet-13/+178
2022-12-22Auto merge of #106023 - JohnTitor:rollup-k8mettz, r=JohnTitorbors-75/+127
Rollup of 8 pull requests Successful merges: - #105584 (add assert messages if chunks/windows are length 0) - #105602 (interpret: add read_machine_[ui]size convenience methods) - #105824 (str.lines() docstring: clarify that line endings are not returned) - #105980 (Refer to "Waker" rather than "RawWaker" in `drop` comment) - #105986 (Fix typo in reading_half_a_pointer.rs) - #105995 (Add regression test for #96530) - #106008 (Sort lint_groups in no_lint_suggestion) - #106014 (Add comment explaining what the scrape-examples-toggle.goml GUI test is about) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-21Change comment to doc commentEric Holk-1/+1
2022-12-22Fix ICEkadmin-4/+18
Left a todo awhile ago (I think), so fill it in to print a const for `Term`s.
2022-12-21Don't run `Drop` terminators on types that do not have drop glue in const evalJakob Degen-13/+21
2022-12-22Rollup merge of #106012 - JakobDegen:retag-raw, r=RalfJungMatthias Krüger-19/+16
Clarify that raw retags are not permitted in Mir Not sure when this changed, but documentation and the validator needed to be updated. This also removes raw retags from custom mir. cc rust-lang/miri#2735 r? `@RalfJung`
2022-12-22Rollup merge of #105996 - Swatinem:async-is-unwindsafe, r=petrochenkovMatthias Krüger-0/+68
Test that async blocks are `UnwindSafe` This was a regression from the reverted #105250 which is now covered by a test.
2022-12-22Rollup merge of #105985 - compiler-errors:method-chain-nitpicks, r=estebankMatthias Krüger-42/+44
Method chain nitpicks Just fixing some little things I didn't see in review from that method chain PR. r? `@estebank`
2022-12-22Rollup merge of #105960 - oli-obk:effect_cleanup, r=fee1-deadMatthias Krüger-30/+20
Various cleanups This PR pulls changes out of https://github.com/rust-lang/rust/pull/101900 that can land on master immediately r? ``@fee1-dead``
2022-12-22Rollup merge of #105932 - MasterAwesome:aarch64-bti-llvm-15, r=nikicMatthias Krüger-4/+11
Correct branch-protection ModFlagBehavior for Aarch64 on LLVM-15 When building with Fat LTO and BTI enabled on aarch64, the BTI is set to `Module::Min` for alloc shim but is set to `Module::Error` for the crate. This was fine when we were using LLVM-14 but LLVM-15 changes it's behaviour to support for compiling with different `mbranch-protection` flags. Refer: https://github.com/rust-lang/llvm-project/commit/b0343a38a5910e980bb031e4014655d77cd0c162 fixes https://github.com/rust-lang/rust/issues/102162
2022-12-22Rollup merge of #105837 - compiler-errors:issue-105728, r=estebankMatthias Krüger-4/+22
Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity These expressions are just used for their spans, so make it best-effort here. Fixes #105728
2022-12-22Rollup merge of #106014 - ↵Yuki Okushi-0/+1
GuillaumeGomez:add-gui-explanations-scrape-examples-toggle, r=notriddle Add comment explaining what the scrape-examples-toggle.goml GUI test is about r? `@notriddle`
2022-12-22Rollup merge of #106008 - uweigand:s390x-lintgroup-order, r=NilstriebYuki Okushi-1/+10
Sort lint_groups in no_lint_suggestion The no_lint_suggestion routine passes a vector of lint group names to find_best_match_for_name. That routine depends on the sort order of its input vector, which matters in case multiple inputs are at the same Levenshtein distance to the target name. However, no_lint_suggestion currently just passes lint_groups.keys() as input vector - this is sorted in hash value order, which is not guaranteed to be stable, and in fact differs between big- and little-endian host platforms, causing test failures on s390x. To fix this, always sort the lint groups before using their names as input to find_best_match_for_name. In doing so, prefer non- deprecated lint group names over deprecated ones, and then use alphabetical order. Fixes https://github.com/rust-lang/rust/issues/105379
2022-12-22Rollup merge of #105995 - JohnTitor:issue-96530, r=compiler-errorsYuki Okushi-0/+29
Add regression test for #96530 Closes #96530 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-22Rollup merge of #105986 - eltociear:patch-18, r=RalfJungYuki Okushi-1/+1
Fix typo in reading_half_a_pointer.rs gurantee -> guarantee
2022-12-22Rollup merge of #105980 - goffrie:waker-drop, r=thomccYuki Okushi-2/+2
Refer to "Waker" rather than "RawWaker" in `drop` comment In my view this is technically more correct as `Waker` actually implements `Drop` (which calls the `drop` method) whereas `RawWaker` does not.
2022-12-22Rollup merge of #105824 - zacchiro:patch-1, r=JohnTitorYuki Okushi-2/+4
str.lines() docstring: clarify that line endings are not returned Previously, the str.lines() docstring stated that lines are split at line endings, but not whether those were returned or not. This new version of the docstring states this explicitly, avoiding the need of getting to doctests to get an answer to this FAQ.
2022-12-22Rollup merge of #105602 - RalfJung:read-convenience, r=oli-obkYuki Okushi-60/+71
interpret: add read_machine_[ui]size convenience methods We have `read_pointer`, so it felt inconsistent to not also have these. r? ```@oli-obk```
2022-12-22Rollup merge of #105584 - raffimolero:patch-1, r=JohnTitorYuki Okushi-9/+9
add assert messages if chunks/windows are length 0
2022-12-21Update track_caller tests; run fmtBryan Garza-20/+9
2022-12-21Auto merge of #105613 - Nilstrieb:rename-assert_uninit_valid, r=RalfJungbors-19/+24
Rename `assert_uninit_valid` intrinsic It's not about "uninit" anymore but about "filling with 0x01 bytes" so the name should at least try to reflect that. This is actually not fully correct though, as it does still panic for all uninit with `-Zstrict-init-checks`. I'm not sure what the best way is to deal with that not causing confusion. I guess we could just remove the flag? I don't think having it makes a lot of sense anymore with the direction that we have chose to go. It could be relevant again if #100423 lands so removing it may be a bit over eager. r? `@RalfJung`
2022-12-21Bless testsJakob Degen-4/+4
2022-12-21Retag argument to `drop_in_place` unconditionallyJakob Degen-47/+34
2022-12-21Retag as FnEntry on `drop_in_place`Jakob Degen-3/+192
2022-12-21rustdoc: simplify link anchor to section expand JSMichael Howell-7/+5
2022-12-21Auto merge of #105979 - matthiaskrgr:rollup-2luw3mx, r=matthiaskrgrbors-72/+235
Rollup of 8 pull requests Successful merges: - #105791 (docs: add long error explanation for error E0472) - #105897 (Fix an opaque type ICE) - #105904 (Fix arch flag on i686-apple-darwin) - #105949 (Bump `cfg-if` to `1.0` in rustc crates) - #105964 (rustdoc: prevent CSS layout of line numbers shrinking into nothing) - #105972 (rustdoc: simplify section anchor CSS) - #105973 (Avoid going through the happy path in case of non-fn builtin calls) - #105976 (Remove unused `check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu` make rule) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-12-21Forbid `RetagKind::TwoPhase` as wellJakob Degen-4/+3
2022-12-21Add comment explaining what the scrape-examples-toggle.goml GUI test is aboutGuillaume Gomez-0/+1
2022-12-21Clarify that raw retags are not permitted in MirJakob Degen-19/+17
2022-12-21Sort lint_groups in no_lint_suggestionUlrich Weigand-1/+10
The no_lint_suggestion routine passes a vector of lint group names to find_best_match_for_name. That routine depends on the sort order of its input vector, which matters in case multiple inputs are at the same Levenshtein distance to the target name. However, no_lint_suggestion currently just passes lint_groups.keys() as input vector - this is sorted in hash value order, which is not guaranteed to be stable, and in fact differs between big- and little-endian host platforms, causing test failures on s390x. To fix this, always sort the lint groups before using their names as input to find_best_match_for_name. In addition, deprecated lint groups should never be suggested, so filter those out. Fixes https://github.com/rust-lang/rust/issues/105379
2022-12-21Give opaque types a better coherence errorOli Scherer-9/+16
2022-12-21Auto merge of #105812 - ojeda:no-jump-tables, r=nikicbors-0/+69
Add `-Zno-jump-tables` This flag mimics GCC/Clang's `-fno-jump-tables` [1][2], which makes the codegen backend avoid generating jump tables when lowering switches. In the case of LLVM, the `"no-jump-tables"="true"` function attribute is added to every function. The kernel currently needs it for x86 when enabling IBT [3], as well as for Alpha (plus VDSO objects in MIPS/LoongArch). [1] https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-jump-tables [2] https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fjump-tables [3] https://github.com/torvalds/linux/blob/v6.1/arch/x86/Makefile#L75-L83
2022-12-21codegen tests: adapt patterns to also work with v0 symbol manglingKrasimir Georgiev-2/+4
No functional changes intended. These tests were failing under `new-symbol-mangling = true`. This adapts the patterns to work in this case.
2022-12-21Auto merge of #100390 - jhpratt:float-from-bool, r=dtolnaybors-0/+20
Implement `From<bool>` for f32, f64 As is required for trait implementations, these are insta-stable. Given there is a release tomorrow and this needs FCP, I set 1.65 as the stable version. `@rustbot` label +A-floating-point +C-feature-request +needs-fcp +relnotes +S-waiting-on-review +T-libs-api -T-libs
2022-12-21Test that async blocks are UnwindSafeArpad Borsos-0/+68
This was a regression from the reverted #105250 which is now covered by a test.