| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Compute liveness constraints in location-sensitive polonius
This continues the location-sensitive prototype. In this episode, we build the liveness constraints.
Reminder of the approach we're taking: we need variance data to create liveness edges in the forward/backward/both directions (respectively in the cases of covariance, contravariance, invariance) in the localized constraint graph.
This PR:
- introduces the holder for that, and for the liveness data in the correct shape: the transpose of what we're using today, "live regions per points".
- records use/drop live region variance during tracing
- records regular live region variance at the end of liveness
- records the correctly shaped live region per point matrix
- uses all of the above to compute the liveness constraints
(There's still technically one tiny part of the liveness owl left to do, but I'll leave it for a future PR: we also need to disable the NLL optimization that avoids computing liveness for locals whose types contain a region outliving a free region -- the existing constraints make it effectively live at all points; this doesn't work under polonius)
r? `@jackh726` cc `@matthewjasper`
|
|
Rollup of 4 pull requests
Successful merges:
- #134870 (Fix sentence fragment in `pin` module docs)
- #134884 (Fix typos)
- #134892 (Added codegen test for elidings bounds check when indexes are manually checked)
- #134894 (Document how to run the split Docker pipelines)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Document how to run the split Docker pipelines
r? `@the8472`
|
|
Added codegen test for elidings bounds check when indexes are manually checked
Closes #55147
|
|
Fix typos
Hello, I fix some typos in docs and comments. Thank you very much.
|
|
Fix sentence fragment in `pin` module docs
Looks like this was inadvertently dropped in 8241ca60. Restore the words from before that commit.
|
|
Improve default target options for x86_64-unknown-linux-none
Without a standard library, we cannot unwind, so it should be panic=abort by default.
Additionally, it does not have std because while it is Linux, it cannot use libc, which std uses today for Linux.
Using PIE by default may be surprising to users, as shown in #134763, so I've documented it explicitly. I'm not sure if we want to count that as fixing the issue or not.
cc `@morr0ne,` as you added the target (and are the maintainer), and `@Noratrieb,` who reviewed that PR (:D).
|
|
- add a FIXME when looking for the region variance of unexpected regions
- drive-by: fix a doc comment link
- drive-by: simplify the variance match using exported variants instead
|
|
|
|
transpose liveness matrix and record live regions at the end of MIR typeck
|
|
it missed the index and bounds info
|
|
|
|
records the variance of:
- use live types
- drop live generic args
|
|
Following the Generalizer's structure, relating e.g. a type with itself
will allow tracking the variance wrt the contained regions.
|
|
This context struct will hold data to help creating localized
constraints:
- the live regions, with the shape matching a CFG walk, indexed per
point
- the variance of these live regions, represented as the direction we'll
add the appropriate
We also add this structure to the mir typeck to record liveness data,
and make it responsible for localized constraint creation.
|
|
|
|
|
|
docs: fix typos
Fix typos in docs. Thank you.
|
|
Closes #55147
|
|
|
|
Signed-off-by: calciumbe <192480234+calciumbe@users.noreply.github.com>
|
|
Rollup of 5 pull requests
Successful merges:
- #134799 (nits: Cleanups in `librustdoc::clean`)
- #134851 (docs: inline `alloc::ffi::c_str` types to `alloc::ffi`)
- #134869 (Bump compiler cc)
- #134876 (bootstrap: Consolidate the macros for declaring compiletest test suites)
- #134883 (bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`
Running `./x check bootstrap` currently doesn't work, because it builds the bootstrap shim binaries with `cfg(test)`, and those binaries can't find a `tests` submodule when they include `shared_helpers.rs` via `#[path]`.
This PR fixes that by taking the tests module and moving it to `super::tests::shared_helpers_tests` instead.
(The extra `tests` submodule prevents tidy from complaining about unit tests that aren't in a dedicated tests module.)
---
It would be nice to also run `./x check bootstrap compiletest` in CI, so that this and #134848 don't regress, but I didn't want to bundle that change with this fix.
|
|
bootstrap: Consolidate the macros for declaring compiletest test suites
Instead of using a dizzying assortment of different macros to declare these test suite steps, we can mostly just use one `test!` macro with a few optional named arguments.
I'm pretty sure that this doesn't change any behaviour, but please do double-check each of the individual declarations.
|
|
Bump compiler cc
Fixes #134657
Pulls in https://github.com/rust-lang/cc-rs/pull/1330
try-job: x86_64-msvc
|
|
docs: inline `alloc::ffi::c_str` types to `alloc::ffi`
like https://github.com/rust-lang/rust/pull/134791 but for `alloc`
r? ``@tgross35`` ``@notriddle``
|
|
nits: Cleanups in `librustdoc::clean`
r? ````@GuillaumeGomez````
|
|
Clean up some FIXME notes on bootstrap
Fixing and removing some FIXME notes.
|
|
|
|
Avoid ICE in borrowck
Provide a fallback in `best_blame_constraint` when `find_constraint_paths_between_regions` doesn't have a result. This code is due a rework to avoid the letf-over `unwrap()`, but avoids the ICE caused by the repro.
Fix #133252.
|
|
|
|
|
|
Looks like this was inadvertently dropped in 8241ca60. Restore the words from before that commit.
|
|
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 8 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating glob v0.3.1 -> v0.3.2
Updating quote v1.0.37 -> v1.0.38
Updating rustversion v1.0.18 -> v1.0.19
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest
library dependencies:
Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest
rustbook dependencies:
Locking 7 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating cc v1.2.5 -> v1.2.6
Updating quote v1.0.37 -> v1.0.38
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
```
|
|
Rollup of 3 pull requests
Successful merges:
- #134849 (compiletest: Slightly simplify the handling of debugger directive prefixes)
- #134850 (Document virality of `feature(rustc_private)`)
- #134852 (Added a codegen test for optimization with const arrays)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
compiler & tools dependencies:
Locking 8 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating glob v0.3.1 -> v0.3.2
Updating quote v1.0.37 -> v1.0.38
Updating rustversion v1.0.18 -> v1.0.19
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
note: pass `--verbose` to see 36 unchanged dependencies behind latest
library dependencies:
Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 5 unchanged dependencies behind latest
rustbook dependencies:
Locking 7 packages to latest compatible versions
Updating anyhow v1.0.94 -> v1.0.95
Updating cc v1.2.5 -> v1.2.6
Updating quote v1.0.37 -> v1.0.38
Updating serde v1.0.216 -> v1.0.217
Updating serde_derive v1.0.216 -> v1.0.217
Updating syn v2.0.90 -> v2.0.93
Updating unicase v2.8.0 -> v2.8.1
|
|
Added a codegen test for optimization with const arrays
Closes #107208
|
|
Document virality of `feature(rustc_private)`
Closes #134825.
r? `@bjorn3`
|
|
compiletest: Slightly simplify the handling of debugger directive prefixes
The `cdbg-` prefix is not used by any tests in `tests/debuginfo`, and perhaps there never were any tests that used it.
Getting rid of it also lets us get rid of the code for parsing multiple prefixes at the same time, since every debugger now has exactly one prefix.
|
|
- librustdoc::clean::clean_lifetime doesn't need a mut doc context
- librustdoc::clean::normalize doesn't need a mut doc context
- move Some() wrapping up into `clean_predicate()`
- simplify nested if in librustdoc::clean::record_extern_fqn()
|
|
bootstrap: Allow `./x check compiletest`
Did you know that bootstrap didn't support `./x check compiletest`? Well, now it does!
Manually add `"compiletest"` to your `rust-analyzer.check.overrideCommand` check command to get error/warning integration when modifying compiletest.
|
|
Closes #107208
|
|
bootstrap: drop warning for top-level test suite path check due to false positives
The current top-level test suite directory does not exist warning logic doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic.
This retains the fix for the Windows path handling (unlike #134843).
r? `@onur-ozkan`
|
|
Since 9cb1998ea15e179482504e07cad8fa121e169a32 this feature is viral.
|
|
replace bootstrap-self-test feature flag with cfg(test)
This makes it in more rusty way.
|
|
|
|
Unify fs::copy and io::copy on Linux
Currently, `fs::copy` first tries a regular file copy (via copy_file_range) and then falls back to userspace read/write copying. We should use `io::copy` instead as it tries copy_file_range, sendfile, and splice before falling back to userspace copying. This was discovered here: https://github.com/SUPERCILEX/fuc/issues/40
Perf impact: `fs::copy` will now have two additional statx calls to decide which syscall to use. I wonder if we should get rid of the statx calls and only continue down the next fallback when the relevant syscalls say the FD isn't supported.
|
|
|