about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-09-16thir::pattern: update some comments and error type namesRalf Jung-17/+24
2023-09-16Auto merge of #114494 - est31:extend_useless_ptr_null_checks, r=jackh726bors-46/+94
Make useless_ptr_null_checks smarter about some std functions This teaches the `useless_ptr_null_checks` lint that some std functions can't ever return null pointers, because they need to point to valid data, get references as input, etc. This is achieved by introducing an `#[rustc_never_returns_null_ptr]` attribute and adding it to these std functions (gated behind bootstrap `cfg_attr`). Later on, the attribute could maybe be used to tell LLVM that the returned pointer is never null. I don't expect much impact of that though, as the functions are pretty shallow and usually the input data is already never null. Follow-up of PR #113657 Fixes #114442
2023-09-16Auto merge of #115520 - Finomnis:const_transmute_copy, r=dtolnaybors-2/+1
Stabilize const_transmute_copy Closes #83165
2023-09-16Auto merge of #115829 - notriddle:notriddle/rustdoc-theme-css-merge, ↵bors-448/+808
r=GuillaumeGomez rustdoc: merge theme css into rustdoc.css Based on https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119 Having them in separate files used to make more sense, before the migration to CSS variables made the theme files as small as they are nowadays. This is already how docs.rs and mdBook do it. WebPageTest comparison page: https://www.webpagetest.org/video/compare.php?tests=230913_AiDc3F_B9E,230913_AiDc7G_B9B Filmstrip comparison: ![image](https://github.com/rust-lang/rust/assets/1593513/7ccad27b-7497-47ee-94c0-1a701b69c0c2) Old waterfall: ![image](https://github.com/rust-lang/rust/assets/1593513/7a6e4375-226d-4205-8871-a4d775a70748) New waterfall: ![image](https://github.com/rust-lang/rust/assets/1593513/e29112e3-84f7-417d-a250-cd6c10fa50f5)
2023-09-15Auto merge of #115878 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 11 commits in 2fc85d15a542bfb610aff7682073412cf635352f..d5336f813df39d476e61fc46daabb1446350660a 2023-09-09 01:49:46 +0000 to 2023-09-14 19:55:49 +0000 - fix: emit a warning for `credential-alias` shadowing (rust-lang/cargo#12671) - refactor: fix lint errors in preparation of `[lints]` table integration (rust-lang/cargo#12669) - Limit cargo add feature print (rust-lang/cargo#12662) - Clippy (rust-lang/cargo#12667) - Prerelease candidates error message (rust-lang/cargo#12659) - Fix typos: `informations` -> `information` (rust-lang/cargo#12666) - chore: update globset to 0.4.13 (rust-lang/cargo#12665) - refactor: Consolidate clap/shell styles (rust-lang/cargo#12655) - libgit2 fixed upstream (rust-lang/cargo#12657) - Index summary enum (rust-lang/cargo#12643) - feat(help): Add styling to help output (rust-lang/cargo#12578) r? ghost
2023-09-16Update cargoWeihang Lo-0/+0
2023-09-15rustdoc: avoid calling `document.write` after the page loadsMichael Howell-2/+12
2023-09-15rustdoc: merge theme css into rustdoc.cssMichael Howell-448/+798
Based on https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119 Having them in separate files used to make more sense, before the migration to CSS variables made the theme files as small as they are nowadays. This is already how docs.rs and mdBook do it.
2023-09-15Auto merge of #115871 - krasimirgg:llvm-18-en, r=durin42bors-5/+19
llvm-wrapper: adapt for LLVM API changes No functional changes intended. Adapts the wrapper for https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200. Found by our experimental rust + llvm @ head CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22301#018a9926-a810-4e56-8ac2-e6f30b78f433/253-551
2023-09-15llvm-wrapper: adapt for LLVM API changesKrasimir Georgiev-5/+19
No functional changes intended. Adapts the wrapper for https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200. Found by our experimental rust + llvm @ head CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22301#018a9926-a810-4e56-8ac2-e6f30b78f433/253-551
2023-09-15Auto merge of #115853 - obeis:hir-analysis-migrate-diagnostics-6, ↵bors-77/+116
r=compiler-errors Migrate `rustc_hir_analysis` to session diagnostic [Part 6] Part 6: Finish `coherence/inherent_impls.rs` file
2023-09-15Auto merge of #115851 - Alexendoo:clippy-doc-hidden-headers, r=flip1995bors-1/+20
Ignore `#[doc(hidden)]` functions in clippy doc lints Fixes https://github.com/rust-lang/rust-clippy/issues/11501 The implementation before #115689 had a check for unsugared doc comments that also happened to catch `#[doc(hidden)]`, this adds the check back in more explicitly https://github.com/rust-lang/rust/blob/852bf4e51bf260550cd1a280d2146f1c0641b1e8/src/tools/clippy/clippy_lints/src/doc.rs#L526-L529 r? `@flip1995`
2023-09-15Auto merge of #115850 - compiler-errors:effect-canon, r=fee1-deadbors-2/+47
Canonicalize effect vars in new solver No good reason not to fix this, we already have all the machinery to make this work. r? `@fee1-dead` Fixes #115792
2023-09-15Canonicalize effect vars in new solverMichael Goulet-2/+47
2023-09-15Auto merge of #115861 - clubby789:migrate-remove-semi-diag, r=compiler-errorsbors-19/+36
Make 'remove semi to coerce match' diagnostic translatable
2023-09-15Make 'remove semi to coerce match' diagnostic translatableclubby789-19/+36
2023-09-15Auto merge of #115859 - compiler-errors:effect-fallback, r=fee1-deadbors-2/+9
Fallback effects even if types also fallback `||` is short circuiting, so if we do ty/int var fallback, we *don't* do effect fallback 😸 r? `@fee1-dead` or `@oli-obk` Fixes #115791 Fixes #115842
2023-09-14Auto merge of #115857 - notriddle:notriddle/gui-test-themes, r=GuillaumeGomezbors-1/+149
rusdoc: add gui test for custom CSS themes Based on https://github.com/rust-lang/rust/pull/115829#issuecomment-1720056602
2023-09-14Fallback effects even if types also fall backMichael Goulet-2/+9
2023-09-14rusdoc: add gui test for custom CSS themesMichael Howell-1/+149
Based on https://github.com/rust-lang/rust/pull/115829#issuecomment-1720056602
2023-09-14Auto merge of #115677 - matthewjasper:let-expr-recovery, r=b-naberbors-2017/+2205
Improve invalid let expression handling - Move all of the checks for valid let expression positions to parsing. - Add a field to ExprKind::Let in AST/HIR to mark whether it's in a valid location. - Suppress some later errors and MIR construction for invalid let expressions. - Fix a (drop) scope issue that was also responsible for #104172. Fixes #104172 Fixes #104868
2023-09-14Migrate `rustc_hir_analysis` to session diagnosticObei Sideg-77/+116
Part 6: Finish `coherence/inherent_impls.rs`
2023-09-14Ignore `#[doc(hidden)]` functions in clippy doc lintsAlex Macleod-1/+20
2023-09-14Auto merge of #115848 - matthiaskrgr:rollup-lsul9dz, r=matthiaskrgrbors-41/+133
Rollup of 4 pull requests Successful merges: - #115772 (Improve Span in smir) - #115832 (Fix the error message for `#![feature(no_coverage)]`) - #115834 (Properly consider binder vars in `HasTypeFlagsVisitor`) - #115844 (Paper over an accidental regression) r? `@ghost` `@rustbot` modify labels: rollup
2023-09-14Rollup merge of #115844 - oli-obk:opaque_lifetime_ambiguity, r=jackh726Matthias Krüger-15/+24
Paper over an accidental regression r? types cc https://github.com/rust-lang/rust/issues/115781 (do not close issue until beta backport has been performed) The PR reasons are explained with comments in the source. In order to keep the diff simple, this PR effectively reverts https://github.com/rust-lang/rust/pull/113661, but only for RPITs. I will submit a follow up PR that fixes this correctly instead of just disabling the newly added check for RPITs. This PR should be significantly easier to review for beta backport
2023-09-14Rollup merge of #115834 - compiler-errors:binder-vars, r=jackh726Matthias Krüger-15/+72
Properly consider binder vars in `HasTypeFlagsVisitor` Given a PolyTraitRef like `for<'a> Ty: Trait` (where neither `Ty` nor `Trait` mention `'a`), we do *not* return true for `.has_type_flags(TypeFlags::HAS_LATE_BOUND)`, even though binders are supposed to act as if they have late-bound vars even if they don't mention them in their bound value: 31ae3b2bdb9376b749fc1d64b531e86806e03c73. This is because we use `HasTypeFlagsVisitor`, which only computes the type flags for `Ty`, `Const` and `Region` and `Predicates`, and we consequently skip any binders (and setting flags for their vars) that are not contained in one of these types. This ends up causing a problem, because when we call `TyCtxt::erase_regions` (which both erases regions *and* anonymizes bound vars), we will skip such a PolyTraitRef, not anonymizing it, and therefore not making it structurally equal to other binders. This breaks vtable computations. This PR computes the flags for all binders we enter in `HasTypeFlagsVisitor` if we're looking for `TypeFlags::HAS_LATE_BOUND` (or `TypeFlags::HAS_{RE,TY,CT}_LATE_BOUND`). Fixes #115807
2023-09-14Rollup merge of #115832 - Zalathar:fix-no-coverage, r=oli-obkMatthias Krüger-3/+3
Fix the error message for `#![feature(no_coverage)]` When #114656 was written, the feature flag to replace `no_coverage` was originally spelled `coverage`, but it was eventually changed to `coverage_attribute` instead. That update happened to miss this error message in `removed.rs`, and unfortunately I only noticed just *after* the original PR was approved and merged. cc ``@bossmc`` (original author) ``@oli-obk`` (original reviewer) ``@rustbot`` label +A-code-coverage
2023-09-14Rollup merge of #115772 - ouz-a:smir_span2, r=oli-obkMatthias Krüger-8/+34
Improve Span in smir Addressing https://github.com/rust-lang/project-stable-mir/issues/31 r? ``@oli-obk``
2023-09-14Auto merge of #115804 - RalfJung:valtree-to-const-val, r=oli-obkbors-106/+78
consistently pass ty::Const through valtrees Some drive-by things extracted from https://github.com/rust-lang/rust/pull/115748.
2023-09-14Paper over an accidental regressionOli Scherer-15/+24
2023-09-14Auto merge of #115817 - fee1-dead-contrib:fix-codegen, r=oli-obkbors-41/+71
treat host effect params as erased in codegen This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`. r? `@oli-obk`
2023-09-14Auto merge of #112038 - Nemo157:edition-2024-unsafe_op_in_unsafe_fn, r=RalfJungbors-18/+40
Change `unsafe_op_in_unsafe_fn` to be `warn`-by-default from edition 2024 This was previously FCPed: https://github.com/rust-lang/rust/issues/71668#issuecomment-1189396886 There were two blocking requirements: * Fix the `unused_unsafe` lint, done in https://github.com/rust-lang/rust/pull/100081 * Have `cargo fix` able to fix the lint, done in https://github.com/rust-lang/rust/pull/112017
2023-09-14Auto merge of #115764 - RalfJung:const-by-ref-alloc-id, r=oli-obkbors-220/+422
some ConstValue refactoring In particular, use AllocId instead of Allocation in ConstValue::ByRef. This helps avoid redundant AllocIds when a `ByRef` constant gets put back into the interpreter. r? `@oli-obk` Fixes https://github.com/rust-lang/rust/issues/105536
2023-09-14add regression test for something we fixedRalf Jung-0/+31
2023-09-14fix clippy (and MIR printing) handling of ConstValue::Indirect slicesRalf Jung-44/+71
2023-09-14bless allRalf Jung-0/+152
2023-09-14don't force all slice-typed ConstValue to be ConstValue::SliceRalf Jung-54/+36
2023-09-14Auto merge of #115828 - clubby789:clubby-off-vacation, r=lqdbors-1/+1
Remove `clubby789` from `users_on_vacation`
2023-09-14treat host effect params as erased generics in codegenDeadbeef-41/+71
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
2023-09-14Auto merge of #115825 - cjgillot:expr-field-lint, r=compiler-errorsbors-0/+24
Visit ExprField for lint levels. Fixes https://github.com/rust-lang/rust/issues/115823
2023-09-14found another place where we can eval() a const, and go through valtreesRalf Jung-39/+14
2023-09-14always evaluate ConstantKind::Ty through valtreesRalf Jung-16/+12
2023-09-14valtree_to_const_value: add fast-path for Scalar tuples/structsRalf Jung-1/+16
2023-09-14make it more clear which functions create fresh AllocIdRalf Jung-45/+45
2023-09-14cleanup op_to_const a bit; rename ConstValue::ByRef → IndirectRalf Jung-47/+40
2023-09-14use AllocId instead of Allocation in ConstValue::ByRefRalf Jung-63/+80
2023-09-14a bit of cleanup in valtree_to_const_valueRalf Jung-51/+37
2023-09-14Auto merge of #115751 - lcnr:inspect-cleanup, r=compiler-errorsbors-285/+349
some inspect improvements split from #114810 because I still want to experiment a bunch with that PR and these changes are self-contained. r? `@compiler-errors`
2023-09-14Properly consider binder vars in HasTypeFlagsVisitorMichael Goulet-15/+72
2023-09-14Fix the error message for `#![feature(no_coverage)]`Zalathar-3/+3