| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Co-authored-by: DianQK <dianqk@dianqk.net>
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #136439 (Misc. `rustc_codegen_ssa` cleanups 🧹)
- #136543 (intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic)
- #136637 (Add binary_format to rustc target specs)
- #137099 (Fix rustdoc test directives that were accidentally ignored 🧐)
- #137297 (Update `compiler-builtins` to 0.1.147)
- #137451 (FIx `sym` -> `syn` typo in tail-expr-drop-order type opt-out)
- #137452 (bootstrap: add module docs for core:metadata)
- #137483 (rename sub_ptr to offset_from_unsigned)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
avoid `compiler_for` for dist tools and force the current compiler
Using `compiler_for` in dist steps was causing to install stage1 tools into the dist tarballs, which doesn't match with the stage2 compiler.
Fixes https://github.com/rust-lang/rust/issues/137469
|
|
rename sub_ptr to offset_from_unsigned
i also made `byte_sub_ptr` `byte_offset_from_unsigned`
fixes #137121
tracking issue #95892
|
|
Shourya742:2025-02-23-add-module-level-doc-for-core-metadata, r=Kobzol
bootstrap: add module docs for core:metadata
Add module doc for bootstrap:core:metadata
|
|
intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic
LLVM has three intrinsics here that all do the same thing (when used in the default FP environment). There's no reason Rust needs to copy that historically-grown mess -- let's just have one intrinsic and leave it up to the LLVM backend to decide how to lower that.
Suggested by `@hanna-kruppe` in https://github.com/rust-lang/rust/issues/136459; Cc `@tgross35`
try-job: test-various
|
|
$ ./configure
configure: processing command line
configure:
configure: build.configure-args := []
configure: profile := dist
configure:
configure: writing `config.toml` in current directory
configure:
configure: run `python /mnt/filling/store/nabijaczleweli/code/rust/x.py --help`
This is naturally not valid since I don't have a "python" executable
(and this will hopefully become more and more true as Python 2 dies out).
./configure knows this since it does try python3 "$@", then python2.7 &c.
After, this now says
configure: run `python3 /mnt/filling/store/nabijaczleweli/code/rust/x.py --help`
which is possible, and corresponds to the interpreter actually running.
|
|
Remove `limit` crate in favor `usize`
|
|
|
|
|
|
|
|
|
|
|
|
`--build-test-suite-root` instead
|
|
build dir
- Introduce and use `--build-{root,test-suite-root}` over
`--build-base`.
- A few minor cleanups.
|
|
Don't filter out private items when completing paths in the same crate. Instead respect the `privateEditable` setting.
Fixes #9850
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Master bootstrap update
https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday
r? `@Mark-Simulacrum`
|
|
When running `cargo codegen` the `crates/parser/test_data/generated/runner.rs` file is only updated when some file in `crates/parser/test_data/inline` changes. However this is not sufficient in all cases
|
|
When running `cargo codegen` the cwd="rust-analyzer" however when running `cargo test` the cwd="rust-analyzer/xtask" which makes the codegen panic
|
|
Rollup of 9 pull requests
Successful merges:
- #135354 ([Debuginfo] Add MSVC Synthetic and Summary providers to LLDB)
- #136826 (Replace mem::zeroed with mem::MaybeUninit::uninit for large struct in Unix)
- #137194 (More const {} init in thread_local)
- #137334 (Greatly simplify lifetime captures in edition 2024)
- #137382 (bootstrap: add doc for vendor build step)
- #137423 (Improve a bit HIR pretty printer)
- #137435 (Fix "missing match arm body" suggestion involving `!`)
- #137448 (Fix bugs due to unhandled `ControlFlow` in compiler)
- #137458 (Fix missing self subst when rendering `impl Fn*<T>` with no output type)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
bootstrap: add doc for vendor build step
This PR adds docs for vendor build step.
|
|
r=saethlin,traviscross
Greatly simplify lifetime captures in edition 2024
Remove most of the `+ Captures` and `+ '_` from the compiler, since they are now unnecessary with the new edition 2021 lifetime capture rules. Use some `+ 'tcx` and `+ 'static` rather than being overly verbose with precise capturing syntax.
|
|
[Debuginfo] Add MSVC Synthetic and Summary providers to LLDB
Adds handling for `tuple$<>`, `ref$<slice$2<>`, `ref$<str$>` and `enum2$<>`.
Also fixes a bug in MSVC vec/string handling where the script was unable to determine the element's type due to LLDB ignoring template arg debug information
<details>
<summary>Sample code</summary>
```rust
pub enum Number {
One = 57,
Two = 99,
}
#[repr(u8)]
pub enum Container {
First(u32),
Second { val: u64, val2: i8 },
Third,
}
...
let u8_val = b'a';
let float = 42.78000000000001;
let tuple = (u8_val, float);
let str_val = "eef";
let mut string = "freef".to_owned();
let mut_str = string.as_mut_str();
let array: [u8; 4] = [1, 2, 3, 4];
let ref_array = array.as_slice();
let mut array2: [u32; 4] = [1, 2, 3, 4];
let mut_array = array2.as_mut_slice();
let enum_val = Number::One;
let mut enum_val2 = Number::Two;
let sum_val = Container::First(15);
let sum_val_2 = Container::Second { val: 0, val2: 0 };
let sum_val_3 = Container::Third;
let non_zero = NonZeroU128::new(100).unwrap();
let large_discr = NonZeroU128::new(255);
```
</details>
Before:

