about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-03-31Rollup merge of #95517 - lcnr:rustc_borrowck-misc, r=jackh726Dylan DPC-10/+15
small rustc_borrowck cleanup r? `@jackh726` because of the second commit, seems like that comment was missed in #91243
2022-03-31Rollup merge of #95384 - ehuss:doc-target_has_atomic-stabilized, r=Dylan-DPCDylan DPC-3/+4
Update target_has_atomic documentation for stabilization `cfg(target_has_atomic)` was stabilized in #93824, but this small note in the docs was not updated at the time.
2022-03-31Rollup merge of #91416 - compiler-errors:infinite-ty-option-box, r=estebankDylan DPC-63/+256
Specialize infinite-type "insert some indirection" suggestion for Option Suggest `Option<Box<_>>` instead of `Box<Option<_>>` for infinitely-recursive members of a struct. Not sure if I can get the span of the generic subty of the Option so I can make this a `+++`-style suggestion. The current output is a tiny bit less fancy looking than the original suggestion. Should I limit the specialization to just `Option<Box<TheOuterStruct>>`? Because right now it applies to all `Option` members in the struct that are returned by `Representability::SelfRecursive`. Fixes #91402 r? `@estebank` (since you wrote the original suggestion and are definitely most familiar with it!)
2022-03-31address comments, add test for shadowed Box typeMichael Goulet-7/+32
2022-03-31Specialize suggestion for Option<T>Michael Goulet-63/+231
2022-03-31update commentlcnr-2/+4
2022-03-31Auto merge of #95511 - Dylan-DPC:rollup-4n880fd, r=Dylan-DPCbors-5/+18
Rollup of 5 pull requests Successful merges: - #95445 (Don't build the full compiler before running unit tests) - #95470 (Fix last rustdoc-gui spurious test) - #95478 (Add note to the move size diagnostic) - #95495 (Remove unneeded `to_string` call) - #95505 (Fix library/std compilation on openbsd.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-31Rollup merge of #95505 - sunfishcode:sunfishcode/fix-openbsd, r=dtolnayDylan DPC-1/+1
Fix library/std compilation on openbsd. Fix a minor typo from #95241 which prevented compilation on x86_64-unknown-openbsd.
2022-03-31Rollup merge of #95495 - GuillaumeGomez:rm-unneeded-to-string, r=notriddleDylan DPC-1/+1
Remove unneeded `to_string` call Fixes a confusion I made when reading `@camelid's` comment [here](https://github.com/rust-lang/rust/pull/95096#discussion_r838851170). r? `@notriddle`
2022-03-31Rollup merge of #95478 - InfRandomness:infrandomness/lint_largemove_note, ↵Dylan DPC-0/+15
r=compiler-errors Add note to the move size diagnostic context: https://github.com/rust-lang/rust/issues/83518
2022-03-31Rollup merge of #95470 - GuillaumeGomez:fix-gui-spurious-test, r=notriddleDylan DPC-2/+1
Fix last rustdoc-gui spurious test This should the last spurious failing GUI test from https://github.com/rust-lang/rust/issues/93784. r? ``@notriddle``
2022-03-31Rollup merge of #95445 - jyn514:rustc-unit-tests, r=Dylan-DPCDylan DPC-1/+0
Don't build the full compiler before running unit tests This has been present since `builder.ensure` was first added in https://github.com/rust-lang/rust/pull/43059. It's unclear to me why it was added then - I tested these changes locally with `x test compiler/rustc_data_structures --stage 0` and they worked fine. Fixes https://github.com/rust-lang/rust/issues/51748.
2022-03-31obligation cause: `RepeatVec` -> `RepeatValueCopy`lcnr-8/+11
2022-03-31Auto merge of #95456 - RalfJung:size, r=oli-obkbors-16/+7
allow large Size again This basically reverts most of https://github.com/rust-lang/rust/pull/80042, and instead does the panic in `bits()` with a `#[cold]` function to make sure it does not get inlined. https://github.com/rust-lang/rust/pull/80042 added a comment about an invariant ("The top 3 bits are ALWAYS zero") that is not actually enforced, and if it were enforced that would be a problem for https://github.com/rust-lang/rust/pull/95388. So I think we should not have that invariant, and I adjusted the code accordingly. r? `@oli-obk` Cc `@sivadeilra`
2022-03-31Auto merge of #95507 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 13 commits in 109bfbd055325ef87a6e7f63d67da7e838f8300b..1ef1e0a12723ce9548d7da2b63119de9002bead8 2022-03-17 21:43:09 +0000 to 2022-03-31 00:17:18 +0000 - Support `-Zmultitarget` in cargo config (rust-lang/cargo#10473) - doc: Fix document url for libcurl format (rust-lang/cargo#10515) - Fix wrong info in "Environment variables" docs (rust-lang/cargo#10513) - Use the correct flag in --locked --offline error message (rust-lang/cargo#10512) - Don't treat host/target duplicates as duplicates (rust-lang/cargo#10466) - Unstable --keep-going flag (rust-lang/cargo#10383) - Part 1 of RFC2906 - Packages can inherit fields from their root workspace (rust-lang/cargo#10497) - Remove unused profile support for -Zpanic-abort-tests (rust-lang/cargo#10495) - HTTP registry implementation (rust-lang/cargo#10470) - Add a notice about review capacity. (rust-lang/cargo#10501) - Add tests for ignoring symlinks (rust-lang/cargo#10047) - Update doc string for deps_of/compute_deps. (rust-lang/cargo#10494) - Consistently use crate::display_error on errors during drain (rust-lang/cargo#10394)
2022-03-31Auto merge of #95506 - Dylan-DPC:rollup-b6kxzjc, r=Dylan-DPCbors-208/+233
Rollup of 5 pull requests Successful merges: - #95130 (Stabilize thread::is_finished) - #95263 (Restore `impl Future<Output = Type>` to async blocks) - #95471 (Don't ICE when opaque types get their hidden type constrained again.) - #95491 (Stabilize feature vec_retain_mut on Vec and VecDeque) - #95497 (Spellchecking compiler comments) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-30Update cargoEric Huss-0/+0
2022-03-31Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errorsDylan DPC-164/+164
Spellchecking compiler comments This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-31Rollup merge of #95491 - faern:stabilize-vec_retain_mut, r=yaahcDylan DPC-6/+2
Stabilize feature vec_retain_mut on Vec and VecDeque Closes #90829
2022-03-31Rollup merge of #95471 - oli-obk:tait_ice, r=estebankDylan DPC-13/+30
Don't ICE when opaque types get their hidden type constrained again. Contrary to popular belief, `codegen_fulfill_obligation` does not get used solely in codegen, so we cannot rely on `param_env` being set to RevealAll and thus revealing the hidden types instead of constraining them. Fixes #89312 (for real this time)
2022-03-31Rollup merge of #95263 - compiler-errors:async-block-pretty, r=jackh726Dylan DPC-23/+36
Restore `impl Future<Output = Type>` to async blocks I was sad when I undid some of the code I wrote in #91096 in the PR #95225, so I fixed it here to not print `[async output]`. This PR "manually" normalizes the associated type `<[generator] as Generator>::Return` type which appears very frequently in `impl Future` types that result from async block desugaring.
2022-03-31Rollup merge of #95130 - workingjubilee:stably-finished, r=m-ou-seDylan DPC-2/+1
Stabilize thread::is_finished Closes #90470. r? `@m-ou-se`
2022-03-30Restore `impl Future<Output = Type>` to async blocksMichael Goulet-23/+36
2022-03-30Fix library/std compilation on openbsd.Dan Gohman-1/+1
Fix a minor typo from #95241 which prevented compilation on x86_64-unknown-openbsd.
2022-03-31Auto merge of #95501 - Dylan-DPC:rollup-arx6sdc, r=Dylan-DPCbors-238/+632
Rollup of 6 pull requests Successful merges: - #93901 (Stabilize native library modifier syntax and the `whole-archive` modifier specifically) - #94806 (Fix `cargo run tidy`) - #94869 (Add the generic_associated_types_extended feature) - #95011 (async: Give predictable name to binding generated from .await expressions.) - #95251 (Reduce max hash in raw strings from u16 to u8) - #95298 (Fix double drop of allocator in IntoIter impl of Vec) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-31Rollup merge of #95298 - ↵Dylan DPC-7/+38
jhorstmann:fix-double-drop-of-allocator-in-vec-into-iter, r=oli-obk Fix double drop of allocator in IntoIter impl of Vec Fixes #95269 The `drop` impl of `IntoIter` reconstructs a `RawVec` from `buf`, `cap` and `alloc`, when that `RawVec` is dropped it also drops the allocator. To avoid dropping the allocator twice we wrap it in `ManuallyDrop` in the `InttoIter` struct. Note this is my first contribution to the standard library, so I might be missing some details or a better way to solve this.
2022-03-31Rollup merge of #95251 - GrishaVar:hashes-u16-to-u8, r=dtolnayDylan DPC-18/+16
Reduce max hash in raw strings from u16 to u8 [Relevant discussion](https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Max.20raw.20string.20delimiters)
2022-03-31Rollup merge of #95011 - michaelwoerister:awaitee_field, r=tmandryDylan DPC-14/+40
async: Give predictable name to binding generated from .await expressions. This name makes it to debuginfo and allows debuggers to identify such bindings and their captured versions in suspended async fns. This will be useful for async stack traces, as discussed in https://internals.rust-lang.org/t/async-debugging-logical-stack-traces-setting-goals-collecting-examples/15547. I don't know if this needs some discussion by ````@rust-lang/compiler,```` e.g. about the name of the binding (`__awaitee`) or about the fact that this PR introduces a (soft) guarantee about a compiler generated name. Although, regarding the later, I think the same reasoning applies here as it does for debuginfo in general. r? ````@tmandry````
2022-03-31Rollup merge of #94869 - jackh726:gats_extended, r=compiler-errorsDylan DPC-33/+261
Add the generic_associated_types_extended feature Right now, this only ignore obligations that reference new placeholders in `poly_project_and_unify_type`. In the future, this might do other things, like allowing object-safe GATs. **This feature is *incomplete* and quite likely unsound. This is mostly just for testing out potential future APIs using a "relaxed" set of rules until we figure out *proper* rules.** Also drive by cleanup of adding a `ProjectAndUnifyResult` enum instead of using a `Result<Result<Option>>`. r? `@nikomatsakis`
2022-03-31Rollup merge of #94806 - jyn514:cargo-run-tidy, r=Mark-SimulacrumDylan DPC-1/+7
Fix `cargo run tidy` When I implemented rust-only bootstrapping in https://github.com/rust-lang/rust/pull/92260, I neglected to test stage0 tools - it turns out they were broken because they couldn't find the sysroot of the initial bootstrap compiler. This fixes stage0 tools by using `rustc --print sysroot` instead of assuming rustc is already in a sysroot and hard-coding the relative directory. Fixes https://github.com/rust-lang/rust/issues/94797 (properly, without having to change rustup).
2022-03-31Rollup merge of #93901 - petrochenkov:linkmod, r=wesleywiserDylan DPC-165/+270
Stabilize native library modifier syntax and the `whole-archive` modifier specifically Stabilization report: https://github.com/rust-lang/rust/pull/93901#issuecomment-1041325522 cc https://github.com/rust-lang/rust/issues/81490
2022-03-30Auto merge of #95436 - cjgillot:static-mut, r=oli-obkbors-128/+98
Remember mutability in `DefKind::Static`. This allows to compute the `BodyOwnerKind` from `DefKind` only, and removes a direct dependency of some MIR queries onto HIR. As a side effect, it also simplifies metadata, since we don't need 4 flavours of `EntryKind::*Static` any more.
2022-03-30Add the generic_associated_types_extended featureJack Huey-33/+261
2022-03-30a few mode feedback fixes per @bjorn3Yuri Astrakhan-3/+3
2022-03-30Addressed comments by @compiler-errors and @bjorn3Yuri Astrakhan-10/+10
2022-03-30Stabilize native library modifier syntax and the `whole-archive` modifier ↵Vadim Petrochenkov-165/+270
specifically
2022-03-30Remove bad rustdoc trailing backslashYuri Astrakhan-1/+1
2022-03-30Spellchecking compiler commentsYuri Astrakhan-171/+171
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30Remove unneeded `to_string` callGuillaume Gomez-1/+1
2022-03-30Auto merge of #95425 - nnethercote:yet-more-parse_tt-improvements, ↵bors-233/+252
r=petrochenkov Yet more `parse_tt` improvements Including lots of comment improvements, and an overhaul of how `matches` work that gives big speedups. r? `@petrochenkov`
2022-03-30Stabilize feature vec_retain_mut on Vec and VecDequeLinus Färnstrand-6/+2
2022-03-30Add note to the lint diagnosticInfRandomness-0/+15
2022-03-30Update error message & remove outdated test commentGrisha Vartanyan-3/+1
2022-03-30Auto merge of #95458 - calebcartwright:sync-rustfmt-subtree, r=calebcartwrightbors-235/+2013
Sync rustfmt subtree r? `@calebcartwright`
2022-03-30Don't ICE when opaque types get their hidden type constrained again.Oli Scherer-13/+30
Contrary to popular belief, `codegen_fulfill_obligation` does not get used solely in codegen, so we cannot rely on `param_env` being set to RevealAll and thus revealing the hidden types instead of constraining them.
2022-03-30Fix last rustdoc-gui spurious testGuillaume Gomez-2/+1
2022-03-30Auto merge of #94963 - lcnr:inherent-impls-std, r=oli-obk,m-ou-sebors-851/+703
allow arbitrary inherent impls for builtin types in core Part of https://github.com/rust-lang/compiler-team/issues/487. Slightly adjusted after some talks with `@m-ou-se` about the requirements of `t-libs-api`. This adds a crate attribute `#![rustc_coherence_is_core]` which allows arbitrary impls for builtin types in core. For other library crates impls for builtin types should be avoided if possible. We do have to allow the existing stable impls however. To prevent us from accidentally adding more of these in the future, there is a second attribute `#[rustc_allow_incoherent_impl]` which has to be added to **all impl items**. This only supports impls for builtin types but can easily be extended to additional types in a future PR. This implementation does not check for overlaps in these impls. Perfectly checking that requires us to check the coherence of these incoherent impls in every crate, as two distinct dependencies may add overlapping methods. It should be easy enough to detect if it goes wrong and the attribute is only intended for use inside of std. The first two commits are mostly unrelated cleanups.
2022-03-30Don't stabilize ScopedJoinHandle::is_finished yet.Mara Bos-1/+0
2022-03-30Auto merge of #95241 - Gankra:cleaned-provenance, r=workingjubileebors-126/+621
Strict Provenance MVP This patch series examines the question: how bad would it be if we adopted an extremely strict pointer provenance model that completely banished all int<->ptr casts. The key insight to making this approach even *vaguely* pallatable is the ptr.with_addr(addr) -> ptr function, which takes a pointer and an address and creates a new pointer with that address and the provenance of the input pointer. In this way the "chain of custody" is completely and dynamically restored, making the model suitable even for dynamic checkers like CHERI and Miri. This is not a formal model, but lots of the docs discussing the model have been updated to try to the *concept* of this design in the hopes that it can be iterated on. See #95228
2022-03-30clippy: nameres for primitive type implslcnr-38/+75