| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Before it was inserting whenever function field is found but it should
happend only in the case of function call.
|
|
|
|
variable name change for clearer usage indication
|
|
|
|
|
|
|
|
|
|
internal: bump triomphe to 0.1.10
|
|
|
|
|
|
|
|
|
|
update test for new LLVM 18 codegen
LLVM at HEAD now emits `or disjoint`: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/24076#018c1596-8153-488e-b622-951266a02f6c/741-774
|
|
Clean dead codes in miri
Detected by #118257
|
|
r=petrochenkov
Perform LTO optimisations with wasm-ld + -Clinker-plugin-lto
Fixes (partially) #60059. Technically, `--target wasm32-unknown-unknown -Clinker-plugin-lto` would complete without errors before, but it was not producing optimized code. At least, it may have been but it was probably not the opt-level people intended.
Similarly to #118377, this could benefit from a warning about using an explicit libLTO path with LLD, which will ignore it and use its internal LLVM. Especially given we always use lld on wasm targets. I left the code open to that possibility rather than making it perfectly neat.
|
|
r=clubby789
give dev-friendly error message for incorrect config profiles
before this change, an incorrect profile would result in the following error:
```sh
...
...
File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap
with open(include_path) as included_toml:
^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/defaults/config.aaaa.toml'
```
with this change, the error message is now:
```sh
...
...
File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap
raise Exception("Unrecognized profile '{}'. Check src/bootstrap/defaults"
Exception: Unrecognized profile 'aaaa'. Check src/bootstrap/defaults for available options.
```
|
|
unify read_to_end and io::copy impls for reading into a Vec
This ports over the initial probe (to avoid allocation) and the dynamic read sizing from the io::copy specialization to the `default_read_to_end` implementation which already had its own optimizations for different cases.
I think it should be a best-of-both now.
suggested by `@a1phyr` in https://github.com/rust-lang/rust/pull/117576#issuecomment-1803408492
|
|
Add missing period in `std::process::Command` docs
|
|
resolve: Feed the `def_kind` query immediately on `DefId` creation
Before this PR the def kind query required building HIR for no good reason, with this PR def kinds are instead assigned immediately when `DefId`s are created.
Some PRs previously refactored things to make all def kinds to be available early enough - https://github.com/rust-lang/rust/pull/118250, https://github.com/rust-lang/rust/pull/118272, https://github.com/rust-lang/rust/pull/118311.
|
|
|
|
|
|
Expand in-place iteration specialization to Flatten, FlatMap and ArrayChunks
This enables the following cases to collect in-place:
```rust
let v = vec![[0u8; 4]; 1024]
let v: Vec<_> = v.into_iter().flatten().collect();
let v: Vec<Option<NonZeroUsize>> = vec![NonZeroUsize::new(0); 1024];
let v: Vec<_> = v.into_iter().flatten().collect();
let v = vec![u8; 4096];
let v: Vec<_> = v.into_iter().array_chunks::<4>().collect();
```
Especially the nicheful-option-flattening should be useful in real code.
|
|
LLVM at HEAD now emits `or disjoint`: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/24076#018c1596-8153-488e-b622-951266a02f6c/741-774
|
|
|
|
|
|
separate function
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #115331 (optimize str::iter::Chars::advance_by)
- #118236 (Update mod comment)
- #118299 (Update `OnceLock` documentation to give a concrete 'lazy static' example, and expand on the existing example.)
- #118314 (Rename `{collections=>alloc}{tests,benches}`)
- #118341 (Simplify indenting in THIR printing)
- #118366 (Detect and reject malformed `repr(Rust)` hints)
- #118397 (Fix comments for unsigned non-zero `checked_add`, `saturating_add`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix comments for unsigned non-zero `checked_add`, `saturating_add`
While looking at #118313, I happened to notice that two of the expanded comments appear to be slightly inaccurate.
For these two methods, `other` is an ordinary unsigned integer, so it can be zero.
Since the sum of non-zero and zero is always non-zero, the safety argument holds even when `other` is zero.
|
|
r=compiler-errors
Detect and reject malformed `repr(Rust)` hints
Fixes #118334.
|
|
Simplify indenting in THIR printing
This cuts >100kb from a local librustc_driver.so build, and seems just obviously simpler.
|
|
Rename `{collections=>alloc}{tests,benches}`
The crate is named `alloc` so this makes more sense. Ig this is fallout from #42648?
|
|
Update `OnceLock` documentation to give a concrete 'lazy static' example, and expand on the existing example.
|
|
Update mod comment
The comment of `ASCII_CASE_MASK` on line 477 is `If 6th bit is set ascii is lower case.` but the original comment of `*self ^ ((self.is_ascii_lowercase() as u8) * ASCII_CASE_MASK)` was `Toggle the fifth bit if this is a lowercase letter`
|
|
optimize str::iter::Chars::advance_by
```
OLD:
str::iter::chars_advance_by_0001 0.00ns/iter +/- 0.00ns
str::iter::chars_advance_by_0010 13.00ns/iter +/- 1.00ns
str::iter::chars_advance_by_1000 1.20µs/iter +/- 15.00ns
NEW:
str::iter::chars_advance_by_0001 0.00ns/iter +/- 0.00ns
str::iter::chars_advance_by_0010 6.00ns/iter +/- 0.00ns
str::iter::chars_advance_by_1000 75.00ns/iter +/- 1.00ns
```
|