| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Rollup of 9 pull requests
Successful merges:
- #94145 (Test leaking of BinaryHeap Drain iterators)
- #103945 (Remove `iter::Empty` hack)
- #104024 (Fix `unused_must_use` warning for `Box::from_raw`)
- #104708 (Fix backoff doc to match implementation)
- #105347 (Account for `match` expr in single line)
- #105484 (Implement allow-by-default `multiple_supertrait_upcastable` lint)
- #106184 (Fix `core::any` docs)
- #106201 (Emit fewer errors on invalid `#[repr(transparent)]` on `enum`)
- #106205 (Remove some totally duplicated files in `rustc_infer`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Remove some totally duplicated files in `rustc_infer`
I have no idea why or how I duplicated these files from `compiler/rustc_infer/src/infer/error_reporting/note.rs`, but I did by accident, and nothing caught it :facepalm:
|
|
Emit fewer errors on invalid `#[repr(transparent)]` on `enum`
Fix #68420.
|
|
Fix `core::any` docs
Thanks to ``@pbevin`` in #106154
Closes #106154
``@rustbot`` labels +A-docs
|
|
Implement allow-by-default `multiple_supertrait_upcastable` lint
The lint detects when an object-safe trait has multiple supertraits.
Enabled in libcore and liballoc as they are low-level enough that many embedded programs will use them.
r? `@nikomatsakis`
|
|
Account for `match` expr in single line
When encountering `match Some(42) { Some(x) => x, None => "" };`, output
```
error[E0308]: `match` arms have incompatible types
--> f53.rs:2:52
|
2 | let _ = match Some(42) { Some(x) => x, None => "" };
| -------------- - ^^ expected integer, found `&str`
| | |
| | this is found to be of type `{integer}`
| `match` arms have incompatible types
```
|
|
jonasspinner:fix-backoff-doc-to-match-implementation, r=compiler-errors
Fix backoff doc to match implementation
The commit 8dddb2294310ad3e8ce0b2af735a702ad72a9a99 in the crossbeam-channel PR (#93563) changed the backoff strategy to be quadratic instead of exponential. This updates the doc to prevent confusion.
|
|
Fix `unused_must_use` warning for `Box::from_raw`
|
|
Remove `iter::Empty` hack
`iter::Empty` uses a newtype to work around `#![feature(const_fn_fn_ptr_basics)]`, which has been stable since 1.61.0.
|
|
Test leaking of BinaryHeap Drain iterators
Add test cases about forgetting the `BinaryHeap::Drain` iterator, and slightly fortifies some other test cases.
Consists of separate commits that I don't think are relevant on their own (but I'll happily turn these into more PRs if desired).
|
|
Clarify docs of `RefCell`
Comparison operators only panic if the `RefCell` is mutably borrowed, and `RefCell::swap()` can also panic if swapping a `RefCell` with itself.
|
|
|
|
Use correct clock in `park_timeout` on Horizon
Horizon does not support using `CLOCK_MONOTONIC` with condition variables, so use the system time instead.
|
|
Fix #68420.
|
|
When encountering `match Some(42) { Some(x) => x, None => "" };`, output
```
error[E0308]: `match` arms have incompatible types
--> f53.rs:2:52
|
2 | let _ = match Some(42) { Some(x) => x, None => "" };
| -------------- - ^^ expected integer, found `&str`
| | |
| | this is found to be of type `{integer}`
| `match` arms have incompatible types
```
|
|
Rollup of 9 pull requests
Successful merges:
- #103718 (More inference-friendly API for lazy)
- #105765 (Detect likely `.` -> `..` typo in method calls)
- #105852 (Suggest rewriting a malformed hex literal if we expect a float)
- #105965 (Provide local extern function arg names)
- #106064 (Partially fix `explicit_outlives_requirements` lint in macros)
- #106179 (Fix a formatting error in Iterator::for_each docs)
- #106181 (Fix doc comment parsing description in book)
- #106187 (Update the documentation of `Vec` to use `extend(array)` instead of `extend(array.iter().copied())`)
- #106189 (Fix UnsafeCell Documentation Spelling Error)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
Fix UnsafeCell Documentation Spelling Error
This fixes the spelling of "deallocated" (instead of the original "deallocted") In the `cell.rs` source file. Honestly probably not worth the time to evaluate, but since it doesn't involve any code change, I figure why not?
|
|
Update the documentation of `Vec` to use `extend(array)` instead of `extend(array.iter().copied())`
Another option is to use `extend_from_slice()` (that may be faster), but I find this approach cleaner.
|
|
Fix doc comment parsing description in book
This can actually make a difference for the user if they rely on unicode formating.
Prompted by https://github.com/dtolnay/syn/issues/771
|
|
Fix a formatting error in Iterator::for_each docs
There is a formatting error (extra space in an assignment) in the documentation of `core::iter::Iterator::for_each`, which I have fixed in this pull request.
|
|
Partially fix `explicit_outlives_requirements` lint in macros
Show the suggestion if and only if the bounds are from the same source context.
fixes https://github.com/rust-lang/rust/issues/106044
fixes https://github.com/rust-lang/rust/issues/106063
|
|
Provide local extern function arg names
Fixes #105896
|
|
Suggest rewriting a malformed hex literal if we expect a float
Fixes #104706
|
|
Detect likely `.` -> `..` typo in method calls
Fix #65015.
|
|
More inference-friendly API for lazy
The signature for new was
```
fn new<F>(f: F) -> Lazy<T, F>
```
Notably, with `F` unconstrained, `T` can be literally anything, and just `let _ = Lazy::new(|| 92)` would not typecheck.
This historiacally was a necessity -- `new` is a `const` function, it couldn't have any bounds. Today though, we can move `new` under the `F: FnOnce() -> T` bound, which gives the compiler enough data to infer the type of T from closure.
|
|
|
|
This fixes the spelling of "deallocated" (instead of the original "deallocted") In the `cell.rs` source file
|
|
More verbose `Debug` implementation of `std::process:Command`
Mainly based on commit: https://github.com/zackmdavis/rust/commit/ccc019aabfdd550944c049625e66c92c815ea1d0 from https://github.com/zackmdavis
close https://github.com/rust-lang/rust/issues/42200
|
|
`extend(array.iter().copied())`
|
|
|
|
|
|
|
|
Rollup of 3 pull requests
Successful merges:
- #105817 (Remove unreasonable help message for auto trait)
- #105994 (Add regression test for #99647)
- #106066 (Always suggest as `MachineApplicable` in `recover_intersection_pat`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=compiler-errors
Always suggest as `MachineApplicable` in `recover_intersection_pat`
This resolves one FIXME in `recover_intersection_pat` by always applying `MachineApplicable` when suggesting, as `bindings_after_at` is now stable.
This also separates a test to apply `// run-rustfix`.
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
Add regression test for #99647
Closes #99647
r? `@compiler-errors`
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
|
|
r=TaKO8Ki
Remove unreasonable help message for auto trait
Fixes #105788
|
|
Allow cleaning individual crates
As a bonus, this stops special casing `clean` in `Builder`.
## Motivation
Cleaning artifacts isn't strictly necessary to get cargo to rebuild; `touch compiler/rustc_driver/src/lib.rs` (for example) will also work. There's two reasons I thought making this part of bootstrap proper was a better approach:
1. `touch` does not *remove* artifacts, it just causes a rebuild. This is unhelpful for when you want to measure how long the compiler itself takes to build (e.g. for https://github.com/rust-lang/rust/issues/65031).
2. It seems a little more discoverable; and I want to extend it in the future to things like `x clean --stage 1 rustc`, which makes it easier to work around https://github.com/rust-lang/rust/issues/76720 without having to completely wipe all the stage 0 artifacts, or having to be intimately familiar with which directories to remove.
|
|
This can actually make a difference for the user if they rely on unicode formating.
Prompted by https://github.com/dtolnay/syn/issues/771
|
|
Rollup of 4 pull requests
Successful merges:
- #105515 (Account for macros in const generics)
- #106146 (Readme: update section on how to run `x.py`)
- #106150 (Detect when method call on LHS might be shadowed)
- #106174 (Remove unused empty CSS rules in ayu theme)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
based on commit: https://github.com/zackmdavis/rust/commit/ccc019aabfdd550944c049625e66c92c815ea1d0 from https://github.com/zackmdavis
close https://github.com/rust-lang/rust/issues/42200
Add env variables and cwd to the shell-like debug output.
Also use the alternate syntax to display a more verbose display, while not showing internal fields and hiding fields when they have their default value.
|
|
Remove unused empty CSS rules in ayu theme
r? `@notriddle`
|
|
Detect when method call on LHS might be shadowed
Address #39232.
|
|
Readme: update section on how to run `x.py`
`./x.py` currently looks for `python3` (not `python`) in the `PATH`. I updated that in the readme and also mentioned a convenient way to run `x.py` on Windows. The PowerShell script is actually quite inconvenient to use (and not really necessary on the `cmd.exe` prompt) so I left it out.
In addition I adapted `./x` in one of the CI scripts.
|
|
Account for macros in const generics
Fix #104141.
|
|
Suggest `Pin::as_mut` when encountering borrow error
Fix #65409 for `Pin<&mut T>`.
|
|
|
|
Fix panic on `x build --help --verbose`
See https://github.com/rust-lang/rust/issues/106165 for a detailed description of what went wrong here.
This also makes the panic message a little more informative in case it happens again.
|