| Age | Commit message (Collapse) | Author | Lines |
|
gitignore: ignore ICE reports regardless of directory
Quite often when working on compiler I end up running into ICEs during the standard library compilation.
These ICEs generate reports in `/library/` and not at the root of the repo, so they aren't `gitignore`d.
I finally ended up committing one today, by accident: https://github.com/rust-lang/rust/pull/129487#event-14002067843
|
|
Fixing span manipulation and indentation of the suggestion introduced by #126187
According to comments:
https://github.com/rust-lang/rust/pull/128084#issuecomment-2295254576
https://github.com/rust-lang/rust/pull/126187/files#r1634897691
|
|
Use subtyping for `UnsafeFnPointer` coercion, too
I overlooked this in #129059, which changed MIR typechecking to use subtyping for other fn pointer coercions.
Fixes #129285
|
|
Rollup of 7 pull requests
Successful merges:
- #129091 (add Box::as_ptr and Box::as_mut_ptr methods)
- #129134 (bootstrap: improve error recovery flags to curl)
- #129416 (library: Move unstable API of new_uninit to new features)
- #129459 (handle stage0 `cargo` and `rustc` separately)
- #129487 (repr_transparent_external_private_fields: special-case some std types)
- #129511 (Update minifier to 0.3.1)
- #129523 (Make `rustc_type_ir` build on stable)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Make `rustc_type_ir` build on stable
This PR fixes a handful of issues that appear in `rustc_type_ir` when trying to build the new solver on stable.
r? ```@compiler-errors```
```@bors``` rollup
|
|
Update minifier to 0.3.1
It adds support for escaped characters.
PR is https://github.com/GuillaumeGomez/minifier-rs/pull/111.
r? ````@notriddle````
|
|
GrigorenkoPV:repr_transparent_external_private_fields, r=compiler-errors
repr_transparent_external_private_fields: special-case some std types
Fixes #129470
```@rustbot``` label +A-lint +L-repr_transparent_external_private_fields
|
|
handle stage0 `cargo` and `rustc` separately
This change allows setting either `build.cargo` or `build.rustc` without requiring both to be set simultaneously, which was not possible previously.
To try it, set `build.rustc` without setting `build.cargo`, and try to bootstrap on clean build.
Blocker for https://github.com/rust-lang/rust/pull/129152
|
|
r=dtolnay
library: Move unstable API of new_uninit to new features
- `new_zeroed` variants move to `new_zeroed_alloc`
- the `write` fn moves to `box_uninit_write`
The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
|
|
bootstrap: improve error recovery flags to curl
alternative to #128459
fixes #110178
r? ````@Kobzol````
|
|
add Box::as_ptr and Box::as_mut_ptr methods
Unstably implements https://github.com/rust-lang/libs-team/issues/355. Tracking issue: https://github.com/rust-lang/rust/issues/129090.
r? libs-api
|
|
Build `library/profiler_builtins` from `ci-llvm` if appropriate
Running all of `tests/coverage` requires the LLVM profiler runtime, which requires setting `build.profiler = true`.
Historically, doing that has required checking out the entire `src/llvm-project` submodule. For compiler contributors who otherwise don't need that submodule (thanks to `download-ci-vm`), that's quite inconvenient.
However, thanks to #129116, the downloaded CI LLVM tarball now contains a copy of LLVM's `compiler-rt` directory, which includes all the files needed to build the profiler runtime. So with a little bit of extra logic in bootstrap, we can have `library/profiler_builtins` look for the `compiler-rt` files in `ci-llvm` instead of the `src/llvm-project` submodule.
|
|
According to comments:
https://github.com/rust-lang/rust/pull/128084#issuecomment-2295254576
https://github.com/rust-lang/rust/pull/126187/files#r1634897691
|
|
Clippy subtree update
r? `@Manishearth`
|
|
|
|
Rollup of 9 pull requests
Successful merges:
- #128596 (stabilize const_fn_floating_point_arithmetic)
- #129199 (make writes_through_immutable_pointer a hard error)
- #129246 (Retroactively feature gate `ConstArgKind::Path`)
- #129290 (Pin `cc` to 1.0.105)
- #129323 (Implement `ptr::fn_addr_eq`)
- #129500 (remove invalid `TyCompat` relation for effects)
- #129501 (panicking: improve hint for Miri's RUST_BACKTRACE behavior)
- #129505 (interpret: ImmTy: tighten sanity checks in offset logic)
- #129510 (Fix `elided_named_lifetimes` in code)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Rollup of 10 pull requests
Successful merges:
- #128467 (Detect `*` operator on `!Sized` expression)
- #128524 (Don't suggest turning crate-level attributes into outer style)
- #128735 (Add a special case for `CStr`/`CString` in the `improper_ctypes` lint)
- #129429 (Print the generic parameter along with the variance in dumps.)
- #129430 (rustdoc: show exact case-sensitive matches first)
- #129449 (Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods)
- #129481 (Update `compiler_builtins` to `0.1.121`)
- #129482 (Add myself to the review rotation for libs)
- #129492 (Make wasm32 platform support docs easier to read)
- #129512 (update the doc comment on lintchecker b/c it parses html now)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
update the doc comment on lintchecker b/c it parses html now
|
|
Make wasm32 platform support docs easier to read
|
|
Add myself to the review rotation for libs
I am feeling better, and my new job gives me some time to do this.
|
|
Update `compiler_builtins` to `0.1.121`
To pick up https://github.com/rust-lang/compiler-builtins/pull/673 and unblock https://github.com/rust-lang/rust/pull/129403
r? tgross35
|
|
Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods
Tracking issue: #86918
Based on the suggestion in https://github.com/rust-lang/rust/issues/86918#issuecomment-2189367582
> Some advantages:
>
> * Synergy with the existing `as_ref` and `as_mut` signatures (stable since Rust 1.33)
>
> * Lifetime elision reduces noise in the signature
>
> * Turbofish less verbose: `Pin::<&mut T>::as_deref_mut` vs `Pin::<&mut Pin<&mut T>>::as_deref_mut`
The comment seemed to imply that `Pin::as_ref` and `Pin::as_mut` already share an impl block, which they don't. So, I rearranged it so that they do, and we can see which looks better in the docs.
<details><summary><b>Docs screenshots</b></summary>
Current nightly:

