Commit graph

1920 commits

Author SHA1 Message Date
Trevor Gross
250869e909 float: Add f16 to test-float-parse
This requires a fix to the subnormal test to cap the maximum allowed
value within the maximum mantissa.
2025-05-18 16:51:28 +00:00
Chris Denton
8955c6c6ee
Rollup merge of #139843 - thaliaarchi:editor-file-associations, r=Mark-Simulacrum
Setup editor file associations for non-rs extensions

.gitattributes lists `*.fixed`, `*.pp`, and `*.mir` as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code.

At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include `library/Cargo.toml`.

I have tested this with VS Code and Zed. I have not implemented it for Emacs/Eglot or Helix.
2025-04-19 19:30:47 +00:00
Mara Bos
5523c87c41 Update libcore.natvis for Pin. 2025-04-17 21:16:58 +02:00
Thalia Archibald
d1e82ba37c Setup editor file associations for non-rs extensions
.gitattributes lists *.fixed, *.pp, and *.mir as file extensions which
should be treated as Rust source code. Do the same for VS Code and Zed.
This only does syntax highlighting, which is appropriate, as MIR isn't
really Rust code.

At the same time, consistently order `rust-analyzer.linkedProjects`
between editors. For some reason, Eglot didn't include
library/Cargo.toml.
2025-04-14 23:16:11 -07:00
Stuart Cook
82f04468e9
Rollup merge of #139214 - bjorn3:edition_2024_rustfmt, r=compiler-errors
Tell rustfmt to use the 2024 edition in ./x.py fmt

Most crates in this repo have been moved to the 2024 edition already. This also allows removing a rustfmt exclusion for a cg_clif test.
2025-04-02 13:10:42 +11:00
bjorn3
770fcbf8c1 Move test-float-parse to the 2024 edition 2025-04-01 14:49:14 +00:00
highcloudwind
624eb8550b chore: remove redundant backtick
Signed-off-by: highcloudwind <highcloud@aliyun.com>
2025-04-01 21:05:34 +08:00
Jacob Pratt
0fc6279ce9
Rollup merge of #138606 - heiseish:131365-extended, r=Mark-Simulacrum
Fix missing rustfmt in msi installer - cont

## Context
- This PR extended and fixed https://github.com/rust-lang/rust/pull/131365, which was reverted in https://github.com/rust-lang/rust/pull/135253
- Initial effort from `@klensy` in https://github.com/rust-lang/rust/pull/135255 (at any points if you feel like picking this up again, let me know I'll close my PR! Just trying to push this through since it's my mistake in the original commits)
- Tested with both `beta` and `nightly` `rust.channel`

