| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Make cargo test work for bootstrap self test
This PR enables the bootstrap self-test to run via cargo test. I have removed the detect_src_and_out test for now, but it will be reintroduced in a follow-up PR where all bootstrap tests will be migrated to use testCtx.
r? `@Kobzol`
try-job: aarch64-apple
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- rust-lang/rust#146283 (Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.)
- rust-lang/rust#146453 (Add general arm-linux.md platform doc.)
- rust-lang/rust#146991 (const_caller_location to use real Span instead of `DUMMY_SP`)
- rust-lang/rust#146994 (Add `clippy::unconditional_recursion` to `./x clippy ci`)
- rust-lang/rust#147038 (Rename verbosity functions in bootstrap)
- rust-lang/rust#147047 (rustdoc: put the toolbar on the all item index)
- rust-lang/rust#147049 (std: fix warning in VEXos stdio module)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
std: fix warning in VEXos stdio module
Fixes building `std` on the `armv7a-vex-v5` target due to an unnecessarily mutable argument in `Stdin`.
This was a stupid oversight on my part towards the end of rust-lang/rust#145973's review process. Missed a warning and had a bad bootstrap config that didn't tell me about it when testing changes.
|
|
rustdoc: put the toolbar on the all item index
|
|
Rename verbosity functions in bootstrap
Just a small cleanup, these function names have been bothering me for a while. I realized that we can delete some of them outright, rather than just renaming them.
r? ``@jieyouxu``
|
|
Add `clippy::unconditional_recursion` to `./x clippy ci`
The clippy lint catches some things that rustc's equivalent builtin lint
does not, for example rust-lang/rust#146940:
error: function cannot return without recursing
--> library/std/src/path.rs:3428:5
|
3428 | / fn eq(&self, other: &String) -> bool {
3429 | | self == &*other
3430 | | }
| |_____^
|
note: recursive call site
--> library/std/src/path.rs:3429:9
|
3429 | self == &*other
| ^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
= note: requested on the command line with `-D clippy::unconditional-recursion`
|
|
const_caller_location to use real Span instead of `DUMMY_SP`
Clarifying usage of DUMMY_SP
|
|
Add general arm-linux.md platform doc.
Adds a new page that covers all 32-bit Arm Linux systems. This means that we can reduce the amount of information required in the target specific pages to just the Tier level, the maintainer, and any specific details for that target.
I have no changed those pages yet, though. Let's start with this.
|
|
Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.
Introduces wrappers around `Cell` and `RefCell` that only allow mutation when we are not in speculative resolution. This is preparatory work for rust-lang/rust#145108.
It would allow us to make `ImportData` and `ModuleData` sync and send safe.
r? ``@petrochenkov``
|
|
Extended temporary argument to format_args!() in all cases
Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
|
|
|
|
remove incorrect fast path
Using `tcx.is_copy_modulo_regions` drops information from the current `typing_env`. Writing a regression test for this is really hard. We need to prove `Copy` of something that doesn't directly reference a coroutine or an opaque, but does so indirectly.
cc rust-lang/rust#146813.
|
|
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- rust-lang/rust#116882 (rustdoc: hide `#[repr]` if it isn't part of the public ABI)
- rust-lang/rust#135771 ([rustdoc] Add support for associated items in "jump to def" feature)
- rust-lang/rust#141032 (avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`)
- rust-lang/rust#142401 (Add proper name mangling for pattern types)
- rust-lang/rust#146293 (feat: non-panicking `Vec::try_remove`)
- rust-lang/rust#146859 (BTreeMap: Don't leak allocators when initializing nodes)
- rust-lang/rust#146924 (Add doc for `NonZero*` const creation)
- rust-lang/rust#146933 (Make `render_example_with_highlighting` return an `impl fmt::Display`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
|
|
Avoid invalidating CFG caches from MirPatch::apply.
Small effort to reduce invalidating CFG caches.
|
|
The clippy lint catches some things that rustc's equivalent builtin lint
does not, for example rust-lang/rust#146940:
error: function cannot return without recursing
--> library/std/src/path.rs:3428:5
|
3428 | / fn eq(&self, other: &String) -> bool {
3429 | | self == &*other
3430 | | }
| |_____^
|
note: recursive call site
--> library/std/src/path.rs:3429:9
|
3429 | self == &*other
| ^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
= note: requested on the command line with `-D clippy::unconditional-recursion`
|
|
|
|
|
|
r=GuillaumeGomez
Make `render_example_with_highlighting` return an `impl fmt::Display`
Removes some more usages of `write_str`. Shouldn't affect runtime, but makes the codebase a bit more consistent.
Each commit can be reviewed separately
|
|
Add doc for `NonZero*` const creation
I ran into trouble using `NonZero*` values because I didn’t see any clear way to create them at compile time. At first I ended up using `NonZero*::new_unchecked` a lot, until I realized that `Option::unwrap` and `Option::expect` are `const` and can be used in a `const` context. With that, you can create non-zero values at compile time safely, without touching `unsafe`. This wasn’t obvious to me and my peers who’ve been using Rust for a while, so I thought adding a note to the docs would make it easier for others to discover.
If this should be worded differently or placed in another location, we can do that. I just want to make this more obvious.
|
|
BTreeMap: Don't leak allocators when initializing nodes
Memory was allocated via `Box::leak` and thence intended to be tracked and deallocated manually, but the allocator was also leaked, not tracked, and never dropped. Now it is dropped immediately.
According to my reading of the `Allocator` trait, if a copy of the allocator remains live, then its allocations must remain live. Since the B-tree has a copy of the allocator that will only be dropped after the nodes, it's safe to not store the allocator in each node (which would be a much more intrusive change).
Fixes: rust-lang/rust#106203
|
|
feat: non-panicking `Vec::try_remove`
`if index < my_vector.len() { Some(my_vector.remove(index)) } else { None }` is annoying to write and non-panicking functions are broadly useful.
APC: https://github.com/rust-lang/libs-team/issues/649
Tracking issue: https://github.com/rust-lang/rust/issues/146954
|
|
Add proper name mangling for pattern types
requires adding demangler support first https://github.com/rust-lang/rustc-demangle/pull/81
needed for https://github.com/rust-lang/rust/pull/136006#discussion_r2139792593 as otherwise we will have symbol collisions
|
|
avoid violating `slice::from_raw_parts` safety contract in `Vec::extract_if`
The implementation of the `Vec::extract_if` iterator violates the safety contract adverized by `slice::from_raw_parts` by always constructing a mutable slice for the entire length of the vector even though that span of memory can contain holes from items already drained. The safety contract of `slice::from_raw_parts` requires that all elements must be properly
initialized.
As an example we can look at the following code:
```rust
let mut v = vec![Box::new(0u64), Box::new(1u64)];
for item in v.extract_if(.., |x| **x == 0) {
drop(item);
}
```
In the second iteration a `&mut [Box<u64>]` slice of length 2 will be constructed. The first slot of the slice contains the bitpattern of an already deallocated box, which is invalid.
This fixes the issue by only creating references to valid items and using pointer manipulation for the rest. I have also taken the liberty to remove the big `unsafe` blocks in place of targetted ones with a SAFETY comment. The approach closely mirrors the implementation of `Vec::retain_mut`.
**Note to reviewers:** The diff is easier to follow with whitespace hidden.
|
|
[rustdoc] Add support for associated items in "jump to def" feature
Fixes https://github.com/rust-lang/rust/issues/135485.
r? ``@fmease``
|
|
r=rustdoc
rustdoc: hide `#[repr]` if it isn't part of the public ABI
> [!IMPORTANT]
> Temporarily stacked on top of PR https://github.com/rust-lang/rust/pull/146527; only the last commit is relevant!
Follow-up to rust-lang/rust#115439.
Unblocks rust-lang/rust#116743, CC ``@dtolnay.``
Fixes rust-lang/rust#66401.
Fixes rust-lang/rust#128364.
Fixes rust-lang/rust#137440.
Only display the representation `#[repr(REPR)]` (where `REPR` is not `Rust` or `transparent`) of a given type if none of its variants (incl. the synthetic variants of structs) are `#[doc(hidden)]` and all of its fields are public and not `#[doc(hidden)]` since it's likely not meant to be considered part of the public ABI otherwise.
`--document-{private,hidden}-items` works as expected in this context, too.
Moreover, we now also factor in the presence of `#[doc(hidden)]` when checking whether to show `repr(transparent)` or not.
|
|
|
|
|
|
|
|
|
|
Eliminate a use of `map_or` in favor of a match.
Inline some variable definitions that don't add clarity, and that
prevent short-circuiting.
|
|
Rollup of 14 pull requests
Successful merges:
- rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns)
- rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const)
- rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`)
- rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization)
- rust-lang/rust#146735 (unstably constify float mul_add methods)
- rust-lang/rust#146737 (f16_f128: enable some more tests in Miri)
- rust-lang/rust#146766 (Add attributes for #[global_allocator] functions)
- rust-lang/rust#146905 (llvm: update remarks support on LLVM 22)
- rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`)
- rust-lang/rust#147005 (Small string formatting cleanup)
- rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`)
- rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool)
- rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`)
- rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Use `LLVMDisposeTargetMachine`
After bumping the minimum LLVM version to 20 (rust-lang/rust#145071), we no longer need to run any custom code when disposing of a TargetMachine, so we can just use the upstream LLVM-C function.
|
|
rustdoc: Fix documentation for `--doctest-build-arg`
In https://github.com/rust-lang/rust/pull/139863, I forgot to update the documentation.
Tracking issue: https://github.com/rust-lang/rust/issues/134172
|
|
bootstrap.py: Respect build.jobs while building bootstrap tool
On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
|
|
Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`
Although the examples below this list do imply that there's an impl of `ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list of default implementations.
|
|
r=jdonszelmann
Small string formatting cleanup
This PR is mostly useless. I was going through this file, saw that and corrected it. That's pretty much it. Feel free to close it if it's a bother.
|
|
Remove erroneous normalization step in `tests/run-make/linker-warning`
Fixes rust-lang/rust#146977.
r? bjorn3 or reassign
|
|
llvm: update remarks support on LLVM 22
LLVM change dfbd76bda01e removed separate remark support entirely, but
it turns out we can just drop the parameter and everything appears to
work fine.
Fixes rust-lang/rust#146912 as far as I can tell (the test passes.)
|