| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix 2/4 tests skipped by opt-dist
The linker errors were because this one test, strangely, wants itself compiled with `-Ctarget-features=+crt-static`, and yet it looks like the runner image is simply missing static libraries for libc and libm.
Eyeballing the output of
```
rustc +nightly --target=x86_64-pc-windows-msvc -O tests/codegen/vec-shrink-panik.rs --emit=llvm-ir
```
suggests that vec-shrink-panik should pass on Windows. And it's quite disturbing that such a test would have failed only on Windows to start with. Exactly why that was would require some advanced digging, but it looks clean now.
|
|
Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸
Change `Rvalue::RawRef` to take a `RawRefKind` instead of just a `Mutability`. Then introduce `RawRefKind::FakeForPtrMetadata` and use that for lowering index bounds checking to a `PtrMetadata`. This new `RawRefKind::FakeForPtrMetadata` acts like a shallow fake borrow in borrowck, which mimics the semantics of the old `Rvalue::Len` operation we're replacing.
We can then use this `RawRefKind` instead of using a span desugaring hack in CTFE.
cc ``@scottmcm`` ``@RalfJung``
|
|
Co-authored-by: Ralf Jung <post@ralfj.de>
|
|
|
|
than silently enabling them)
|
|
|
|
|
|
|
|
|
|
This backs out commit 7de0b2e75a541b98f735ee6fcd12d326be38d23f.
|
|
This backs out commit e6a103ae50699db1dbb0676d075a4bcda2247939.
|
|
This backs out commit c134b20c9cbc88a36e77acb8522e8dc4573bd906.
|
|
This backs out commit b4d4d02db8a95f5507fbd0aa90904d7b774f0027.
|
|
This backs out commit ce9da9063097c26006886b3f403a0c50790c285a.
|
|
This backs out commit 4fe18a6fb5a1181a04c47391f558ebab5b8b0f39.
|
|
This backs out commit e5c38558f5dbc37cbc91f9fda58144ce02e1f5aa.
|
|
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
|
|
|
|
Miri subtree update
r? `@ghost`
|
|
|
|
|
|
Currently, running rust-analyzer tests on FreeBSD produces an "unused
variable" warning. The code is fully compatible with FreeBSD and doesn't
have to be omitted.
Signed-off-by: Vladimir Krivopalov <vladimir@krivopalov.ru>
|
|
fix: Report calling unsafe fn pointer as unsafe
|
|
fix: Don't suggest `into_iter().method()` on iterators
|
|
minor: Remove duplicate method from `hir::Type`
|
|
Prioritize formatting thread tasks in main_loop
|
|
|
|
|
|
|
|
I added it by mistake in #18927.
I chose to keep the method as not static, because it's more comfortable, and keep the name `add_reference()` and not `reference()`, because it is clearer and better matches `strip_reference[s]()`.
|
|
r=compiler-errors
Clean up all dead files inside `tests/ui/`
While rebasing #135860 I noticed that there are several dead `*.stderr` files inside `tests/ui/`.
When I checked thoroughly, I found 69 dead `*.$revision.stderr` files, 3 other dead `*.stderr` files and one dead `*.rs` file.
Prior to #134808, compiletest's `--bless` didn't remove dead `*.stderr` files when the set of revisions changed in any way (renamings, removals, additions, …) which explains their existence.
Regarding the dead `*.rs` file, that one was located inside an `auxiliary/` directory (together with a `*.stderr` file) despite not being meant to be an auxiliary file (it's not referenced by any `//@ aux-*`, it has an accompanying `*.stderr` file and it's obvious from looking at #111056 which added it). Ideally compiletest or tidy would forbid `*.std{out,err}` files inside `auxiliary/` dirs, that would've caught it. I moved it, updated it and turned it into a proper UI test.
---
How to reproduce:
1. Run `rm tests/ui/**/*.stderr`
2. Run `./x test tests/ui --bless` (or similar)
3. Manually / semi-automatically go through all tests that were ignored (likely due to your OS etc. not matching) and restore any stderr files that were overzealously removed
---
r? compiler
|
|
fix: Fix syntactic highlighting for renames
|
|
|
|
fix: Fix #[rustc_deprecated_safe_2024]
|
|
That was used as a fallback, causing a panic when the fallback was chosen.
I also made sure this won't happen again by guaranteeing in the macro generating the tokens that they all exist.
|
|
It should be considered by the edition of the caller, not the callee.
Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Split out `ExpressionStore` from `Body`
|
|
fix: In completion's expand, consider recursion stop condition (when we're not inside a macro call anymore) *after* the recursive call instead of before it
|
|
Uplift `clippy::double_neg` lint as `double_negations`
Warns about cases like this:
```rust
fn main() {
let x = 1;
let _b = --x; //~ WARN use of a double negation
}
```
The intent is to keep people from thinking that `--x` is a prefix decrement operator. `++x`, `x++` and `x--` are invalid expressions and already have a helpful diagnostic.
I didn't add a machine-applicable suggestion to the lint because it's not entirely clear what the programmer was trying to achieve with the `--x` operation. The code that triggers the lint should always be reviewed manually.
Closes #82987
|