r? `@Mark-Simulacrum`
2025-03-23 20:44:11 -04:00
onur-ozkan
b5eaeafc8b update completion files
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-03-20 14:03:40 +03:00
klensy
43152ad47b wix: allow to skip more components 2025-03-17 19:30:09 +08:00
Giang Dao
a56b1d2a13 fix missing rustfmt and clippy for msi 2025-03-17 19:30:08 +08:00
bit-aloo
99aa4ed85f
replace config.toml to bootstrap.toml in src/ci, src/etc/* and tests/run-make 2025-03-17 12:56:49 +05:30
许杰友 Jieyou Xu (Joe)
199e714a66
Rollup merge of #137968 - dingxiangfei2009:patch-1, r=Mark-Simulacrum
Properly escape regexes in Python scripts

According to the [Python 3.12 release note](https://docs.python.org/3/whatsnew/3.12.html#other-language-changes) string literals containing typical invalid escape sequences like `"\d"` are now rejected. There seems to remain only two instances of escape sequences in regex. This change will allow us to work with newer Python interpreter.
2025-03-16 09:40:04 +08:00
Josh Stone
8c91fae5be Remove separate src/tools/x from rust-analyzer settings 2025-03-13 12:21:21 -07:00
Chris Denton
1c7aaf95e1
Update rand to 0.9.0 2025-03-10 01:21:57 +00:00
许杰友 Jieyou Xu (Joe)
9b8accbeb6
Rollup merge of #134063 - tgross35:dec2flt-refactoring, r=Noratrieb
dec2flt: Clean up float parsing modules

This is the first portion of my work adding support for parsing and printing `f16`. Changes in `float.rs` replace the magic constants with expressions and add some use of generics to better support the new float types. Everything else is related to documentation or naming; there are no functional changes in this PR.

This can be reviewed by commit.
2025-03-05 21:46:31 +08:00
bors
2010bba886 Auto merge of #137927 - matthiaskrgr:rollup-yj463ns, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #132388 (Implement `#[cfg]` in `where` clauses)
 - #134900 (Fix parsing of ranges after unary operators)
 - #136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern)
 - #137054 (Make phantom variance markers transparent)
 - #137525 (Simplify parallelization in test-float-parse)
 - #137618 (Skip `tidy` in pre-push hook if the user is deleting a remote branch)
 - #137741 (Stop using `hash_raw_entry` in `CodegenCx::const_str`)
 - #137849 (Revert "Remove Win SDK 10.0.26100.0 from CI")
 - #137862 (ensure we always print all --print options in help)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-03 22:57:01 +00:00
wieDasDing
69ef2fc908
fix: properly escape regexes 2025-03-04 05:22:26 +08:00
Matthias Krüger
1305212786
Rollup merge of #137618 - yotamofek:pr/pre-push-hook, r=Mark-Simulacrum
Skip `tidy` in pre-push hook if the user is deleting a remote branch

It's kinda annoying when I'm trying to delete remote branches and that triggers `tidy`, so small fix to prevent that.
Hopefully this should be an acceptable amount of complexity to add to this shell script.
2025-03-03 10:41:00 +01:00
Trevor Gross
19a909ae0e dec2flt: Refactor float traits
A lot of the magic constants can be turned into expressions. This
reduces some code duplication.

Additionally, add traits to make these operations fully generic. This
will make it easier to support `f16` and `f128`.
2025-03-02 09:35:42 +00:00
Trevor Gross
7603e0104a Simplify parallelization in test-float-parse
Currently, test case generators are launched in parallel and their test
cases also run in parallel, all within the same pool. I originally
implemented this with the assumption that there would be an advantage in
parallelizing the generators themselves, but this turns out to not
really have any benefit.

Simplify things by running generators in series while keeping their test
cases parallelized. This makes the code easier to follow, and there is
no longer a need for MPSC or multiprogress bars. Additionally, the UI
output can be made cleaner.
2025-03-02 06:13:25 +00:00
Yotam Ofek
797ef6455e htmldocck: catch and error on deprecated syntax 2025-03-01 10:31:46 +00:00
Yotam Ofek
41a7c8312d Skip tidy in pre-push hook if the user is deleting a remote branch 2025-02-25 13:48:31 +00:00
Jacob Pratt
307f1609e9
Rollup merge of #135354 - Walnut356:msvc_lldb, r=wesleywiser
[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:

![image](https://github.com/user-attachments/assets/19fd0881-a4c3-4c68-b28f-769a67d95e35)

After:

![image](https://github.com/user-attachments/assets/d0479035-17ed-4584-8eb4-71d1314f8f7c)

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
2025-02-23 02:44:16 -05:00
Chai T. Rex
d9f125dcf2 Add support for the Zed IDE to ./x setup 2025-02-15 17:30:20 -05:00
Walnut
d6f5d34744 fix string and tuple struct formatting 2025-02-12 01:30:09 -06:00
Walnut
0819c1638c Fix import/attribute errors related to SBTypeStaticField 2025-02-07 20:41:57 -06:00
Jakub Beránek
22e44919c5 Update bootstrap completions 2025-02-05 15:33:40 +01:00
Jacob Pratt
e730dfc097
Rollup merge of #135812 - Walnut356:gdb_osstring, r=Mark-Simulacrum
Fix GDB `OsString` provider on Windows

It would throw an exception due to trying to look up `Wtf8Buf.__0`. The field it actually wants is called [`bytes`](b605c65b6e/library/std/src/sys_common/wtf8.rs (L134)).
2025-01-26 01:51:15 -05:00
Walnut
a9495e0118 change lookup from OsString.inner.inner.0 -> OsString.inner.inner.bytes 2025-01-21 03:23:01 -06:00
Urgau
8e61502484 core: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
Walnut
0f12b8cf12 slots fix 2025-01-18 21:12:23 -06:00
Walnut
e8c5e09e4f doc comment for get_template_args 2025-01-11 19:09:08 -06:00
Walnut
2be88129f9 tidy 2025-01-11 03:40:07 -06:00
Walnut
a3adcd24db add alternate inner type lookup for hashmap/set when template args missing 2025-01-11 03:33:41 -06:00
Walnut
0bf0817dd5 More robust sequence formatter 2025-01-11 00:38:48 -06:00
Walnut
f725ad7f1d more robust tuple summary 2025-01-10 22:21:49 -06:00
Walnut
4f595334f5 add alternate inner type lookup for vec/string for missing template args 2025-01-10 22:02:45 -06:00
Walnut
2b8ff7534a add MSVC str providers 2025-01-10 21:47:27 -06:00
Walnut
009994a849 organize lldb_commands 2025-01-10 21:21:44 -06:00
Walnut
c425660858 add msvc enum providers 2025-01-10 21:13:52 -06:00
Walnut
71b6d49282 add MSVC slice providers 2025-01-10 02:02:01 -06:00
Walnut
8b14227aa9 add MSVC tuple providers 2025-01-10 01:53:25 -06:00
Pietro Albini
ee2b8eee38
Revert "fix missing rustfmt and clippy for msi"
This reverts commit f5577a8174.
2025-01-08 14:44:01 +01:00
Jacob Pratt
f3d404a7be
Rollup merge of #134291 - Walnut356:type_annots, r=tgross35
Use python built in type annotations in LLDB visualizer scripts

Replaces type annotation comments with python's built-in type annotations.

Built-in type annotations were added in python 3.5. LLDB [currently recommends (and as of LLVM 21, will enforce)](https://github.com/llvm/llvm-project/pull/114807) a minimum python version of 3.8. Rust's test suite also requires python 3.10.
2024-12-31 03:38:02 -05:00
Walnut
693a0d5dcc use python built in type annotations 2024-12-31 00:53:59 -06:00
ericlehong
a0b3452fb5 Fix typos
Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>
2024-12-30 21:43:22 +08:00
clubby789
4fd3baaf70 Add --no-capture as a bootstrap argument 2024-12-27 11:52:01 +00:00
Ryan Mehri
bc1737b279 Generate shell completions for x as well 2024-12-17 14:13:05 -07:00
bors
4d669fb34e Auto merge of #133134 - Walnut356:synth_prov, r=Mark-Simulacrum
Don't use a SyntheticProvider for literally every type

Replaces a glob regex with individualized imports for each standard library type. This improves debugger performance by quite a bit when populating lots of values with lots of fields

With the glob, afaik every single value of every single type that the debugger renders is run through a python function that does quite a few string comparisons (i plan to fix those next) to determine the SyntheticProvider to use.  It looks like DefaultSyntheticProvider's functions internally call the liblldb c++ functions, which ends up with identical behavior to not using a SyntheticProvider at all, except you have extra python round trips slowing things down.

These sample vidoes were run on x86-64-pc-windows-gnu. `vect` is a 1000 element `Vec<Big>`, `Big` contains a dozen or so `Small`, and `Small` contains a dozen or so `[i32; 5]`

Before:

https://github.com/user-attachments/assets/07c31fe7-e126-4c2e-8ae9-cfe36e351d3f

After:

https://github.com/user-attachments/assets/6c0d1a45-1ffe-46de-95a0-5dbe59a173b5

---

try-job: aarch64-apple
2024-12-08 19:30:33 +00:00