about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-03-27Rollup merge of #93469 - compiler-errors:issue-93450, r=estebankDylan DPC-44/+18
Skip pointing out ambiguous impls in alloc/std crates too in inference errors This generalizes the logic in `annotate_source_of_ambiguity` to skip printing ambiguity errors traits in `alloc` and `std` as well, not just `core`. While this does spot-fix the issue mentioned below, it would be nicer to generalize this logic, for example to detect when the trait predicate's `self_ty` has any numerical inference variables. Is it worthwhile to scrap this solution for one like that? Fixes #93450 r? `@estebank` feel free to reassign
2022-03-27Rollup merge of #91981 - estebank:tweakaroo, r=lcnrDylan DPC-60/+209
Recover suggestions and useful information lost in previous PR Follow up to #91898.
2022-03-27review comments and rebaseEsteban Kuber-12/+10
2022-03-27Change wording of missing return type suggestionEsteban Kuber-16/+28
2022-03-27Drive by: handle references in `same_type_modulo_infer`Esteban Kuber-0/+3
2022-03-27Point (again) to more expressions with their type, even if not fully resolvedEsteban Kuber-31/+125
2022-03-27Also resolve `const` param suggestionEsteban Kuber-1/+6
2022-03-27Eagerly replace `{integer}`/`{float}` with `i32`/`f64` for suggestionEsteban Kuber-12/+49
2022-03-26Auto merge of #92472 - petrochenkov:nowrapident, r=Aaron1011bors-520/+25
proc-macro: Stop wrapping `ident` matchers into groups `ident` is always a single token and can be treated in the same way as `tt`. r? `@Aaron1011`
2022-03-26Auto merge of #95274 - jendrikw:slice-must-use, r=Dylan-DPCbors-49/+126
add #[must_use] to functions of slice and its iterators. Continuation of #92853. Tracking issue: #89692.
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-0/+0
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-18/+18
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-0/+0
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-12/+12
2022-03-26Auto merge of #95326 - lupd:std-iter-doc, r=Dylan-DPCbors-4/+3
Remove mention of `HashMap<K, V>` not offering `iter_mut` HashMap<K, V> does offer iter_mut. Fixes #94755. r? rust-lang/libs `@rustbot` label +A-docs +T-libs
2022-03-26proc-macro: Stop wrapping `ident` matchers into groupsVadim Petrochenkov-520/+25
2022-03-26add #[must_use] to functions of slice and its iterators.Jendrik-4/+4
2022-03-26Auto merge of #95306 - est31:master, r=Dylan-DPCbors-7/+20
std::process docs: linkify references to output, spawn and status
2022-03-26Remove mention of HashMap<K, V> not offering iter_mutdlup-4/+3
2022-03-26Auto merge of #95296 - workingjubilee:pretty-session, r=Dylan-DPCbors-120/+85
Prettify rustc_session with recent conveniences No functional changes. I felt like making something beautiful.
2022-03-26Auto merge of #95299 - mkroening:rm-hermitkernel, r=joshtriplettbors-142/+0
Remove hermitkernel targets RustyHermit now maintains custom json targets, which are distributed with the kernel: https://github.com/hermitcore/libhermit-rs/pull/395 See https://github.com/hermitcore/rusty-hermit/issues/197#issuecomment-1076667961 CC: `@stlankes,` `@bstrie`
2022-03-26Auto merge of #95149 - cjgillot:once-diag, r=estebankbors-359/+227
Remove `Session::one_time_diagnostic` This is untracked mutable state, which modified the behaviour of queries. It was used for 2 things: some full-blown errors, but mostly for lint declaration notes ("the lint level is defined here" notes). It is replaced by the diagnostic deduplication infra which already exists in the diagnostic emitter. A new diagnostic level `OnceNote` is introduced specifically for lint notes, to deduplicate subdiagnostics. As a drive-by, diagnostic emission takes a `&mut` to allow dropping the `SubDiagnostic`s.
2022-03-25Auto merge of #95172 - GuillaumeGomez:reduce-wait-for, r=notriddlebors-37/+20
Reduce wait-for instructions for rustdoc GUI tests r? `@notriddle`
2022-03-25Replace wait-for instructions for rustdoc GUI tests with wait-for-cssGuillaume Gomez-36/+19
2022-03-25Update browser-ui-test version to 0.8.4Guillaume Gomez-1/+1
2022-03-25Auto merge of #95304 - michaelwoerister:retry-finalize-session-dir, r=oli-obkbors-2/+23
incr. comp.: Let compiler retry finalizing session directory a few times. In my local testing this fixed issue https://github.com/rust-lang/rust/issues/86929. I wasn't able to come up with a regression test for it though.
2022-03-25Auto merge of #95282 - RalfJung:miri, r=RalfJungbors-8/+8
update Miri Fixes https://github.com/rust-lang/rust/issues/95258 r? `@ghost`
2022-03-25Auto merge of #95280 - InfRandomness:infrandomness/Dtorck_clarification, ↵bors-19/+19
r=oli-obk Swap DtorckConstraint to DropckConstraint This change was made as per suspicion that this struct was never renamed after consistent use of DropCk. This also clarifies the meaning behind the name of this structure. Fixes https://github.com/rust-lang/rust/issues/94310
2022-03-25std::process docs: linkify references to output, spawn and statusest31-7/+20
2022-03-25incr. comp.: Let compiler retry finalizing session directory a few times.Michael Woerister-2/+23
See https://github.com/rust-lang/rust/issues/86929.
2022-03-25Bless rustdoc tests.Camille GILLOT-30/+0
2022-03-25Auto merge of #95255 - petrochenkov:suggresolve, r=michaelwoeristerbors-824/+457
resolve: Do not build expensive suggestions if they are not actually used And remove a bunch of (conditionally) unused parameters from path resolution functions. This helps with performance issues in https://github.com/rust-lang/rust/pull/94857, and should be helpful in general even without that.
2022-03-25Remove hermitkernel targetsMartin Kröning-142/+0
RustyHermit now maintains custom json targets, which are distributed with the kernel. [1] [1]: https://github.com/hermitcore/libhermit-rs/pull/395
2022-03-25Auto merge of #95082 - spastorino:overlap-inherent-impls, r=nikomatsakisbors-65/+177
Overlap inherent impls r? `@nikomatsakis` Closes #94526
2022-03-25Auto merge of #95259 - nnethercote:more-macro-expansion-optimizations, ↵bors-86/+101
r=petrochenkov More macro expansion optimizations A few nice wins for macro-heavy crates. r? `@petrochenkov`
2022-03-24Use a let-chain in _session::output (nfc)Jubilee Young-15/+10
2022-03-24Vigorously refactor _session::code_stats (nfc)Jubilee Young-19/+11
2022-03-24Prettify rustc_session fmt with capturing args (nfc)Jubilee Young-86/+64
2022-03-25Auto merge of #92361 - vacuus:doctest-run-test-out-lines, r=CraftSpiderbors-5/+5
Remove `collect` in `doctest::run_test`
2022-03-25Shrink `MatcherPosRepetition`.Nicholas Nethercote-15/+13
Currently it copies a `KleeneOp` and a `Token` out of a `SequenceRepetition`. It's better to store a reference to the `SequenceRepetition`, which is now possible due to #95159 having changed the lifetimes.
2022-03-25Shrink `NamedMatchVec` to one inline element.Nicholas Nethercote-2/+5
This counters the `NamedMatchVec` size increase from the previous commit, leaving `NamedMatchVec` smaller than before.
2022-03-25Split `NamedMatch::MatchNonterminal` in two.Nicholas Nethercote-71/+81
The `Lrc` is only relevant within `transcribe()`. There, the `Lrc` is helpful for the non-`NtTT` cases, because the entire nonterminal is cloned. But for the `NtTT` cases the inner token tree is cloned (a full clone) and so the `Lrc` is of no help. This commit splits the `NtTT` and non-`NtTT` cases, avoiding the useless `Lrc` in the former case, for the following effect on macro-heavy crates. - It reduces the total number of allocations a lot. - It increases the size of some of the remaining allocations. - It doesn't affect *peak* memory usage, because the larger allocations are short-lived. This overall gives a speed win.
2022-03-25Auto merge of #95291 - Dylan-DPC:rollup-vrb4wlw, r=Dylan-DPCbors-352/+497
Rollup of 5 pull requests Successful merges: - #94391 (Fix ice when error reporting recursion errors) - #94655 (Clarify which kinds of MIR are allowed during which phases.) - #95179 (Try to evaluate in try unify and postpone resolution of constants that contain inference variables) - #95270 (debuginfo: Fix debuginfo for Box<T> where T is unsized.) - #95276 (add diagnostic items for clippy's `trim_split_whitespace`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-25Rollup merge of #95276 - FoseFx:clippy_trim_split_whitespace, r=flip1995Dylan DPC-0/+8
add diagnostic items for clippy's `trim_split_whitespace` Adding the following diagnostic items: * str_split_whitespace, * str_trim, * str_trim_start, * str_trim_end They are needed for https://github.com/rust-lang/rust-clippy/pull/8575 r? `@flip1995`
2022-03-25Rollup merge of #95270 - michaelwoerister:fix-box-unsized-debuginfo, ↵Dylan DPC-5/+33
r=wesleywiser debuginfo: Fix debuginfo for Box<T> where T is unsized. Before this fix, the debuginfo for the fields was generated from the struct defintion of Box<T>, but (at least at the moment) the compiler pretends that Box<T> is just a (fat) pointer, so the fields need to be `pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`. This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem. r? ````@wesleywiser````
2022-03-25Rollup merge of #95179 - b-naber:eval-in-try-unify, r=lcnrDylan DPC-281/+277
Try to evaluate in try unify and postpone resolution of constants that contain inference variables We want code like that in [`ui/const-generics/generic_const_exprs/eval-try-unify.rs`](https://github.com/rust-lang/rust/compare/master...b-naber:eval-in-try-unify?expand=1#diff-8027038201cf07a6c96abf3cbf0b0f4fdd8a64ce6292435f01c8ed995b87fe9b) to compile. To do that we need to try to evaluate constants in `try_unify_abstract_consts`, this requires us to be more careful about what constants we try to resolve, specifically we cannot try to resolve constants that still contain inference variables. r? `@lcnr`
2022-03-25Rollup merge of #94655 - JakobDegen:mir-phase-docs, r=oli-obkDylan DPC-52/+113
Clarify which kinds of MIR are allowed during which phases. This enhances documentation with these details and extends the validator to check these requirements more thoroughly. Most of these conditions were already being checked. There was also some disagreement between the `MirPhase` docs and validator as to what it meant for the `body.phase` field to have a certain value. This PR resolves those disagreements in favor of the `MirPhase` docs (which is what the pass manager implemented), adjusting the validator accordingly. The result is now that the `DropLowering` phase begins with the end of the elaborate drops pass, and lasts until the beginning of the generator lowring pass. This doesn't feel entirely natural to me, but as long as it's documented accurately it should be ok. r? rust-lang/mir-opt
2022-03-25Rollup merge of #94391 - light4:issue-90319, r=estebankDylan DPC-14/+66
Fix ice when error reporting recursion errors Fixes: #90319, #92148, #93955
2022-03-25resolve: Rename `CrateLint` to `Finalize`Vadim Petrochenkov-170/+147
And `crate_lint`/`record_used` to `finalize`
2022-03-25resolve: Stop passing unused spans and node ids to path resolution functionsVadim Petrochenkov-268/+189