| Age | Commit message (Collapse) | Author | Lines |
|
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.
|
|
Rollup of 5 pull requests
Successful merges:
- #137953 (simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors)
- #139990 (transmutability: remove NFA intermediate representation)
- #140044 (rustc-dev-guide subtree update)
- #140051 (Switch exploit mitigations to mdbook footnotes)
- #140054 (docs: fix typo change from inconstants to invariants)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
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.
|
|
|
|
replace broken links armv7-rtems-eabihf.md
Hi team , i found broken link in `src/doc/rustc/src/platform-support/armv7-rtems-eabihf.md` and replace
thanks
|
|
Remove stray newline from post-merge report
[Oops](https://github.com/rust-lang/rust/pull/140043#issuecomment-2816999352) :)
r? jieyouxu
|
|
Put them all on the same line with just their GitHub handles to make it
very easy to copy and paste (with ctrl-shift-v!!!) the names.
We have no use for email, so I removed all the emails, we don't care
about people's full names either.
Co-authored-by: Thalia Archibald <thalia@archibald.dev>
|
|
Switch exploit mitigations to mdbook footnotes
This updates the exploit mitigations chapter in the rustc book to use the footnote feature of mdbook instead of manually implementing footnotes with HTML.
|
|
rustc-dev-guide subtree update
r? ``@ghost``
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subtree synces
|
|
|
|
It was always called with `Some`, so no need to complicate it with `Option`.
|
|
functions
|
|
|
|
|
|
The new git tests should be enough to check this scenario. We should ideally not be creating dummy commits on CI.
|
|
It shouldn't be needed anymore.
|
|
|
|
|
|
It shouldn't really happen, but if it does, at least we will have an explicit record of it.
|
|
And get rid of `get_closest_merge_commit`.
|
|
|
|
|
|
been modified locally
Also adds several git tests to make sure that the behavior works in common cases (PR CI, auto CI, local usage).
|
|
|
|
|
|
|
|
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
|
|
r=nnethercote
Improve `clean_maybe_renamed_item` function code a bit
Follow-up of #139846.
This is what I tried to say in there: the `name` variable can be unwrapped in most cases so better do it directly once and for all if possible and move the cases where it's not possible above.
r? `@nnethercote`
|
|
skip llvm-config in autodiff check builds, when its unavailable
As you suggested, this indeed fixes `./x.py check` builds when autodiff is enabled.
r? ```@onur-ozkan```
closes #139936
Tracking:
- https://github.com/rust-lang/rust/issues/124509
|
|
r=Mark-Simulacrum
Setup editor file associations for non-rs extensions
.gitattributes lists `*.fixed`, `*.pp`, and `*.mir` as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code.
At the same time, consistently order `rust-analyzer.linkedProjects` between editors. For some reason, Eglot didn't include `library/Cargo.toml`.
I have tested this with VS Code and Zed. I have not implemented it for Emacs/Eglot or Helix.
|
|
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
|
|
This updates the exploit mitigations chapter in the rustc book to use
the footnote feature of mdbook instead of manually implementing
footnotes with HTML.
|
|
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`.
|
|
|