about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-05Auto merge of #117589 - compiler-errors:global-vars-bug, r=jackh726bors-32/+47
Make sure that predicates with unmentioned bound vars are still considered global in the old solver In the old solver, we consider predicates with late-bound vars to not be "global": https://github.com/rust-lang/rust/blob/9c8a2694fadf3900c4d7880f6357cee60e9aa39b/compiler/rustc_trait_selection/src/traits/select/mod.rs#L1840-L1844 The implementation of `has_late_bound_vars` was modified in #115834 so that we'd properly anonymize binders that had late-bound vars but didn't reference them. This fixed an ICE. However, this also led to a behavioral change in https://github.com/rust-lang/rust/issues/117056#issuecomment-1775014545 for a couple of crates, which now consider `for<'a> GL33: Shader` (note the binder var that is *not* used in the predicate) to not be "global". This forces associated types to not be normalizable due to the old trait solver being dumb. This PR distinguishes types which *reference* late-bound vars and binders which *have* late-bound vars. The latter is represented with the new type flag `TypeFlags::HAS_BINDER_VARS`, which is used when we only care about knowing whether binders have vars in their bound var list (even if they're not used, like for binder anonymization). This should fix (after beta backport) the `luminance-gl` and `luminance-webgl` crates in #117056. r? types **(priority is kinda high on a review here given beta becomes stable on November 16.)**
2023-11-05Auto merge of #117581 - nicholasbishop:bishop-update-cb, r=Mark-Simulacrumbors-3/+3
Bump compiler_builtins to 0.1.103
2023-11-05Auto merge of #117503 - kornelski:hint-try-reserved, r=workingjubileebors-5/+29
Hint optimizer about try-reserved capacity This is #116568, but limited only to the less-common `try_reserve` functions to reduce bloat in debug binaries from debug info, while still addressing the main use-case #116570
2023-11-04Auto merge of #117590 - matthiaskrgr:rollup-9cqh1q8, r=matthiaskrgrbors-71/+197
Rollup of 6 pull requests Successful merges: - #110340 (Deref docs: expand and remove "smart pointer" qualifier) - #116894 (Guarantee that `char` has the same size and alignment as `u32`) - #117534 (clarify that the str invariant is a safety, not validity, invariant) - #117562 (triagebot no-merges: exclude different case) - #117570 (fallback for `construct_generic_bound_failure`) - #117583 (Remove `'tcx` lifetime on `PlaceholderConst`) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-04Rollup merge of #117583 - compiler-errors:placeholderconst-lifetime, r=cjgillotMatthias Krüger-9/+9
Remove `'tcx` lifetime on `PlaceholderConst` The `'tcx` lifetime is not needed for anything, so this is a continuation of #117139.
2023-11-04Rollup merge of #117570 - bvanjoi:fix-117547, r=cjgillotMatthias Krüger-8/+37
fallback for `construct_generic_bound_failure` Fixes #117547 This case regressed at #115882. In this context, `generic_param_scope` is produced by `RPITVisitor` and not included by `hir_owner`. Therefore, I've added a fallback to address this.
2023-11-04Rollup merge of #117562 - pitaj:triagebot_no-merges, r=Mark-SimulacrumMatthias Krüger-1/+1
triagebot no-merges: exclude different case "Subtree update" as well To address [this on zulip](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/can't.20suppress.20merge.20commit.20warning) cc `@bjorn3` r? `@mark-simulacrum`
2023-11-04Rollup merge of #117534 - RalfJung:str, r=Mark-SimulacrumMatthias Krüger-11/+17
clarify that the str invariant is a safety, not validity, invariant Updates these docs to match https://github.com/rust-lang/reference/pull/792
2023-11-04Rollup merge of #116894 - joshlf:patch-12, r=RalfJungMatthias Krüger-1/+8
Guarantee that `char` has the same size and alignment as `u32`
2023-11-04Rollup merge of #110340 - jmaargh:jmaargh/deref-docs, r=Mark-SimulacrumMatthias Krüger-41/+125
Deref docs: expand and remove "smart pointer" qualifier **Ready for review** ~~This is an unpolished draft to be sanity-checked~~ Fixes #91004 ~~Comments on substance and content of this are welcome. This is deliberately unpolished until ready to review so please try to stay focused on the big-picture.~~ ~~Once this has been sanity checked, I will similarly update `DerefMut` and polish for review.~~
2023-11-04Make sure that predicates with unmentioned bound vars are still considered ↵Michael Goulet-32/+47
global in the old solver
2023-11-04Auto merge of #113343 - saethlin:looser-alignment, r=RalfJungbors-58/+142
Update the alignment checks to match rust-lang/reference#1387 Previously, we had a special case to not check `Rvalue::AddressOf` in this pass because we weren't quite sure if pointers needed to be aligned in the Place passed to it: https://github.com/rust-lang/rust/pull/112026 Since https://github.com/rust-lang/reference/pull/1387 merged, this PR updates this pass to match. The behavior of the check is nearly unchanged, except we also avoid inserting a check for creating references. Most of the changes in this PR are cleanup and new tests.
2023-11-04Draft fleshed-out deref docsjmaargh-41/+125
Re-draft Deref docs Make general advice more explicit and note the difference between generic and specific implementations. Re-draft DerefMut docs in-line with Deref Fix Deref docs typos Fix broken links Clarify advice for specific-over-generic impls Add comment addressing Issue #73682 x fmt Copy faillibility warning to DerefMut
2023-11-04No lifetime on PlaceholderConstMichael Goulet-9/+9
2023-11-04Auto merge of #117579 - RalfJung:miri, r=RalfJungbors-255/+574
Miri subtree update r? `@ghost`
2023-11-04Bump compiler_builtins to 0.1.103Nicholas Bishop-3/+3
2023-11-04Check alignment of pointers only when read/written throughBen Kimock-58/+142
2023-11-04Auto merge of #117094 - Nadrieril:warn-lint-on-arm, r=cjgillotbors-25/+233
Warn users who set `non_exhaustive_omitted_patterns` lint level on a match arm Before https://github.com/rust-lang/rust/pull/116734, the recommended usage of the [`non_exhaustive_omitted_patterns` lint](https://github.com/rust-lang/rust/issues/89554) was: ```rust match Bar::A { Bar::A => {}, #[warn(non_exhaustive_omitted_patterns)] _ => {}, } ``` After https://github.com/rust-lang/rust/pull/116734 this no longer makes sense, and recommended usage is now: ```rust #[warn(non_exhaustive_omitted_patterns)] match Bar::A { Bar::A => {}, _ => {}, } ``` As you can guess, this silently breaks all uses of the lint that used the previous form. This is a problem in particular because `syn` recommends usage of this lint to its users in the old way. This PR emits a warning when the previous form is used so users can update. r? `@cjgillot`
2023-11-04fallback for `construct_generic_bound_failure`bohan-8/+37
2023-11-04Auto merge of #3145 - RalfJung:data-race-error, r=RalfJungbors-166/+233
give some more help for the unusual data races Fixes https://github.com/rust-lang/miri/issues/3142
2023-11-04Suggest to set lint level on whole matchNadrieril-47/+79
2023-11-04Warn when lint level is set on a match armNadrieril-27/+107
2023-11-04Add testsNadrieril-0/+96
2023-11-04avoid acronyms when we don't really need themRalf Jung-12/+11
2023-11-04Auto merge of #3154 - rust-lang:rustup-2023-11-04, r=RalfJungbors-6532/+7325
Automatic Rustup
2023-11-04Auto merge of #117566 - weihanglo:update-cargo, r=weihanglobors-1/+0
Update cargo 8 commits in b4d18d4bd3db6d872892f6c87c51a02999b80802..65e297d1ec0dee1a74800efe600b8dc163bcf5db 2023-10-31 18:19:10 +0000 to 2023-11-03 20:56:31 +0000 - fix(cli): Clarify --test is for targets, not test functions (rust-lang/cargo#12915) - Updating "features" documentation to add a note about the new limit on number of features (rust-lang/cargo#12913) - fix: merge `trim-paths` from different profiles (rust-lang/cargo#12908) - Add regression test for issue 6915: features and transitive dev deps (rust-lang/cargo#12907) - chore(deps): update rust crate gix to 0.55.2 (rust-lang/cargo#12906) - chore(deps): update compatible (rust-lang/cargo#12905) - docs(ref): Fix open-semver-range issue link (rust-lang/cargo#12904) - docs(ref): Highlight commands to answer dep resolution questions (rust-lang/cargo#12903) r? ghost
2023-11-04fmtThe Miri Conjob Bot-7/+3
2023-11-04Merge from rustcThe Miri Conjob Bot-6526/+7323
2023-11-04Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-11-04Auto merge of #117564 - TaKO8Ki:rollup-lkqhpqc, r=TaKO8Kibors-644/+756
Rollup of 3 pull requests Successful merges: - #117343 (Cleanup `rustc_mir_build/../check_match.rs`) - #117550 (Use `filter_map` in `try_par_for_each_in`) - #117554 (consts: remove dead code around `i1` constant values) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-04Update cargoWeihang Lo-1/+0
Remove license exception of `byteyarn` as it is no longer used
2023-11-04Rollup merge of #117554 - durin42:llvm-delete-dead-zext-code, r=nikicTakayuki Maeda-10/+1
consts: remove dead code around `i1` constant values `LLVMConstZext` recently got deleted, and it turns out (thanks to `@nikic` for knowing!) that this is dead code. Tests all pass for me without this logic, and per nikic: > We always generate constants in "relocatable bag of bytes" > representation, so you're never going to get a plain bool. So this should be a safe thing to do. r? `@nikic` `@rustbot` label: +llvm-main
2023-11-04Rollup merge of #117550 - cuviper:try_par_for_each_in, r=est31Takayuki Maeda-7/+6
Use `filter_map` in `try_par_for_each_in` This simplifies the expression, especially for the rayon part, and also lets us drop the `E: Copy` constraint.
2023-11-04Rollup merge of #117343 - Nadrieril:cleanup_check_match, r=davidtwcoTakayuki Maeda-627/+749
Cleanup `rustc_mir_build/../check_match.rs` The file had become pretty unwieldy, with a fair amount of duplication. As a bonus, I discovered that we weren't running some pattern checks in if-let chains. I recommend looking commit-by-commit. The last commit is a whim, I think it makes more sense that way but I don't hold this opinion strongly.
2023-11-03triagebot no-merges: exclude different casePeter Jaszkowiak-1/+1
"Subtree update" as well
2023-11-04Auto merge of #115274 - bjorn3:tidy_improvements, r=davidtwcobors-82/+275
Run tidy license checker on more workspaces The license checker didn't run on several workspaces before this PR. The same applied to the "external package sources" check. There were also two missing lockfiles which I have added now.
2023-11-04Auto merge of #117540 - ↵bors-82/+76
matthiaskrgr:baby_dont_clone_me_dont_clone_me_no_more, r=est31 clone less
2023-11-03Auto merge of #116412 - nnethercote:rm-plugin-support, r=bjorn3bors-1712/+57
Remove support for compiler plugins. They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597. r? `@ghost`
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-1712/+57
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-11-04Update rust-lang/book.Nicholas Nethercote-0/+0
To 5b6c1ceaa62ecbd6caef08df39b33b3938e99deb, for this commit: - Prepare for removal of compiler plugin support. (rust-lang/book#3764)
2023-11-03Auto merge of #115333 - joshlf:patch-5, r=RalfJungbors-9/+15
Guarantee representation of None in NPO This allows users to soundly transmute zeroes into `Option` types subject to the null pointer optimization (NPO). It unblocks https://github.com/google/zerocopy/issues/293.
2023-11-03consts: remove dead code around `i1` constant valuesAugie Fackler-10/+1
`LLVMConstZext` recently got deleted, and it turns out (thanks to @nikic for knowing!) that this is dead code. Tests all pass for me without this logic, and per nikic: > We always generate constants in "relocatable bag of bytes" > representation, so you're never going to get a plain bool. So this should be a safe thing to do. r? @nikic @rustbot label: +llvm-main
2023-11-03Tweak spans for "adt defined here" noteNadrieril-174/+183
2023-11-03Accumulate let chains alongside the visitNadrieril-76/+78
2023-11-03Use `filter_map` in `try_par_for_each_in`Josh Stone-7/+6
This simplifies the expression, especially for the rayon part, and also lets us drop the `E: Copy` constraint.
2023-11-03Auto merge of #117507 - nnethercote:rustc_span, r=Nilstriebbors-274/+188
`rustc_span` cleanups Just some things I found while looking over this crate. r? `@oli-obk`
2023-11-03Auto merge of #117538 - matthiaskrgr:rollup-63u77xb, r=matthiaskrgrbors-3586/+4952
Rollup of 5 pull requests Successful merges: - #117434 (delegate `<Box<E> as Error>::provide` to `<E as Error>::provide`) - #117505 (Fix incorrect trait bound restriction suggestion) - #117520 (Clippy subtree update) - #117523 (oli-obk is on vacation) - #117533 (Revert "bootstrap: do not purge docs on CI environment") r? `@ghost` `@rustbot` modify labels: rollup
2023-11-03clone lessMatthias Krüger-82/+76
2023-11-03Rollup merge of #117533 - onur-ozkan:revert-117471, r=onur-ozkanMatthias Krüger-7/+1
Revert "bootstrap: do not purge docs on CI environment" This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7. ref https://github.com/rust-lang/rust/issues/117430#issuecomment-1791609163, https://github.com/rust-lang/rust/pull/117471#issuecomment-1791937529
2023-11-03Rollup merge of #117523 - compiler-errors:oli-vacation, r=compiler-errorsMatthias Krüger-1/+1
oli-obk is on vacation `@oli-obk` is away and asked me to put him in the vacation list 😸