`Pin::as_deref_mut` moved into the same block as `as_mut`:

`Pin::as_ref`, `as_mut`, and `as_deref_mut` all in the same block:

</details>
I think I like the last one the most; obviously I'm biased since I'm the one who rearranged it, but it doesn't make sense to me to have `as_ref` methods split up by an `into_inner` method.
r? dtolnay
|
|
rustdoc: show exact case-sensitive matches first
fixes #119480
|
|
Print the generic parameter along with the variance in dumps.
This allows to make sure we are testing what we think we are testing.
While the tests are correct, I discovered that opaque duplicated args are in the reverse declaration order.
|
|
Add a special case for `CStr`/`CString` in the `improper_ctypes` lint
Revives #120176. Just needed to bless a test and fix an argument, but seemed reasonable to me otherwise.
Instead of saying to "consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct", we now tell users to "Use `*const ffi::c_char` instead, and pass the value from `CStr::as_ptr()`" when the type involved is a `CStr` or a `CString`.
The suggestion is not made for `&mut CString` or `*mut CString`.
r? ``````@cjgillot`````` (since you were the reviewer of the original PR #120176, but feel free to reroll)
|
|
chenyukang:yukang-fix-127930-invalid-outer-style-sugg, r=cjgillot
Don't suggest turning crate-level attributes into outer style
Fixes #127930
|
|
Detect `*` operator on `!Sized` expression
The suggestion is new:
```
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9
|
LL | let x = *"";
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= note: all local variables must have a statically known size
= help: unsized locals are gated as an unstable feature
help: references to `!Sized` types like `&str` are `Sized`; consider not dereferencing the expression
|
LL - let x = *"";
LL + let x = "";
|
```
Fix #128199.
|
|
|
|
|
|
Rustup
r? ghost
changelog: none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix `elided_named_lifetimes` in code
https://github.com/rust-lang/rust/pull/129207#issuecomment-2308428671
r? cjgillot
|
|
interpret: ImmTy: tighten sanity checks in offset logic
Also make some debug assertions into assertions. (Will need to be perf'd.)
|
|
panicking: improve hint for Miri's RUST_BACKTRACE behavior
Should help with https://github.com/rust-lang/miri/issues/3838
|
|
remove invalid `TyCompat` relation for effects
if the current impl uses `Maybe` (`impl const`), the parent impl must use `Maybe` (`impl const`) as well.
I'd like to rename `TyCompat` to `Sub` which is probably clearer. But it would conflict with my other PR.
r? ``@rust-lang/project-const-traits``
|
|
Implement `ptr::fn_addr_eq`
This PR implements https://github.com/rust-lang/libs-team/issues/323: `ptr::fn_addr_eq`.
r? libs
|
|
Pin `cc` to 1.0.105
`cc` 1.0.106 removes support for Visual Studio 12. Pin to 1.0.105 so we don't drop support yet.
Fixes: https://github.com/rust-lang/rust/pull/128722#issuecomment-2297605573
|
|
Retroactively feature gate `ConstArgKind::Path`
This puts the lowering introduced by #125915 under a feature gate until we fix the regressions introduced by it. Alternative to whole sale reverting the PR since it didn't seem like a very clean revert and I think this is generally a step in the right direction and don't want to get stuck landing and reverting the PR over and over :)
cc #129137 ``@camelid,`` tests taken from there. beta is branching soon so I think it makes sense to not try and rush that fix through since it wont have much time to bake and if it has issues we can't simply revert it on beta.
Fixes #128016
|
|
r=compiler-errors
make writes_through_immutable_pointer a hard error
This turns the lint added in https://github.com/rust-lang/rust/pull/118324 into a hard error. This has been reported in cargo's future-compat reports since Rust 1.76 (released in February). Given that const_mut_refs is still unstable, it should be impossible to even hit this error on stable: we did accidentally stabilize some functions that can cause this error, but that got reverted in https://github.com/rust-lang/rust/pull/117905. Still, let's do a crater run just to be sure.
Given that this should only affect unstable code, I don't think it needs an FCP, but let's Cc ``@rust-lang/lang`` anyway -- any objection to making this unambiguous UB into a hard error during const-eval? This can be viewed as part of https://github.com/rust-lang/rust/pull/129195 which is already nominated for discussion.
|
|
r=nnethercote
stabilize const_fn_floating_point_arithmetic
Part of https://github.com/rust-lang/rust/issues/128288
Fixes https://github.com/rust-lang/rust/issues/57241
The existing test `tests/ui/consts/const_let_eq_float.rs` ([link](https://github.com/RalfJung/rust/blob/const_fn_floating_point_arithmetic/tests/ui/consts/const_let_eq_float.rs)) covers the basics, and also Miri has extensive tests covering the interpreter's float machinery. Also, that machinery can already be used on stable inside `const`/`static` initializers, just not inside `const fn`.
This was explicitly called out in https://github.com/rust-lang/rfcs/pull/3514 so in a sense t-lang just recently already FCP'd this, but let's hear from them whether they want another FCP for the stabilization here or whether that was covered by the FCP for the RFC.
Cc ``@rust-lang/lang``
### Open items
- [x] Update the Reference: https://github.com/rust-lang/reference/pull/1566
|
|
types as local
|
|
|
|
|
|
|
|
|