Lukas Wirth
6f83ceeda6
Subtree text-size
2025-11-07 20:27:18 +01:00
Lukas Wirth
4bf516ee5a
Merge pull request #20973 from Natural-selection1/demorgan
...
fix demorgan assist to handle method call
2025-11-06 14:20:44 +00:00
Hegui Dai
06668b6e8c
refactor
2025-11-06 21:44:30 +08:00
Laurențiu Nicola
3668c75171
Merge pull request #20977 from chirizxc/patch-1
...
Move safe computation out of unsafe block
2025-11-06 08:47:03 +00:00
chiri
c9b5683467
Move safe computation out of unsafe block
2025-11-06 11:37:45 +03:00
Hegui Dai
e9b8265173
fix demorgan assist to handle method call
2025-11-05 20:14:52 +08:00
Chayim Refael Friedman
5ffe3f45ce
Merge pull request #20971 from ShoyuVanilla/async-fn-sig
...
fix: Fix panicking while resolving callable sigs for `AsyncFnMut`
2025-11-04 16:44:01 +00:00
Shoyu Vanilla
c7c9e25971
fix: Fix panicking while resolving callable sigs for AsyncFnMut
2025-11-05 01:00:09 +09:00
Laurențiu Nicola
51af7a37c5
Merge pull request #20960 from rust-lang/rustc-pull
...
minor: Rustc pull update
2025-11-04 08:18:22 +00:00
Laurențiu Nicola
c00e22df9b
Fix test URL
2025-11-04 10:09:45 +02:00
Chayim Refael Friedman
7bd9b76bd2
Merge pull request #20966 from ChayimFriedman2/fix-test-name
...
minor: Fix test name
2025-11-04 08:07:36 +00:00
Chayim Refael Friedman
2b9591efae
Fix test name
2025-11-04 09:58:29 +02:00
Shoyu Vanilla (Flint)
c46279da2f
Merge pull request #20565 from A4-Tacks/conv-range-for-to-while
...
Add ide-assist: convert_range_for_to_while
2025-11-04 05:59:34 +00:00
A4-Tacks
180a5e23d3
Add dynamic assistant description
2025-11-04 13:50:09 +08:00
A4-Tacks
8549afe4a6
Add ide-assist: convert_range_for_to_while
...
Convert for each range into while loop.
```rust
fn foo() {
$0for i in 3..7 {
foo(i);
}
}
```
->
```rust
fn foo() {
let mut i = 3;
while i < 7 {
foo(i);
i += 1;
}
}
```
2025-11-04 13:31:41 +08:00
Shoyu Vanilla (Flint)
43df584557
Merge pull request #20961 from A4-Tacks/more-in-value
...
Add more expression to 'in_value'
2025-11-04 04:35:54 +00:00
Lukas Wirth
132d3338f4
Merge pull request #20963 from ShoyuVanilla/lit-suffix
...
fix: Expand literals with wrong suffixes into `LitKind::Err`
2025-11-03 20:18:32 +00:00
Lukas Wirth
5b884c4103
Merge pull request #20964 from ShoyuVanilla/canonicalize-tgts
...
fix: Canonicalize `custom-target.json` paths when fetching sysroot metadata
2025-11-03 20:16:13 +00:00
Shoyu Vanilla
f09b0a89a4
fix: Canonicalize custom-target.json paths when fetching sysroot metadata
2025-11-04 03:00:29 +09:00
Shoyu Vanilla
a0217d8311
fix: Expand literals with wrong suffixes into LitKind::Err
2025-11-04 02:08:33 +09:00
A4-Tacks
45912a9693
Add more expression to 'in_value'
...
When completing some expressions, it is almost always expected to have a non unit value
- ArrayExpr
- ParenExpr
- BreakExpr
- ReturnExpr
- PrefixExpr
- FormatArgsArg
- RecordExprField
- BinExpr (rhs only)
- IndexExpr (inside index only)
Example
---
```rust
fn main() {
return $0;
}
```
**Before this PR**
```rust
fn main() {
return if $1 {
$0
};
}
```
**After this PR**
```rust
fn main() {
return if $1 {
$2
} else {
$0
};
}
```
2025-11-03 21:05:06 +08:00
Shoyu Vanilla (Flint)
00b627daf2
Merge pull request #20957 from A4-Tacks/blanket-assoc-items
...
Fix missing other assoc items for generate_blanket_trait_impl
2025-11-03 06:00:25 +00:00
The rustc-josh-sync Cronjob Bot
ae9f97c299
Merge ref 'c5dabe8cf798' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: c5dabe8cf798123087d094f06417f5a767ca73e8
Filtered ref: 3214048a4d271548c85aae8ffc5f28ec73719235
Upstream diff: fb24b04b09...c5dabe8cf7
This merge was created using https://github.com/rust-lang/josh-sync .
2025-11-03 04:20:09 +00:00
The rustc-josh-sync Cronjob Bot
8af9cda25e
Prepare for merging from rust-lang/rust
...
This updates the rust-version file to c5dabe8cf798123087d094f06417f5a767ca73e8.
2025-11-03 04:15:21 +00:00
bors
3214048a4d
Auto merge of #148412 - matthiaskrgr:rollup-59a302x, r=matthiaskrgr
...
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#146573 (Constify Range functions)
- rust-lang/rust#146699 (Add `is_ascii` function optimized for LoongArch64 for [u8])
- rust-lang/rust#148026 (std: don't leak the thread closure if destroying the thread attributes fails)
- rust-lang/rust#148135 (Ignore unix socket related tests for VxWorks)
- rust-lang/rust#148211 (clippy fixes and code simplification)
- rust-lang/rust#148395 (Generalize branch references)
- rust-lang/rust#148405 (Fix suggestion when there were a colon already in generics)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-02 23:12:25 +00:00
Matthias Krüger
1f22f52f60
Rollup merge of #148405 - Kivooeo:static-span, r=JonathanBrouwer
...
Fix suggestion when there were a colon already in generics
Finally found time to fix https://github.com/rust-lang/rust/issues/144215
I don't feel like this `colon_flag` is perfect solution and that it can be refactored, but I'd say that this is pretty good as it, I was tried to refactor this a little, but the thing is the scope where `param.colon_span` lives is very limited, so there is not much time to check was there colon or not, I tried to rewrite this into more functional style to address this, but it becomes way more unreadable than this one or even less performant, maybe some comments could push readability of this fix further, maybe a comment for enum or `colon_flag`?
2025-11-02 20:21:04 +01:00
Matthias Krüger
6474a0ed00
Rollup merge of #148395 - Kobzol:generalize-branch-references, r=marcoieni
...
Generalize branch references
It should be safe to merge this before the rename, and I'd like to do that, so we can test if beta/stable PRs work.
r? ``@marcoieni``
2025-11-02 20:21:03 +01:00
Matthias Krüger
c1097495d1
Rollup merge of #148135 - hax0kartik:fix-vx-unix-sock, r=Mark-Simulacrum
...
Ignore unix socket related tests for VxWorks
Unix Sockets are not implemented in VxWorks, and therefore, ignore testcases related to UnixDatagram, UnixListener and UnixStream.
2025-11-02 20:21:02 +01:00
Matthias Krüger
ad414af18a
Rollup merge of #148026 - joboet:dont-leak-thread-closure, r=Mark-Simulacrum
...
std: don't leak the thread closure if destroying the thread attributes fails
The comment about double-free is wrong – we can safely drop both the thread attributes and the thread closure. Here, I've used `DropGuard` for the attributes and moved the `Box::into_raw` to just before the `pthread_create`.
2025-11-02 20:21:01 +01:00
Matthias Krüger
efb02ebeb2
Rollup merge of #146699 - heiher:is-ascii-lsx, r=Mark-Simulacrum
...
Add `is_ascii` function optimized for LoongArch64 for [u8]
Similar to x86_64, on LoongArch64 we use the `vmskltz.b` instruction to test the high bit in a lane.
For longer input cases, the performance improvement is significant. For unaligned cases close to 32 bytes in length, there's some regression, but it seems acceptable.
| core benches (MB/s) | Before | After | % |
|--------------------------------------------------------|--------|--------|---------|
| ascii::is_ascii::short::case00_libcore | 1000 | 1000 | 0.00 |
| ascii::is_ascii::medium::case00_libcore | 8000 | 8000 | 0.00 |
| ascii::is_ascii::long::case00_libcore | 183947 | 436875 | +137.50 |
| ascii::is_ascii::unaligned_head_medium::case00_libcore | 7750 | 2818 | -63.64 |
| ascii::is_ascii::unaligned_head_long::case00_libcore | 317681 | 436812 | +37.50 |
| ascii::is_ascii::unaligned_tail_medium::case00_libcore | 7750 | 3444 | -55.56 |
| ascii::is_ascii::unaligned_tail_long::case00_libcore | 155311 | 436812 | +181.25 |
| ascii::is_ascii::unaligned_both_medium::case00_libcore | 7500 | 3333 | -55.56 |
| ascii::is_ascii::unaligned_both_long::case00_libcore | 174700 | 436750 | +150.00 |
2025-11-02 20:21:01 +01:00
Matthias Krüger
fa4b841aea
Rollup merge of #146573 - Randl:const-range, r=Mark-Simulacrum
...
Constify Range functions
Constify various `Range` traits, functions, and implementations
2025-11-02 20:21:00 +01:00
Jakub Beránek
f0ff861dca
Generalize branch references to HEAD
2025-11-02 11:15:55 +01:00
bors
cabc77db72
Auto merge of #147784 - nxsaken:div_exact_return_option, r=dtolnay
...
Return `Option` from `exact_div` and inherit overflow checks
According to https://github.com/rust-lang/rust/issues/139911#issuecomment-3404056127 , `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release).
rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
2025-11-02 08:05:11 +00:00
A4-Tacks
c9d7a8aaf2
Fix missing other assoc items for generate_blanket_trait_impl
...
- And migrate `edit_in_place::Indent` to `edit::AstNodeEdit`,
because edit_in_place use ted
Example
---
```rust
trait $0Foo<T: Send> {
type X: Sync;
fn foo(&self, x: Self::X) -> T;
fn print_foo(&self) {
println!("{}", self.foo());
}
}
```
**Before this PR**
```rust
impl<T: Send, T1: ?Sized> Foo<T> for $0T1 {
fn foo(&self, x: Self::X) -> T {
todo!()
}
}
```
**After this PR**
```rust
impl<T: Send, T1: ?Sized> Foo<T> for $0T1 {
type X: Sync;
fn foo(&self, x: Self::X) -> T {
todo!()
}
}
```
2025-11-02 13:35:54 +08:00
Shoyu Vanilla (Flint)
bacc5bbd30
Merge pull request #20920 from ShoyuVanilla/target-dirs
...
fix: Resolve `target-dir` more precisely
2025-11-03
2025-11-02 05:17:40 +00:00
Chayim Refael Friedman
fca718c0f2
Merge pull request #20956 from ChayimFriedman2/fix-dhat
...
minor: Fix building with DHAT
2025-11-01 16:58:53 +00:00
Chayim Refael Friedman
c85e57e9b6
Fix building with DHAT
...
Maybe we need to check it on CI?
2025-11-01 18:50:01 +02:00
bors
9a0fa0995f
Auto merge of #144420 - Qelxiros:smart_pointer_try_map, r=joboet
...
smart pointer (try_)map
Tracking issue: rust-lang/rust#144419
2025-10-31 17:09:47 +00:00
Shoyu Vanilla (Flint)
2e2e3ebec9
Merge pull request #20927 from ChayimFriedman2/dhat
...
feat: Support memory profiling with dhat
2025-10-31 07:08:23 +00:00
bors
0efb2e9291
Auto merge of #148157 - nnethercote:undo-chain, r=saethlin
...
Adjust successor iterators.
Because rust-lang/rust#148054 was a slight perf regression.
The problem was seemingly because this iterator structure:
```
slice_iter.chain(Option_iter.chain(Option_iter))
```
changed to this:
```
slice_iter.chain(Option_iter).chain(Option_iter)
```
The commit also tweaks the `slice_iter` part, changing `into_iter` to `iter` and using `[]` instead of `(&[])`, for conciseness and consistency.
r? `@saethlin`
2025-10-31 05:12:24 +00:00
Shoyu Vanilla (Flint)
2eb0008829
Merge pull request #20945 from jhpratt/master
...
Fix typos, backtick errors/omissions
2025-10-31 04:50:53 +00:00
Jacob Pratt
ea9a188f1e
Fix typos, backtick errors/omissions
2025-10-31 00:41:27 -04:00
Shoyu Vanilla (Flint)
f7de8ae045
Merge pull request #20942 from ShoyuVanilla/frontmatter-err
...
fix: Do not make false positive syntax errors on frontmatter
2025-10-30 18:36:45 +00:00
Shoyu Vanilla
3d636a6ca6
fix: Do not make false positive syntax errors on frontmatter
2025-10-31 00:45:26 +09:00
Lukas Wirth
00ace813d3
Merge pull request #20366 from Veykril/push-lmmtrpptrxom
...
minor: Cleanup `map_rust_child_diagnostics` a bit
2025-10-30 10:59:06 +00:00
bors
fec84fbdf3
Auto merge of #148093 - Azzybana:master, r=nnethercote
...
perf: removed unnecessary let for return only in layout.rs
perf: removed unnecessary let for return only
2025-10-29 15:37:05 +00:00
Lukas Wirth
823d7197a0
minor: Cleanup map_rust_child_diagnostics a bit
2025-10-29 13:12:21 +01:00
Lukas Wirth
769ebafdc6
Merge pull request #20934 from Veykril/veykril/push-qtzmsqkzntpo
...
fix: Improve error recovery when parsing malformed function return types
2025-10-29 12:10:01 +00:00
Lukas Wirth
47c5af2f16
fix: Improve error recovery when parsing malformed function return types
2025-10-29 12:33:35 +01:00
Chayim Refael Friedman
d08d54f3c1
Merge pull request #20931 from SomeoneToIgnore/async-signature
...
Show proper async function signatures in the signature help
2025-10-28 21:21:45 +00:00