| Age | Commit message (Collapse) | Author | Lines |
|
When stamp doesn't exist, should say Error, and print path to stamp file
Follow up pr for #107397
|
|
rustdoc: remove unused class `has-srclink`
Stopped being used in CSS with 73d0f7c7b68784f1db0a1f53855c20d118a7e8b0.
|
|
Pass `--locked` to the x test tidy call
This allows to fail the push when the `Cargo.lock` file needs to be updated.
|
|
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)
|
|
Fix maintainer validation message
State clearly why maintainer verification is not activating, ruling out the user thinking they misconfigured something.
|
|
|
|
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.
|
|
|
|
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
|
|
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
|
|
Stopped being used in CSS with
73d0f7c7b68784f1db0a1f53855c20d118a7e8b0
|
|
|
|
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
|
|
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
|
|
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
|
|
rustdoc: remove inline javascript from copy-path button
|
|
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.
|
|
|
|
|
|
|
|
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
|
|
|
|
Update Clippy
r? `@Manishearth`
|
|
|
|
|
|
|
|
|
|
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
|
|
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
Fixes #91100
|
|
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`
|
|
Fix wording from `rustbuild` to `bootstrap`
Fixes #107230
|
|
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
|
|
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
|
|
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`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Version 4.005 was released on 2023-01-20.
|
|
|
|
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.
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: remove mostly-unused CSS classes `import-item` and `module-item`
|
|
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.
|
|
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
|
|
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
|
|
|