about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-07-29Remove LLVM 14 codegen testsJubilee Young-178/+0
We raised our LLVM minimum to 15, so these tests seem pointless.
2023-07-29tests/codegen/c-variadic* -> cffi/c-variadic*Jubilee Young-0/+0
2023-07-29tests/codegen/ffi-* -> cffi/ffi-*Jubilee Young-0/+0
2023-07-29tests/codegen/naked-* -> naked-fn/naked-*Jubilee Young-0/+0
2023-07-29tests/codegen/*simd*.rs -> simd/*simd*Jubilee Young-0/+0
2023-07-29tests/codegen/*-macos-* -> macos/*Jubilee Young-0/+0
2023-07-29tests/codegen/enum-* -> enum/enum-*Jubilee Young-0/+0
2023-07-29Auto merge of #114156 - calebzulawski:simd-bswap, r=compiler-errorsbors-25/+173
Add simd_bswap, simd_bitreverse, simd_ctlz, and simd_cttz intrinsics cc `@workingjubilee`
2023-07-29Auto merge of #114028 - Centri3:ternary-operator, r=compiler-errorsbors-2/+241
Gracefully handle ternary operator Fixes #112578 ~~May not be the best way to do this as it doesn't check for a single `:`, so it could perhaps appear even when the actual issue is just a missing semicolon. May not be the biggest deal, though?~~ Nevermind, got it working properly now ^^
2023-07-29Auto merge of #114148 - cuviper:drop-llvm-14, r=nikicbors-472/+293
Update the minimum external LLVM to 15 With this change, we'll have stable support for LLVM 15 through 17 (pending release). For reference, the previous increase to LLVM 14 was #107573.
2023-07-29Auto merge of #114150 - clubby789:improve-option-ref-suggestion, r=WaffleLapkinbors-74/+153
Refactor + improve diagnostics for `&mut T`/`T` mismatch inside Option/Result Follow up to #114052. This also makes the diagnostics structured + translatable. r? `@WaffleLapkin`
2023-07-29Auto merge of #114141 - Kobzol:llvm-bolt-flags, r=lqdbors-0/+2
Change LLVM BOLT flags I talked to the BOLT maintainers about the binary size effect of BOLT. Currently, BOLTing LLVM increases its binary size from ~120 MiB to ~170 MiB, which is not ideal. Now we can track both runtime performance and (rustc, LLVM, ...) artifact sizes in perf.RLO, so I'd like to try experimenting with changing the flags to reduce `libLLVM.so` size without regressing the performance gains of BOLT too much. r? `@ghost`
2023-07-29Auto merge of #113422 - Urgau:cast_ref_to_mut-pre-beta, r=Nilstriebbors-45/+42
Rename and allow `cast_ref_to_mut` lint This PR is a small subset of https://github.com/rust-lang/rust/pull/112431, that is the renaming of the lint (`cast_ref_to_mut` -> `invalid_reference_casting`). BUT also temporarily change the default level of the lint from deny-by-default to allow-by-default until https://github.com/rust-lang/rust/pull/112431 is merged. r? `@Nilstrieb`
2023-07-29Auto merge of #113099 - bvanjoi:fix-112713-2, r=petrochenkovbors-58/+1535
fix(resolve): update the ambiguity glob binding as warning recursively Fixes #47525 Fixes #56593, but `issue-56593-2.rs` is not fixed to ensure backward compatibility. Fixes #98467 Fixes #105235 Fixes #112713 This PR had added a field called `warn_ambiguous` in `NameBinding` which is only for back compatibly reason and used for lint. More details: https://github.com/rust-lang/rust/pull/112743 r? `@petrochenkov`
2023-07-29Auto merge of #114197 - matthiaskrgr:rollup-iluf7u4, r=matthiaskrgrbors-78/+69
Rollup of 7 pull requests Successful merges: - #113773 (Don't attempt to compute layout of type referencing error) - #114107 (Prevent people from assigning me as a PR reviewer) - #114124 (tests/ui/proc-macro/*: Migrate FIXMEs to check-pass) - #114171 (Fix switch-stdout test for none unix/windows platforms) - #114172 (Fix issue_15149 test for the SGX target) - #114173 (btree/map.rs: remove "Basic usage" text) - #114174 (doc: replace wrong punctuation mark) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-29Rollup merge of #114174 - tshepang:patch-6, r=workingjubileeMatthias Krüger-1/+1
doc: replace wrong punctuation mark
2023-07-29Rollup merge of #114173 - tshepang:patch-1, r=workingjubileeMatthias Krüger-54/+0
btree/map.rs: remove "Basic usage" text Not useful, for there is just a single example
2023-07-29Rollup merge of #114172 - fortanix:raoul/fix_process-spawning_test, ↵Matthias Krüger-0/+2
r=workingjubilee Fix issue_15149 test for the SGX target PR https://github.com/rust-lang/rust/pull/112390 moved tests to std. Unfortunately, this caused the `issue_15149` test to be enabled for the SGX target. This is incorrect as the SGX target does not support the `env::current_exe()` call.
2023-07-29Rollup merge of #114171 - fortanix:raoul/fix_switch-stdout_test, ↵Matthias Krüger-1/+1
r=workingjubilee Fix switch-stdout test for none unix/windows platforms PR #112390 moved tests to std. Unfortunately, there is a typo which causes issues on platforms other than unix and windows.
2023-07-29Rollup merge of #114124 - Enselic:proc-fixme, r=cjgillotMatthias Krüger-8/+8
tests/ui/proc-macro/*: Migrate FIXMEs to check-pass proc-macros are processed early in the compiler pipeline. There is no need to involve codegen. So change to check-pass. I have also looked through each changed test and to me it is sufficiently clear that codegen is not needed for the purpose of the test. I skipped changing `tests/ui/proc-macro/no-missing-docs.rs` in this commit because it was not clear to me that it can be changed to check-pass. Part of #62277
2023-07-29Rollup merge of #114107 - jyn514:vacation, r=ehussMatthias Krüger-0/+1
Prevent people from assigning me as a PR reviewer depends on https://github.com/rust-lang/triagebot/pull/1712
2023-07-29Rollup merge of #113773 - compiler-errors:err-layout-bail, r=cjgillotMatthias Krüger-14/+56
Don't attempt to compute layout of type referencing error Leads to more ICEs and strange diagnostics than are worth it. Fixes #113760
2023-07-29Auto merge of #111916 - fee1-dead-contrib:noop-method-call-warn, ↵bors-104/+161
r=compiler-errors make `noop_method_call` warn by default r? `@compiler-errors`
2023-07-28Auto merge of #114181 - matthiaskrgr:rollup-14m8s7f, r=matthiaskrgrbors-23/+413
Rollup of 7 pull requests Successful merges: - #114099 (privacy: no nominal visibility for assoc fns ) - #114128 (When flushing delayed span bugs, write to the ICE dump file even if it doesn't exist) - #114138 (Adjust spans correctly for fn -> method suggestion) - #114146 (Skip reporting item name when checking RPITIT GAT's associated type bounds hold) - #114147 (Insert RPITITs that were shadowed by missing ADTs that resolve to [type error]) - #114155 (Replace a lazy `RefCell<Option<T>>` with `OnceCell<T>`) - #114164 (Add regression test for `--cap-lints allow` and trait bounds warning) r? `@ghost` `@rustbot` modify labels: rollup
2023-07-28Auto merge of #113522 - fmease:generic-consts, r=cjgillotbors-360/+1645
Implement generic const items This implements generic parameters and where-clauses on free and associated const items under the experimental feature gate `generic_const_items`. See rust-lang/lang-team#214. Tracking issue: #113521. Fixes #104400. This PR doesn't include rustfmt support as per [nightly style procedure](https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md) and it doesn't add rustdoc JSON support (see [related Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Experimental.20rustc.20features)). CC `@scottmcm` `@compiler-errors` `@WalterSmuts` r? `@oli-obk` <details><summary>Resolved Questions</summary> * Q: Should `const ADD<const N: usize, const M: usize>: usize = N + M; ADD::<0, 1>` trigger the error *generic parameters may not be used in const operations* (which can be unlocked with `#![feature(generic_const_exprs)]`). Currently it doesn't. Or does this fall under [this paragraph](https://github.com/rust-lang/rust/blob/71f71a5397c42fec01f5c1045c638d961fa9f7ca/compiler/rustc_resolve/src/late.rs#L191)? * A: No, https://github.com/rust-lang/rust/pull/113522#issuecomment-1628634092 * Q: Should `const UNUSED: () = () where String: Copy;` (with `#![feature(trivial_bounds)]` and with `UNUSED` unused) succeed compilation? Currently it doesn't: *evaluation of constant value failed // entering unreachable code* * A: Yes, but postponed until stabilization (latest), https://github.com/rust-lang/rust/pull/113522#issuecomment-1628634092 </details>
2023-07-28Add rustdoc tests for generic const itemsLeón Orell Valerian Liehr-0/+86
2023-07-28Update existing UI testsLeón Orell Valerian Liehr-38/+69
2023-07-28Add UI tests for generic const itemsLeón Orell Valerian Liehr-1/+826
2023-07-28Render generic const items in rustdocLeón Orell Valerian Liehr-69/+116
2023-07-28Make Clippy understand generic const itemsLeón Orell Valerian Liehr-7/+15
2023-07-28Type-check generic const itemsLeón Orell Valerian Liehr-103/+122
2023-07-28Resolve generic const itemsLeón Orell Valerian Liehr-69/+109
2023-07-28Lower generic const items to HIRLeón Orell Valerian Liehr-41/+84
2023-07-28Parse generic const itemsLeón Orell Valerian Liehr-34/+220
2023-07-28Rollup merge of #114164 - Enselic:lint-cap-trait-bounds, r=compiler-errorsMatthias Krüger-0/+8
Add regression test for `--cap-lints allow` and trait bounds warning Closes #43134 I have verified that the test fails if stderr begins to contain output by making sure the test fails when I add eprintln!("some output on stderr"); to the compiler (I added it to `fn build_session()`).
2023-07-28Rollup merge of #114155 - Zalathar:once-cell, r=lcnrMatthias Krüger-4/+3
Replace a lazy `RefCell<Option<T>>` with `OnceCell<T>` This code was using `RefCell<Option<T>>` to manually implement lazy initialization. Now that we have `OnceCell` in the standard library, we can just use that instead. In particular, this avoids a confusing doubly-nested option, because the value being lazily computed is itself an `Option<Symbol>`.
2023-07-28Rollup merge of #114147 - compiler-errors:missing-rpitits, r=spastorinoMatthias Krüger-4/+49
Insert RPITITs that were shadowed by missing ADTs that resolve to [type error] Comment inline explains how this can happen. Fixes #113903
2023-07-28Rollup merge of #114146 - compiler-errors:dont-report-rpitit-name, r=spastorinoMatthias Krüger-8/+121
Skip reporting item name when checking RPITIT GAT's associated type bounds hold Doesn't really make sense to label an item that has a name that users can't really mention. Fixes #114145. Also fixes #113794. r? `@spastorino`
2023-07-28Rollup merge of #114138 - compiler-errors:bad-rcvr-span-on-method-sugg, ↵Matthias Krüger-2/+27
r=estebank Adjust spans correctly for fn -> method suggestion Fixes #114131
2023-07-28Rollup merge of #114128 - estebank:delayed-span-bug-dump, r=davidtwcoMatthias Krüger-3/+3
When flushing delayed span bugs, write to the ICE dump file even if it doesn't exist Fix #113881.
2023-07-28Rollup merge of #114099 - ↵Matthias Krüger-2/+202
davidtwco:issue-113860-staged-api-effective-vis-gt-nominal-vis-when-trait-method-vis, r=petrochenkov privacy: no nominal visibility for assoc fns Fixes #113860. When `staged_api` is enabled, effective visibilities are computed earlier and this can trigger an ICE in some cases. In particular, if a impl of a trait method has a visibility then an error will be reported for that, but when privacy invariants are being checked, the effective visibility will still be greater than the nominal visbility and that will trigger a `span_bug!`. However, this invariant - that effective visibilites are limited to nominal visibility - doesn't make sense for associated functions.
2023-07-28Auto merge of #113931 - cuviper:ci-ubuntu-22.04, r=Mark-Simulacrumbors-264/+493
ci: update ubuntu:20.04 builders to 22.04 This is mostly just maintenance to avoid bitrotting, but 22.04 also updates to cmake 3.22, so they don't need the manual builds from #113714 anymore.
2023-07-29library: allow `ambiguous_glob_reexports` for `core_arch`bohan-1/+2
2023-07-29fix(resolve): update the ambiguity glob binding as warning recursivelybohan-57/+1533
2023-07-28Auto merge of #111780 - weiznich:diagnostic_namespace, r=petrochenkovbors-4/+202
Diagnostic namespace This PR implements the basic infrastructure for accepting the `#[diagnostic]` attribute tool namespace as specified in https://github.com/rust-lang/rfcs/pull/3368. Note: This RFC is not merged yet, but it seems like it will be accepted soon. I open this PR early on to get feedback on the actual implementation as soon as possible. This hopefully enables getting at least the diagnostic namespace to stable rust "soon", so that crates do not need to bump their MSRV if we stabilize actual attributes in this namespace. This PR only adds infrastructure accept attributes from this namespace, it does not add any specific attribute. Therefore the compiler will emit a lint warning for each attribute that's actually used. This namespace is added behind a feature flag, so it will be only available on a nightly compiler for now. cc `@estebank` as they've supported me in planing, specifying and implementing this feature.
2023-07-28Use i1 instead of boolCaleb Zulawski-2/+9
2023-07-28privacy: no nominal visibility for assoc fnsDavid Wood-2/+202
When `staged_api` is enabled, effective visibilities are computed earlier and this can trigger an ICE in some cases. In particular, if a impl of a trait method has a visibility then an error will be reported for that, but when privacy invariants are being checked, the effective visibility will still be greater than the nominal visbility and that will trigger a `span_bug!`. However, this invariant - that effective visibilites are limited to nominal visibility - doesn't make sense for associated functions. Signed-off-by: David Wood <david@davidtw.co>
2023-07-28Fix issue_15149 test for the SGX targetRaoul Strackx-0/+2
2023-07-28doc: replace wrong punctuation markTshepang Mbambo-1/+1
2023-07-28Auto merge of #114119 - nnethercote:opt-TokenKind-clone, r=petrochenkovbors-1/+16
Optimize `TokenKind::clone`. `TokenKind` would impl `Copy` if it weren't for `TokenKind::Interpolated`. This commit makes `clone` reflect that. r? `@ghost`