| Age | Commit message (Collapse) | Author | Lines |
|
Simplify `use crate::rustc_foo::bar` occurrences.
They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)
r? ``@eholk``
|
|
Generic `NonZero` post-stabilization changes.
Tracking issue: https://github.com/rust-lang/rust/issues/120257
r? ``@dtolnay``
|
|
Remove braces when fixing a nested use tree into a single item
[Back in 2019](https://github.com/rust-lang/rust/pull/56645) I added rustfix support for the `unused_imports` lint, to automatically remove them when running `cargo fix`. For the most part this worked great, but when removing all but one childs of a nested use tree it turned `use foo::{Unused, Used}` into `use foo::{Used}`. This is slightly annoying, because it then requires you to run `rustfmt` to get `use foo::Used`.
This PR automatically removes braces and the surrouding whitespace when all but one child of a nested use tree are unused. To get it done I had to add the span of the nested use tree to the AST, and refactor a bit the code I wrote back then.
A thing I noticed is, there doesn't seem to be any `//@ run-rustfix` test for fixing the `unused_imports` lint. I created a test in `tests/suggestions` (is that the right directory?) that for now tests just what I added in the PR. I can followup in a separate PR to add more tests for fixing `unused_lints`.
This PR is best reviewed commit-by-commit.
|
|
Implement non-null pointer for malloc(0)
Use non-null pointer for malloc(0) as mentioned in #3576 to detect leaks and double free of ``malloc(0)`` addresses.
|
|
|
|
|
|
|
|
|
|
io::Error handling: keep around the full io::Error for longer so we can give better errors
This should help with the error message in https://github.com/rust-lang/miri/issues/3587.
|
|
better errors
|
|
|
|
|
|
Currently, we are working on the python removal task on bootstrap. Which means
we have to extract some data from the stage0 file using shell scripts. However,
parsing values from the stage0.json file is painful because shell scripts don't
have a built-in way to parse json files.
This change simplifies the stage0 file format to key-value pairs, which makes
it easily readable from any environment.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
They can just be written as `use rustc_foo::bar`, which is far more
standard. (I didn't even know that a `crate::` prefix was valid.)
|
|
|
|
|
|
|
|
|
|
rustdoc: dedup search form HTML
This change constructs the search form HTML using JavaScript, instead of plain HTML. It uses a custom element because
- the [parser]'s insert algorithm runs the connected callback synchronously, so we won't get layout jank
- it requires very little HTML, so it's a real win in size
[parser]: https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
This shrinks the standard library by about 60MiB, by my test.
There should be no visible changes. Just use less disk space.
|
|
Fix source_range for INT_NUMBER in completion
fix #17179.
Previously r-a use `TextRange::empty(self.position.offset)` as `source_range` for `INT_NUMBER`, so the `text_edit` would always be an insertion, which results in #17179.
This PR changed it by using `text_range` of `original_token` (same as `IDENT`).
|
|
|
|
|
|
|
|
|
|
Migrate `run-make/rustdoc-error-lines` to new `rmake.rs`
Part of https://github.com/rust-lang/rust/issues/121876.
There was a weird naming inconsistency with `input`/`output`. A few tests write `.arg("-o").arg(path)` and the `output` method was actually the command output. So instead, I renamed the original `output` into `command_output` so that I could create the `output` method with the expected effect (and updated the tests to use it too).
EDIT: The first two commits come from https://github.com/rust-lang/rust/pull/124711. Some weird things happened recently pparently. ^^'
r? `@jieyouxu`
|
|
|
|
Move some stdlib tests from `tests/ui` to `library/std/tests`
Related to #99417
|
|
organize libc tests into a proper folder, and run some of them on Windows
|
|
|
|
|
|
avoid code duplication between realloc and malloc
|
|
|
|
|
|
|
|
|
|
reduce test_dependencies
Also add comments for why we need all these 3 random functions for Windows, and the old Linux syscall interface.
|
|
also add some comments for why we keep certain old obscure APIs supported
|
|
the actual target-specific things we want to test are all in getrandom,
and rand already tests miri itself
|
|
|
|
Solaris: make pre-main code work
Fixes https://github.com/rust-lang/miri/issues/3566
|
|
|
|
|
|
Miri subtree update
r? `@ghost`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Stabilize exclusive_range_pattern (v2)
This PR is identical to #124459, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F).
r? ghost
Original PR description:
---
Stabilization report: https://github.com/rust-lang/rust/issues/37854#issuecomment-1842398130
FCP: https://github.com/rust-lang/rust/issues/37854#issuecomment-1872520294
Stabilization was blocked by a lint that was merged here: #118879
Documentation PR is here: rust-lang/reference#1484
`@rustbot` label +F-exclusive_range_pattern +T-lang
|