After:

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: i686-mingw
try-job: aarch64-gnu
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
stabilize stage management for rustc tools
https://github.com/rust-lang/rust/pull/135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.
This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).
I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.
Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.
~~for now, r? ghost~~
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #135501 (Inject `compiler_builtins` during postprocessing and ensure it is made private)
- #137121 (stabilize `(const_)ptr_sub_ptr`)
- #137180 (Give `global_asm` a fake body to store typeck results, represent `sym fn` as a hir expr to fix `sym fn` operands with lifetimes)
- #137256 (compiler: untangle SIMD alignment assumptions)
- #137383 (stabilize `unsigned_is_multiple_of`)
- #137415 (Remove invalid suggestion of into_iter for extern macro)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=Noratrieb
stabilize `unsigned_is_multiple_of`
tracking issue: https://github.com/rust-lang/rust/issues/128101
fcp completed in: https://github.com/rust-lang/rust/issues/128101#issuecomment-2674880635
### Public API
A version of this for all the unsigned types
```rust
fn is_multiple_of(lhs: u64, rhs: u64) -> bool {
match rhs {
// prevent division by zero
0 => lhs == 0,
_ => lhs % rhs == 0,
}
}
```
|
|
r=bjorn3,RalfJung
compiler: untangle SIMD alignment assumptions
There were a number of puzzling assumptions being made about SIMD types and their layout that I have corrected in this diff. These are mostly no-op edits in actual fact, but they do subtly alter a pair of checks in our invariant-checking and union layout computation that rested on those peculiar assumptions. Those unfortunately stand in the way of any further actual fixes. I submit this for review, even though it's not clearly motivated without its followups, because it should still be possible to independently conclude whether this is correct.
|
|
Give `global_asm` a fake body to store typeck results, represent `sym fn` as a hir expr to fix `sym fn` operands with lifetimes
There are a few intertwined problems with `sym fn` operands in both inline and global asm macros.
Specifically, unlike other anon consts, they may evaluate to a type with free regions in them without actually having an item-level type annotation to give them a "proper" type. This is in contrast to named constants, which always have an item-level type annotation, or unnamed constants which are constrained by their position (e.g. a const arg in a turbofish, or a const array length).
Today, we infer the type of the operand by looking at the HIR typeck results; however, those results are region-erased, so during borrowck we ICE since we don't expect to encounter erased regions. We can't just fill this type with something like `'static`, since we may want to use real (free) regions:
```rust
fn foo<'a>() {
asm!("/* ... */", sym bar::<&'a ()>);
}
```
The first idea may be to represent `sym fn` operands using *inline* consts instead of anon consts. This makes sense, since inline consts can reference regions from the parent body (like the `'a` in the example above). However, this introduces a problem with `global_asm!`, which doesn't *have* a parent body; inline consts *must* be associated with a parent body since they are not a body owner of their own. In #116087, I attempted to fix this by using two separate `sym` operands for global and inline asm. However, this led to a lot of confusion and also some unattractive code duplication.
In this PR, I adjust the lowering of `global_asm!` so that it's lowered in a "fake" HIR body. This body contains a single expression which is `ExprKind::InlineAsm`; we don't *use* this HIR body, but it's used in typeck and borrowck so that we can properly infer and validate the the lifetimes of `sym fn` operands.
I then adjust the lowering of `sym fn` to instead be represented with a HIR expression. This is both because it's no longer necessary to represent this operand as an anon const, since it's *just* a path expression, and also more importantly to sidestep yet another ICE (https://github.com/rust-lang/rust/issues/137179), which has to do with the existing code breaking an invariant of def-id creation and anon consts. Specifically, we are not allowed to synthesize a def-id for an anon const when that anon const contains expressions with def-ids whose parent is *not* that anon const. This is somewhat related to https://github.com/rust-lang/rust/pull/130443#issuecomment-2445678945, which is also a place in the compiler where synthesizing anon consts leads to def-id parenting issue.
As a side-effect, this consolidates the type checking for inline and global asm, so it allows us to simplify `InlineAsmCtxt` a bit. It also allows us to delete a bit of hacky code from anon const `type_of` which was there to detect `sym fn` operands specifically. This also could be generalized to support `const` asm operands with types with lifetimes in them. Since we specifically reject these consts today, I'm not going to change the representation of those consts (but they'd just be turned into inline consts).
r? oli-obk -- mostly b/c you're patient and also understand the breadth of the code that this touches, please reassign if you don't want to review this.
Fixes #111709
Fixes #96304
Fixes #137179
|
|
stabilize `(const_)ptr_sub_ptr`
Tracking issue: #95892
Closes #95892
FCP Completed: https://github.com/rust-lang/rust/issues/95892#issuecomment-2561139730
r? ````@Noratrieb````
|
|
Update host LLVM to 20.1 on CI
r? `@ghost`
|
|
|
|
fix: Binding wrong associated type when lowering bounds like `T: Trait<Assoc = U>`
|
|
Update cargo
16 commits in ce948f4616e3d4277e30c75c8bb01e094910df39..1d1d646c06a84c1aa53967b394b7f1218f85db82
2025-02-14 20:32:07 +0000 to 2025-02-21 21:38:53 +0000
- fix(package): Fix lookups to capitalized workspace member's index entry (rust-lang/cargo#15216)
- chore(ci): Visually group output in Github (rust-lang/cargo#15218)
- chore(ci): Auto-update cargo-semver-checks (rust-lang/cargo#15212)
- chore(deps): update msrv (3 versions) to v1.83 (rust-lang/cargo#15217)
- docs(ref): Shift focus to resolver v3 (rust-lang/cargo#15213)
- fix: mention "3" as a valid value for "resolver" field in error message (rust-lang/cargo#15215)
- chore(deps): update msrv (1 version) to v1.85 (rust-lang/cargo#15211)
- fix: build warning in windows_reserved_names_are_allowed (rust-lang/cargo#15206)
- Typo: "togother" -> "together" (rust-lang/cargo#15204)
- chore: bump to 0.88.0; update changelog (rust-lang/cargo#15202)
- Typo: "explicitally" -> "explicitly" (rust-lang/cargo#15201)
- fix(add): Focus on error, rather than large feature lists (rust-lang/cargo#15200)
- docs: Improve comments (rust-lang/cargo#15197)
- fix(embedded): Handle more parsing corner cases (rust-lang/cargo#15187)
- docs: docs for `-Zfeature-unification` (rust-lang/cargo#15189)
- Fix man page with malformed `{{#options}}` block (rust-lang/cargo#15191)
|
|
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #136910 (Implement feature `isolate_most_least_significant_one` for integer types)
- #137183 (Prune dead regionck code)
- #137333 (Use `edition = "2024"` in the compiler (redux))
- #137356 (Ferris 🦀 Identifier naming conventions)
- #137362 (Add build step log for `run-make-support`)
- #137377 (Always allow reusing cratenum in CrateLoader::load)
- #137388 (Fix(lib/fs/tests): Disable rename POSIX semantics FS tests under Windows 7)
- #137410 (Use StableHasher + Hash64 for dep_tracking_hash)
- #137413 (jubilee cleared out the review queue)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Add build step log for `run-make-support`
I was always confused about what is being built, since nothing was printed in the log :)
r? ``@jieyouxu``
|
|
test building enzyme in CI
1) This PR fixes a significant compile-time regression, by only running the expensive autodiff pipeline, if the users pass the newly introduced Enable value to the `-Zautodiff=` flag. It updates the test(s) accordingly. It gives a nice error if users forget that.
2) It fixes macos support by explicitly linking against the Enzyme build folder. This doesn't cover CI macos yet.
3) It fixes the issue that setting ENZYME_RUNPASS was ignored by enzyme and in fact did not schedule enzyme's opt pass.
4) It also re-enables support for various other values for the autodiff flag, which were ignored since the refactor.
5) I merged some improvements to Enzyme core, which means we do not longer depend on LLVM being build with the Plugin Interface enabled.
6) Unrelated to other fixes, this changes `rustc_autodiff` to `EncodeCrossCrate::Yes`. It is not enough on it's own to enable usage of Enzyme in libraries, but it is for sure a piece of the fixes needed to get this to work.
try-job: x86_64-gnu
r? `@oli-obk`
Tracking:
- https://github.com/rust-lang/rust/issues/124509
|
|
minor: Switch back to RUST_SRC_PATH
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #136458 (Do not deduplicate list of associated types provided by dyn principal)
- #136474 ([`compiletest`-related cleanups 3/7] Make the distinction between sources root vs test suite sources root in compiletest less confusing)
- #136592 (Make sure we don't overrun the stack in canonicalizer)
- #136787 (Remove `lifetime_capture_rules_2024` feature)
- #137207 (Add #[track_caller] to Duration Div impl)
- #137245 (Tweak E0277 when predicate comes indirectly from ?)
- #137257 (Ignore fake borrows for packed field check)
- #137399 (fix ICE in layout computation with unnormalizable const)
r? `@ghost`
`@rustbot` modify labels: rollup
|