| Age | Commit message (Collapse) | Author | Lines |
|
Update chalk
|
|
|
|
|
|
|
|
Remove `token::{Open,Close}Delim`
By replacing them with `{Open,Close}{Param,Brace,Bracket,Invisible}`.
PR #137902 made `ast::TokenKind` more like `lexer::TokenKind` by
replacing the compound `BinOp{,Eq}(BinOpToken)` variants with fieldless
variants `Plus`, `Minus`, `Star`, etc. This commit does a similar thing
with delimiters. It also makes `ast::TokenKind` more similar to
`parser::TokenType`.
This requires a few new methods:
- `TokenKind::is_{,open_,close_}delim()` replace various kinds of
pattern matches.
- `Delimiter::as_{open,close}_token_kind` are used to convert
`Delimiter` values to `TokenKind`.
Despite these additions, it's a net reduction in lines of code. This is
because e.g. `token::OpenParen` is so much shorter than
`token::OpenDelim(Delimiter::Parenthesis)` that many multi-line forms
reduce to single line forms. And many places where the number of lines
doesn't change are still easier to read, just because the names are
shorter, e.g.:
```
- } else if self.token != token::CloseDelim(Delimiter::Brace) {
+ } else if self.token != token::CloseBrace {
```
r? `@petrochenkov`
|
|
|
|
Rollup of 11 pull requests
Successful merges:
- #134213 (Stabilize `naked_functions`)
- #139711 (Hermit: Unify `std::env::args` with Unix)
- #139795 (Clarify why SGX code specifies linkage/symbol names for certain statics)
- #140036 (Advent of `tests/ui` (misc cleanups and improvements) [4/N])
- #140047 (remove a couple clones)
- #140052 (Fix error when an intra doc link is trying to resolve an empty associated item)
- #140074 (rustdoc-json: Improve test for auto-trait impls)
- #140076 (jsondocck: Require command is at start of line)
- #140107 (rustc-dev-guide subtree update)
- #140111 (cleanup redundant pattern instances)
- #140118 ({B,C}Str: minor cleanup)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
jsondocck: Require command is at start of line
In one place we use `///``@``` instead of `//``@`.`` The test-runner allowed it, but it probably shouldn't. Ran into by ``@lolbinarycat`` in https://github.com/rust-lang/rust/pull/132748#issuecomment-2816469322:
```
error: unknown disambiguator `?(`
##[error] --> /checkout/tests/rustdoc-json/fns/return_type_alias.rs:3:25
|
3 | ///@ set foo = "$.index[?(``@.name=='Foo')].id"``
| ^^
|
```
Maybe it's also worth erroring on this like we added in #137103
r? ``@GuillaumeGomez``
|
|
Use `output_base_dir` for `mir_dump_dir`
It just occurred to me that the problem might be due to multiple revisions using the same dump directory (and therefore deleting the other revision's dir). This fixes that by simply using the normal per-test output directory, which is revision safe.
|
|
docs(LocalKey<T>): clarify that T's Drop shouldn't panic
Clarify that should a TLS destructor panics, the process will abort.
Also, an abort may be obfuscated as the process can be terminated with `SIGSEGV` or [`STATUS_STACK_BUFFER_OVERRUN`](https://devblogs.microsoft.com/oldnewthing/20190108-00/?p=100655) (i.e., `SIGABRT` is not guaranteed), so explicitly prints that the process was aborted.
Context:
https://users.rust-lang.org/t/status-stack-buffer-overrun-on-windows-without-any-usage-of-unsafe/128417
``@rustbot`` label -T-compiler
|
|
|
|
`HygieneId` fits into `Binding`'s padding.
|
|
internal: Make predefined symbols `const` instead of `static`
|
|
Add semicolon to use
|
|
allow using `null` to unset an environment variable
|
|
feat: Parse generic consts
|
|
Weekly `cargo update`
Automation to keep dependencies in `Cargo.lock` current.
The following is the output from `cargo update`:
```txt
compiler & tools dependencies:
Locking 11 packages to latest compatible versions
Updating bstr v1.11.3 -> v1.12.0
Updating clap v4.5.35 -> v4.5.36
Updating clap_builder v4.5.35 -> v4.5.36
Updating crossbeam-channel v0.5.14 -> v0.5.15
Updating jiff v0.2.5 -> v0.2.6
Updating jiff-static v0.2.5 -> v0.2.6
Updating jsonpath-rust v1.0.0 -> v1.0.1
Updating linux-raw-sys v0.9.3 -> v0.9.4
Updating miniz_oxide v0.8.7 -> v0.8.8
Updating self_cell v1.1.0 -> v1.2.0
Updating winnow v0.7.4 -> v0.7.6
note: pass `--verbose` to see 38 unchanged dependencies behind latest
library dependencies:
Locking 1 package to latest compatible version
Updating miniz_oxide v0.8.7 -> v0.8.8
note: pass `--verbose` to see 4 unchanged dependencies behind latest
rustbook dependencies:
Locking 9 packages to latest compatible versions
Updating bstr v1.11.3 -> v1.12.0
Updating cc v1.2.18 -> v1.2.19
Updating clap v4.5.35 -> v4.5.36
Updating clap_builder v4.5.35 -> v4.5.36
Updating jiff v0.2.5 -> v0.2.6
Updating jiff-static v0.2.5 -> v0.2.6
Updating linux-raw-sys v0.9.3 -> v0.9.4
Updating miniz_oxide v0.8.7 -> v0.8.8
Updating winnow v0.7.4 -> v0.7.6
```
|
|
feat: parse `super let`
|
|
minor: simplify and enhance notable traits rendering
|
|
feat: Allow unsetting env vars in `server.extraEnv` config
|
|
|
|
|
|
|
|
|
|
|
|
This backs out commit 8497fc321cad420b923e15f600106f8e22324930.
|
|
This is necessary to correctly handle nested fields (`foo.bar`), see the comments in the code for explanation.
|
|
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
|
|
Make them all `const`.
|
|
A lang team experiment, https://github.com/rust-lang/rust/issues/113521.
|
|
By replacing them with `{Open,Close}{Param,Brace,Bracket,Invisible}`.
PR #137902 made `ast::TokenKind` more like `lexer::TokenKind` by
replacing the compound `BinOp{,Eq}(BinOpToken)` variants with fieldless
variants `Plus`, `Minus`, `Star`, etc. This commit does a similar thing
with delimiters. It also makes `ast::TokenKind` more similar to
`parser::TokenType`.
This requires a few new methods:
- `TokenKind::is_{,open_,close_}delim()` replace various kinds of
pattern matches.
- `Delimiter::as_{open,close}_token_kind` are used to convert
`Delimiter` values to `TokenKind`.
Despite these additions, it's a net reduction in lines of code. This is
because e.g. `token::OpenParen` is so much shorter than
`token::OpenDelim(Delimiter::Parenthesis)` that many multi-line forms
reduce to single line forms. And many places where the number of lines
doesn't change are still easier to read, just because the names are
shorter, e.g.:
```
- } else if self.token != token::CloseDelim(Delimiter::Brace) {
+ } else if self.token != token::CloseBrace {
```
|
|
|
|
|
|
|
|
Also first line of default code blocks being used as the language instead of json
and fixes a missing `json` language in a doc comment code block.
|
|
|
|
simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors
It's not clear at all why the mask would have to be signed, it is anyway interpreted bitwise. The backend should just make sure that works no matter the surface-level type; our LLVM backend already does this correctly. The note of "the mask may be widened, which only has the correct behavior for signed integers" explains... nothing? Why can't the code do the widening correctly? If necessary, just cast to the signed type first...
Also while we are at it, fix the errors. For simd_masked_load/store, the errors talked about the "third argument" but they meant the first argument (the mask is the first argument there). They also used the wrong type for `expected_element`.
I have extremely low confidence in the GCC part of this PR.
See [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/257879-project-portable-simd/topic/On.20the.20sign.20of.20masks)
|
|
|
|
|
|
|
|
|
|
|
|
It shouldn't be needed anymore.
|
|
|
|
|
|
Rollup of 8 pull requests
Successful merges:
- #138934 (support config extensions)
- #139091 (Rewrite on_unimplemented format string parser.)
- #139753 (Make `#[naked]` an unsafe attribute)
- #139762 (Don't assemble non-env/bound candidates if projection is rigid)
- #139834 (Don't canonicalize crate paths)
- #139868 (Move `pal::env` to `std::sys::env_consts`)
- #139978 (Add citool command for generating a test dashboard)
- #139995 (Clean UI tests 4 of n)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Do not remove trivial `SwitchInt` in analysis MIR
This PR ensures that we don't prematurely remove trivial `SwitchInt` terminators which affects both the borrow-checking and runtime semantics (i.e. UB) of the code. Previously the `SimplifyCfg` optimization was removing `SwitchInt` terminators when they was "trivial", i.e. when all arms branched to the same basic block, even if that `SwitchInt` terminator had the side-effect of reading an operand which (for example) may not be initialized or may point to an invalid place in memory.
This behavior is unlike all other optimizations, which are only applied after "analysis" (i.e. borrow-checking) is finished, and which Miri disables to make sure the compiler doesn't silently remove UB.
Fixing this code "breaks" (i.e. unmasks) code that used to borrow-check but no longer does, like:
```rust
fn foo() {
let x;
let (0 | _) = x;
}
```
This match expression should perform a read because `_` does not shadow the `0` literal pattern, and the compiler should have to read the match scrutinee to compare it to 0. I've checked that this behavior does not actually manifest in practice via a crater run which came back clean: https://github.com/rust-lang/rust/pull/139042#issuecomment-2767436367
As a side-note, it may be tempting to suggest that this is actually a good thing or that we should preserve this behavior. If we wanted to make this work (i.e. trivially optimize out reads from matches that are redundant like `0 | _`), then we should be enabling this behavior *after* fixing this. However, I think it's kinda unprincipled, and for example other variations of the code don't even work today, e.g.:
```rust
fn foo() {
let x;
let (0.. | _) = x;
}
```
|
|
internal: Make `HirFileId`, `EditionedFileId` and macro files Salsa struct
|
|
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
|
|
this makes three changes:
- all callsites of `toolchain::command` are changed to use
`command(path, extra_env)`, instead of manually adding the env after
the fact.
- all `map<str, str>` are changed to `map<str, option<str>>`.
- `command` checks for None and calls `env_remove` if so.
this caught several places where environment variables weren't being
propagated:
- when running `rustc --print=target-libdir`
- when running `cargo rustc -- --print=target-spec-json`
- when running the custom DiscoverLinkedProjects config. I *think* this
is for use with non-cargo build systems, so I didn't change it.
|