| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Perfetto gives an error if an id does not fit in an 64-bit signed integer in 2's complement.
|
|
|
|
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: b56aaec52bc0fa35591a872fb4aac81f606e265c
Filtered ref: 12f5e3255df658296af9fc953d8c1ab79ba91ea3
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to b56aaec52bc0fa35591a872fb4aac81f606e265c.
|
|
Add ide-assist: generate_impl_trait for generate_impl
|
|
Rustc pull update
|
|
And add assert_eq, assert_ne, assert_matches support
Input:
```rust
pub fn $0foo(x: bool) {
debug_assert!(x);
}
```
Old:
```rust
/// .
///
/// # Panics
///
/// Panics if .
pub fn foo(x: bool) {
debug_assert!(x);
}
```
This PR fixes:
```rust
/// .
pub fn foo(x: bool) {
debug_assert!(x);
}
```
|
|
|
|
collapsed links and reference links have a pretty particular syntax,
it seems unlikely they would show up on accident.
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
|
|
this is in an effort to reduce the amount of code churn caused by
this lint triggering on text that was never meant to be a link.
a more principled hierustic for ignoring lints is not possible
without extensive changes, due to the lint emitting code
being so far away from the link collecting code,
and the fact that only the link collecting code
has access to details about how the link appears in the
unnormalized markdown.
|
|
rustdoc will not try to do intra-doc linking if the "path"
of a link looks too much like a "real url".
however, only inline links ([text](url)) can actually contain
a url, other types of links (reference links, shortcut links)
contain a *reference* which is later resolved to an actual url.
the "path" in this case cannot be a url, and therefore it should
not be skipped due to looking like a url.
Co-authored-by: Michael Howell <michael@notriddle.com>
|
|
|
|
r=GuillaumeGomez
rustdoc: avoid allocating a temp String for aliases in search index
Here's the optimization I talked about in https://github.com/rust-lang/rust/pull/143988#discussion_r2208524163
I got around the Serialize issue using the newtype pattern. The wrapper type could be factored out into a helper that would work with anything that impls `AsRef<&str>`, but I'm not sure if that would be helpful anywhere else.
r? ``````@GuillaumeGomez``````
|
|
pass build.npm from bootstrap to tidy and use it for npm install
followup to rust-lang/rust#142924
r? ```@Kobzol```
|
|
Use serde for target spec json deserialize
The previous manual parsing of `serde_json::Value` was a lot of complicated code and extremely error-prone. It was full of janky behavior like sometimes ignoring type errors, sometimes erroring for type errors, sometimes warning for type errors, and sometimes just ICEing for type errors (the icing on the top).
Additionally, many of the error messages about allowed values were out of date because they were in a completely different place than the FromStr impls. Overall, the system caused confusion for users.
I also found the old deserialization code annoying to read. Whenever a `key!` invocation was found, one had to first look for the right macro arm, and no go to definition could help.
This PR replaces all this manual parsing with a 2-step process involving serde.
First, the string is parsed into a `TargetSpecJson` struct. This struct is a 1:1 representation of the spec JSON. It already parses all the enums and is very simple to read and write.
Then, the fields from this struct are copied into the actual `Target`. The reason for this two-step process instead of just serializing into a `Target` is because of a few reasons
1. There are a few transformations performed between the two formats
2. The default logic is implemented this way. Otherwise all the default field values would have to be spelled out again, which is suboptimal. With this logic, they fall out naturally, because everything in the json struct is an `Option`.
Overall, the mapping is pretty simple, with the vast majority of fields just doing a 1:1 mapping that is captured by two macros. I have deliberately avoided making the macros generic to keep them simple.
All the `FromStr` impls now have the error message right inside them, which increases the chance of it being up to date. Some "`from_str`" impls were turned into proper `FromStr` impls to support this.
The new code is much less involved, delegating all the JSON parsing logic to serde, without any manual type matching.
This change introduces a few breaking changes for consumers. While it is possible to use this format on stable, it is very much subject to change, so breaking changes are expected. The hope is also that because of the way stricter behavior, breaking changes are easier to deal with, as they come with clearer error messages.
1. Invalid types now always error, everywhere. Previously, they would sometimes error, and sometimes just be ignored (which meant the users JSON was still broken, just silently!)
2. This now makes use of `deny_unknown_fields` instead of just warning on unused fields, which was done previously. Serde doesn't make it easy to get such warning behavior, which was the primary reason that this now changed. But I think error behavior is very reasonable too. If someone has random stale fields in their JSON, it is likely because these fields did something at some point but no longer do, and the user likely wants to be informed of this so they can figure out what to do.
This is also relevant for the future. If we remove a field but someone has it set, it probably makes sense for them to take a look whether they need this and should look for alternatives, or whether they can just delete it. Overall, the JSON is made more explicit.
This is the only expected breakage, but there could also be small breakage from small mistakes. All targets roundtrip though, so it can't be anything too major.
fixes rust-lang/rust#144153
|
|
don't link to the nightly version of the Edition Guide in stable lints
As reported in rust-lang/rust#143557 for `rust_2024_incompatible_pat`, most future-Edition-incompatibility lints link to the nightly version of the Edition Guide; the lints were written before their respective Editions (and their guides) stabilized. But now that Rusts 2021 and 2024 are stable, these lints are emitted on stable versions of the compiler, where it makes more sense to present users with links that don't say "nightly" in them.
This does not change the link for `rust_2024_incompatible_pat`. That's handled in rust-lang/rust#144006.
|
|
* Fix riscv testing. Previously the mod tests; would be looking for
src/detect/os/tests.rs.
* Replace a test with an unnamed const item. It is testing that no
warnings are emitted. It doesn't contain any checks that need to run
at runtime. Replacing the test allows removing the tidy:skip directive
for test locations.
|
|
|
|
We lost the following comment during refactorings:
The current code for niche-filling relies on variant indices instead of actual discriminants, so enums with explicit discriminants (RFC 2363) would misbehave.
|
|
Make it clearer where unit tests are allowed and restrict standard
library unit tests inside the same package to std_detect, std and test.
|
|
|
|
Input:
```rust
struct Foo;
impl F$0oo {
pub fn a_func() -> Option<()> {
Some(())
}
}
```
Old:
```rust
struct Foo;
trait NewTrait {
fn a_func() -> Option<()>;
}
impl NewTrait for Foo {
fn a_func() -> Option<()> {
Some(())
}
}
```
This PR fixed:
```rust
struct Foo;
trait NewTrait {
fn a_func() -> Option<()>;
}
impl NewTrait for Foo {
fn a_func() -> Option<()> {
Some(())
}
}
```
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: efd420c770bb179537c01063e98cb6990c439654
Filtered ref: d11dbbb02905535a89393e80c24274bee81fa928
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to efd420c770bb179537c01063e98cb6990c439654.
|
|
Create an `AllocId` for `ConstValue::Slice`.
This PR modifies `ConstValue::Slice` to use an `AllocId` instead of directly manipulating the allocation. This was originally proposed by https://github.com/rust-lang/rust/pull/115764 but was a perf regression.
Almost 2 years later, enough code has changed to make this a perf improvement: https://github.com/rust-lang/rust/pull/116707#issuecomment-3067158777
|
|
|
|
|
|
Enforce that PR CI jobs are a subset of Auto CI jobs modulo carve-outs
### Background
Currently, it is possible for a PR with red PR-only CI to pass Auto CI, then all subsequent PR CI runs will be red until that is fixed, even in completely unrelated PRs. For instance, this happened with PR-CI-only Spellcheck (rust-lang/rust#144183).
See more discussions at [#t-infra > Spellcheck workflow now fails on all PRs (tree bad?)](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Spellcheck.20workflow.20now.20fails.20on.20all.20PRs.20.28tree.20bad.3F.29/with/529769404).
### CI invariant: PR CI jobs are a subset of Auto CI jobs modulo carve-outs
To prevent red PR CI in completely unrelated subsequent PRs and PR CI runs, we need to maintain an invariant that **PR CI jobs are a subset of Auto CI jobs modulo carve-outs**.
This is **not** a "strict" subset relationship: some jobs necessarily have to differ under PR CI and Auto CI environments, at least in the current setup. Still, we can try to enforce a weaker "subset modulo carve-outs" relationship between CI jobs and their corresponding Auto jobs. For instance:
- `x86_64-gnu-tools` will have `auto`-only env vars like `DEPLOY_TOOLSTATES_JSON: toolstates-linux.json`.
- `tidy` will want to `continue_on_error: true` in PR CI to allow for more "useful" compilation errors to also be reported, whereas it should be `continue_on_error: false` in Auto CI to prevent wasting Auto CI resources.
The **carve-outs** are:
1. `env` variables.
2. `continue_on_error`.
We enforce this invariant through `citool`, so only affects job definitions that are handled by `citool`. Notably, this is not sufficient *alone* to address the CI-only Spellcheck issue (rust-lang/rust#144183). To carry out this enforcement, we modify `citool` to auto-register PR jobs as Auto jobs with `continue_on_error` overridden to `false` **unless** there's an overriding Auto job for the PR job of the same name that only differs by the permitted **carve-outs**.
### Addressing the Spellcheck PR-only CI issue
Note that Spellcheck currently does not go through `citool` or `bootstrap`, and is its own GitHub Actions workflow. To actually address the PR-CI-only Spellcheck issue (rust-lang/rust#144183), and carry out the subset-modulo-carve-outs enforcement universally, this PR additionally **removes the current Spellcheck implementation** (a separate GitHub Actions Workflow). That is incompatible with Homu unless we do some hacks in the main CI workflow.
This effectively partially reverts rust-lang/rust#134006 (the separate workflow part, not the tidy extra checks component), but is not prejudice against relanding the `typos`-based spellcheck in another implementation that goes through the usual bootstrap CI workflow so that it does work with Homu. The `typos`-based spellcheck seems to have a good false-positive rate.
Closes rust-lang/rust#144183.
---
r? infra-ci
|
|
Use `josh-sync` instead of `miri-script` for Josh synchronization
|
|
|
|
|
|
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
|
|
Rollup of 9 pull requests
Successful merges:
- rust-lang/rust#144173 (Remove tidy checks for `tests/ui/issues/`)
- rust-lang/rust#144234 (Fix broken TLS destructors on 32-bit win7)
- rust-lang/rust#144239 (Clean `rustc/parse/src/lexer` to improve maintainability)
- rust-lang/rust#144256 (Don't ICE on non-TypeId metadata within TypeId)
- rust-lang/rust#144290 (update tests/ui/SUMMARY.md)
- rust-lang/rust#144292 (mbe: Use concrete type for `get_unused_rule`)
- rust-lang/rust#144298 (coverage: Enlarge empty spans during MIR instrumentation, not codegen)
- rust-lang/rust#144311 (Add powerpc64le-unknown-linux-musl to CI rustc targets)
- rust-lang/rust#144315 (bootstrap: add package.json and package-lock.json to dist tarball)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
`macos-13` is going away soonish.
|
|
|
|
minor: Fix Cargo.lock
|
|
|
|
The dependency of `xtask` on `time` was mistakenly removed.
|
|
Change rename self to parameter use `Self` type
|
|
|
|
bootstrap: add package.json and package-lock.json to dist tarball
this ensures that js-related tests can still be run from within such a dist tarball.
followup to rust-lang/rust#142924
r? ```````@Kobzol```````
|
|
Add powerpc64le-unknown-linux-musl to CI rustc targets
I missed this in the promotion to tier 2 with host tools.
|
|
Remove tidy checks for `tests/ui/issues/`
r? ``````````@jieyouxu``````````
As it is making cleanup efforts more difficult.
This change was discussed here [#t-compiler > Discussion for ui test suite improvements @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Discussion.20for.20ui.20test.20suite.20improvements/near/529566433)
|
|
internal: Remove `ExpressionStoreDiagnostics::MacroError`, instead recreate it from the `MacroCallId`
|
|
Ports `#[macro_use]` and `#[macro_escape]` to the new attribute parsing infrastructure
Ports `#[macro_use]` and `#[macro_escape]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163
r? `@jdonszelmann` `@oli-obk`
|
|
the `MacroCallId`
This simplifies the code and also makes us report parse error in macros too.
|
|
|