| Age | Commit message (Collapse) | Author | Lines |
|
Add 'consider using' message to overflowing_literals
Fixes #79744.
Ironically, the `overflowing_literals` handler for binary or hex already
had this message! You would think it would be the other way around :)
cc ```@scottmcm```
|
|
|
|
Using `i32` is rather fragile because it has many implementations -
and indeed I'm about to add one.
TryFromSliceError is nice because it doesn't seem likely to grow new
conversions. We still have one conversion, from Infallible.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
Partially address #81971.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Take `FnMut` in `rustc_trait_selection::find_auto_trait_generics`
- Take `&mut DocContext` in most of `clean`
- Collect the iterator in auto_trait_impls instead of iterating lazily; the lifetimes were really bad.
- Changes `fn sess` to properly return a borrow with the lifetime of `'tcx`, not the mutable borrow.
|
|
This should hopefully allow for less interior mutability.
|
|
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
|
The test case fails with either one error or two errors.
Use a single code generation unit to avoid nondeterminism.
|
|
Only store a LocalDefId in some HIR nodes
Some HIR nodes are guaranteed to be HIR owners: Item, TraitItem, ImplItem, ForeignItem and MacroDef.
As a consequence, we do not need to store the `HirId`'s `local_id`, and we can directly store a `LocalDefId`.
This allows to avoid a bit of the dance with `tcx.hir().local_def_id` and `tcx.hir().local_def_id_to_hir_id` mappings.
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #82145 (Fix ES5 errors (IE11))
- #82160 (Fix typo in rustc_infer::infer::UndoLog)
- #82161 (Add long explanation for E0545)
- #82163 (avoid full-slicing slices)
- #82175 (validation: fix invalid-fn-ptr error message)
- #82184 ([Minor] Update discriminant_value docs)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
validation: fix invalid-fn-ptr error message
https://github.com/rust-lang/rust/pull/82061 changed the code here to print an `ImmTy` instead of a `ScalarMaybeUninit`; that was an accident. So go back to printing a `ScalarMaybeUninit`.
r? ```@oli-obk```
|
|
avoid full-slicing slices
If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
|
|
r=GuillaumeGomez
Add long explanation for E0545
Helps with #61137
|
|
Fix ES5 errors (IE11)
rustdoc is supposed to run on IE11 but someone reported me that it wasn't. I just confirmed it by using `es-check` with the `es5` option like this:
```
$ es-check es5 src/librustdoc/html/static/*.js
```
The PR fixes those issues and add CI checks to prevent regressions.
`@Mark-Simulacrum:` I added checks in the CI, but not sure if it's the correct way to do it. Any help on that side would be very appreciated!
r? `@Nemo157`
|
|
|
|
|
|
Windows does not allow deleting currently running executables
|
|
|
|
|
|
It can be useful to do some computation in `assert!` format arguments, in order to get better error messages. For example:
```rust
assert!(
some_condition,
"The state is invalid. Details: {}",
expensive_call_to_get_debugging_info(),
);
```
It seems like `assert!` only evaluates the format arguments if the assertion fails, which is useful but doesn't appear to be documented anywhere. This PR documents the behavior and adds some tests.
|
|
Ensures `make` tests run under /bin/dash (if available), like CI, and fixes a Makefile
Note: This cherrypicks #81688 (`@pnkfelix)`
Updates `tools.mk` to explicitly require `SHELL := /bin/dash`, since CI uses `dash` but other environments (including developer local machines) may default to `bash`.
Replaces bash-specific shell command in one Makefile with a dash-compatible alternative, and re-enables the affected Makefile test.
Removes apparently redundant definition of `UNAME`.
Also see: [zulip discussion thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/how.20to.20run.2Fbless.20src.2Ftest.2Frun-make-fulldeps.2Fcoverage.20.3F)
r? `@pnkfelix`
FYI: `@wesleywiser` `@tmandry`
|
|
|
|
|
|
|
|
|
|
If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Items are guaranteed to be HIR owner.
|
|
|
|
|
|
Along the way, we also implement a handful of diagnostics improvements
and fixes, particularly with respect to the special handling of `||` in
place of `|` and when there are leading verts in function params, which
don't allow top-level or-patterns anyway.
|
|
|
|
:arrow_up: rust-analyzer
|