about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-01-29Rollup merge of #107448 - Teapot4195:pr-107397-followup, r=Mark-SimulacrumMatthias Krüger-1/+2
When stamp doesn't exist, should say Error, and print path to stamp file Follow up pr for #107397
2023-01-29Rollup merge of #107432 - notriddle:notriddle/has-srclink, r=GuillaumeGomezMatthias Krüger-17/+5
rustdoc: remove unused class `has-srclink` Stopped being used in CSS with 73d0f7c7b68784f1db0a1f53855c20d118a7e8b0.
2023-01-29Rollup merge of #107169 - albertlarsan68:lock-in-pre-push, r=Mark-SimulacrumMatthias Krüger-1/+1
Pass `--locked` to the x test tidy call This allows to fail the push when the `Cargo.lock` file needs to be updated.
2023-01-29Rollup merge of #106763 - ↵Matthias Krüger-28/+54
lenko-d:106659-Print_why_a_test_was_ignored_if_its_the_only_test_specified, r=Mark-Simulacrum print why a test was ignored if its the only test specified Fixes [#106659](https://github.com/rust-lang/rust/issues/106659)
2023-01-29Rollup merge of #96763 - Abdur-rahmaanJ:patch-1, r=Mark-SimulacrumMatthias Krüger-67/+0
Fix maintainer validation message State clearly why maintainer verification is not activating, ruling out the user thinking they misconfigured something.
2023-01-29When stamp doesn't exist, should say Error, and print path to stamp fileteapot4195-1/+2
2023-01-29Auto merge of #100178 - mati865:upgrade-mingw-w64-on-CI, r=nikicbors-31/+4
Upgrade mingw-w64 on CI Continuation of https://github.com/rust-lang/rust/pull/99162 This will require copying related archives mentioned in https://github.com/rust-lang/rust/pull/100178#issuecomment-1352060140 to Rust's mirror. This should fix multiple issues with currently used ancient releases but I'll ask folks to retest them using nightly once it goes live.
2023-01-29Upgrade mingw-w64 on CIMateusz Mikuła-31/+4
2023-01-29Auto merge of #107435 - matthiaskrgr:rollup-if5h6yu, r=matthiaskrgrbors-0/+7
Rollup of 8 pull requests Successful merges: - #106618 (Disable `linux_ext` in wasm32 and fortanix rustdoc builds.) - #107097 (Fix def-use dominance check) - #107154 (library/std/sys_common: Define MIN_ALIGN for m68k-unknown-linux-gnu) - #107397 (Gracefully exit if --keep-stage flag is used on a clean source tree) - #107401 (remove the usize field from CandidateSource::AliasBound) - #107413 (make more pleasant to read) - #107422 (Also erase substs for new infcx in pin move error) - #107425 (Check for missing space between fat arrow and range pattern) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-29Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obkbors-0/+7
Use stable metric for const eval limit instead of current terminator-based logic This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only. The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made). Also see: #103877
2023-01-28rustdoc: remove unused class `has-srclink`Michael Howell-17/+5
Stopped being used in CSS with 73d0f7c7b68784f1db0a1f53855c20d118a7e8b0
2023-01-28Gracefully exit when --keep-stage used on clean source treeteapot4195-0/+7
2023-01-28Auto merge of #107206 - cjgillot:no-h2l-map, r=WaffleLapkinbors-196/+204
Remove HirId -> LocalDefId map from HIR. Having this map in HIR prevents the creating of new definitions after HIR has been built. Thankfully, we do not need it. Based on https://github.com/rust-lang/rust/pull/103902
2023-01-28Auto merge of #107408 - matthiaskrgr:rollup-b5vz2ow, r=matthiaskrgrbors-14/+15
Rollup of 9 pull requests Successful merges: - #104012 (Improve unexpected close and mismatch delimiter hint in TokenTreesReader) - #104252 (Stabilize the const_socketaddr feature) - #105524 (Replace libc::{type} with crate::ffi::{type}) - #107096 (Detect references to non-existant messages in Fluent resources) - #107355 (Add regression test for #60755) - #107384 (Remove `BOOL_TY_FOR_UNIT_TESTING`) - #107385 (Use `FallibleTypeFolder` for `ConstInferUnifier` not `TypeRelation`) - #107391 (rustdoc: remove inline javascript from copy-path button) - #107398 (Remove `ControlFlow::{BREAK, CONTINUE}`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-28Rollup merge of #107398 - scottmcm:its-their-funeral, r=dtolnayMatthias Krüger-12/+9
Remove `ControlFlow::{BREAK, CONTINUE}` Libs-API decided to remove these in #102697. Follow-up to #107023, which removed them from `compiler/`, but a couple new ones showed up since that was merged. r? libs
2023-01-28Rollup merge of #107391 - notriddle:notriddle/copy-path-button, r=GuillaumeGomezMatthias Krüger-2/+6
rustdoc: remove inline javascript from copy-path button
2023-01-28Auto merge of #106916 - lukas-code:overlapping-substs, r=estebankbors-0/+4
Remove overlapping parts of multipart suggestions This PR adds a debug assertion that the parts of a single substitution cannot overlap, fixes a overlapping substitution from the testsuite, and fixes https://github.com/rust-lang/rust/issues/106870. Note that a single suggestion can still have multiple overlapping substitutions / possible edits, we just don't suggest overlapping replacements in a single edit anymore. I've also included a fix for an unrelated bug where rustfix for `explicit_outlives_requirements` would produce multiple trailing commas for a where clause.
2023-01-28Remove `HirId -> LocalDefId` map from HIR.Camille GILLOT-50/+30
2023-01-28Take a LocalDefId in hir::Visitor::visit_fn.Camille GILLOT-147/+175
2023-01-27Remove from librustdoc and clippy tooScott McMurray-12/+9
2023-01-28Auto merge of #101692 - cjgillot:generator-lazy-witness, r=oli-obkbors-0/+3
Compute generator saved locals on MIR Generators are currently type-checked by introducing a `witness` type variable, which is unified with a `GeneratorWitness(captured types)` whose purpose is to ensure that the auto traits correctly migrate from the captured types to the `witness` type. This requires computing the captured types on HIR during type-checking, only to re-do it on MIR later. This PR proposes to drop the HIR-based computation, and only keep the MIR one. This is done in 3 steps. 1. During type-checking, the `witness` type variable is never unified. This allows to stall all the obligations that depend on it until the end of type-checking. Then, the stalled obligations are marked as successful, and saved into the typeck results for later verification. 2. At type-checking writeback, `witness` is replaced by `GeneratorWitnessMIR(def_id, substs)`. From this point on, all trait selection involving `GeneratorWitnessMIR` will fetch the MIR-computed locals, similar to what opaque types do. There is no lifetime to be preserved here: we consider all the lifetimes appearing in this witness type to be higher-ranked. 3. After borrowck, the stashed obligations are verified against the actually computed types, in the `check_generator_obligations` query. If any obligation was wrongly marked as fulfilled in step 1, it should be reported here. There are still many issues: - ~I am not too happy having to filter out some locals from the checked bounds, I think this is MIR building that introduces raw pointers polluting the analysis;~ solved by a check specific to static variables. - the diagnostics for captured types don't show where they are used/dropped; - I do not attempt to support chalk. cc `@eholk` `@jyn514` for the drop-tracking work r? `@oli-obk` as you warned me of potential unsoundness
2023-01-27rustdoc: remove inline javascript from copy-path buttonMichael Howell-2/+6
2023-01-27Auto merge of #107386 - flip1995:clippyup, r=Manishearthbors-254/+2212
Update Clippy r? `@Manishearth`
2023-01-27Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyupPhilipp Krones-1/+1
2023-01-27Merge commit '1480cea393d0cee195e59949eabdfbcf1230f7f9' into clippyupPhilipp Krones-254/+2212
2023-01-27Special-case handling of impl blocksGuillaume Gomez-48/+75
2023-01-27Introduce GeneratorWitnessMIR.Camille GILLOT-0/+3
2023-01-27Auto merge of #107372 - JohnTitor:rollup-zkl2ges, r=JohnTitorbors-40/+49
Rollup of 9 pull requests Successful merges: - #106806 (Replace format flags u32 by enums and bools.) - #107194 (Remove dependency on slice_internals feature in rustc_ast) - #107234 (Revisit fix_is_ci_llvm_available logic) - #107316 (Update snap from `1.0.1` to `1.1.0`) - #107321 (solver comments + remove `TyCtxt::evaluate_goal`) - #107332 (Fix wording from `rustbuild` to `bootstrap`) - #107347 (reduce rightward-drift) - #107352 (compiler: Fix E0587 explanation) - #107357 (Fix infinite loop in rustdoc get_all_import_attributes function) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-27rustdoc: merge doctest tooltip with notable traits tooltipMichael Howell-109/+81
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000 Fixes #91100
2023-01-28Rollup merge of #107357 - ↵Yuki Okushi-1/+3
GuillaumeGomez:fix-infinite-loop-in-rustdoc-get_all_import_attributes, r=notriddle Fix infinite loop in rustdoc get_all_import_attributes function Fixes https://github.com/rust-lang/rust/issues/107350. We'll also need to backport this fix to beta. r? `@notriddle`
2023-01-28Rollup merge of #107332 - chansuke:issue-107230, r=albertlarsan68Yuki Okushi-1/+1
Fix wording from `rustbuild` to `bootstrap` Fixes #107230
2023-01-28Rollup merge of #107234 - Rattenkrieg:bootstrap-fix-is_ci_llvm_available, ↵Yuki Okushi-34/+41
r=albertlarsan68 Revisit fix_is_ci_llvm_available logic Fixes #107225 Now `supported_platforms` has a knowledge whether llvm asserts artifacts are available for particular host triple. ``@jyn514`` ``@albertlarsan68`` PTAL
2023-01-28Rollup merge of #106806 - m-ou-se:format-args-flags, r=oli-obkYuki Okushi-4/+4
Replace format flags u32 by enums and bools. This gets rid of the `flags: u32` field where each bit has a special meaning, and replaces it by simple enums and booleans. Part of #99012
2023-01-27Auto merge of #107055 - kylematsuda:eb-fn-sig, r=lcnrbors-52/+53
Switch to `EarlyBinder` for `fn_sig` query Part of the work to finish #105779 (also see https://github.com/rust-lang/types-team/issues/78). Several queries `X` have a `bound_X` variant that wraps the output in [`EarlyBinder`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/subst/struct.EarlyBinder.html). This adds `EarlyBinder` to the return type of the `fn_sig` query and removes `bound_fn_sig`. r? `@lcnr`
2023-01-27add comment to rustdoc.css on updating filename suffixesTrevor Spiteri-0/+8
2023-01-27Fix handling of items inside a `doc(hidden)` blockGuillaume Gomez-34/+66
2023-01-27Improve codeGuillaume Gomez-93/+90
2023-01-27Speed up execution a bit by removing some walksGuillaume Gomez-1/+21
2023-01-27Improve code readabilityGuillaume Gomez-15/+23
2023-01-27Fix missing const expression items visitGuillaume Gomez-129/+170
2023-01-27rustdoc: update Source Serif 4 from 4.004 to 4.005Trevor Spiteri-4/+4
Version 4.005 was released on 2023-01-20.
2023-01-27Fix infinite loop in rustdoc get_all_import_attributes functionGuillaume Gomez-1/+3
2023-01-27Auto merge of #107054 - petrochenkov:effvisdoc3, r=GuillaumeGomezbors-14/+87
rustdoc: Collect "rustdoc-reachable" items during early doc link resolution This pass only needs to know about visibilities, attributes and reexports, so it can be run early, similarly to `compute_effective_visibilities` in rustc. Results of this pass can be used to prune the list of extern impls early thus improving performance of https://github.com/rust-lang/rust/pull/94857.
2023-01-27Update clippy for restructured format flags fields.Mara Bos-4/+4
2023-01-27Revisit fix_is_ci_llvm_available logic; read build triple from tomlSergey Prytkov-34/+41
2023-01-27Rollup merge of #107336 - notriddle:notriddle/import-item-module-item, ↵Yuki Okushi-4/+3
r=GuillaumeGomez rustdoc: remove mostly-unused CSS classes `import-item` and `module-item`
2023-01-27Rollup merge of #107325 - petrochenkov:hiddoc2, r=GuillaumeGomezYuki Okushi-151/+113
rustdoc: Stop using `HirId`s Use `LocalDefId`s instead. Rustdoc doesn't work with item bodies, so it almost never needs fine-grained HIR IDs.
2023-01-27Rollup merge of #107284 - notriddle:notriddle/plus, r=jshaYuki Okushi-1/+18
rustdoc: use smarter encoding for playground URL The old way would compress okay with DEFLATE, but this version makes uncompressed docs smaller, which matters for memory usage and stuff like `cargo doc`. Try it out: <https://play.rust-lang.org/?code=fn+main()+{%0Alet+mut+v+=+Vec::new();%0Av.push(1+/+1);%0Aprintln!(%22{}%22,+v[0]);%0A}> In local testing, this change shrinks sample pages by anywhere between 4.0% and 0.031% $ du -b after.dir/std/vec/struct.Vec.html before.dir/std/vec/struct.Vec.html 759235 after.dir/std/vec/struct.Vec.html 781842 before.dir/std/vec/struct.Vec.html 100*((759235-781842)/781842)=-2.8 $ du -b after.dir/std/num/struct.Wrapping.html before.dir/std/num/struct.Wrapping.html 3194173 after.dir/std/num/struct.Wrapping.html 3204351 before.dir/std/num/struct.Wrapping.html 100*((3194173-3204351)/3204351)=-0.031 $ du -b after.dir/std/keyword.match.html before.dir/std/keyword.match.html 8151 after.dir/std/keyword.match.html 8495 before.dir/std/keyword.match.html 100*((8151-8495)/8495)=-4.0 Gzipped tarball sizes seem shrunk, but not by much. du -s before.tar.gz after.tar.gz 69600 before.tar.gz 69480 after.tar.gz 100*((69480-69600)/69600)=-0.17
2023-01-27Rollup merge of #107242 - notriddle:notriddle/title-ordering, r=GuillaumeGomezYuki Okushi-1/+1
rustdoc: make item links consistently use `title="{shortty} {path}"` The ordering in item tables was flipped in 3030cbea957adbd560bf2eaa34c1b8a56daee16a, making it inconsistent with the ordering in method signatures. Compare these (before this PR is merged): https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/render/print_item.rs#L455-L459 https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/format.rs#L903-L908
2023-01-26add EarlyBinder::no_bound_varsKyle Matsuda-1/+1