| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Function and Method.
|
|
Identify unreachable subpatterns more reliably
In https://github.com/rust-lang/rust/pull/80104 I used `Span`s to identify unreachable sub-patterns in the presence of or-patterns during exhaustiveness checking. In https://github.com/rust-lang/rust/issues/80501 it was revealed that `Span`s are complicated and that this was not a good idea.
Instead, this PR identifies subpatterns logically: as a path in the tree of subpatterns of a given pattern. I made a struct that captures a set of such subpatterns. This is a bit complex, but thankfully self-contained; the rest of the code does not need to know anything about it.
Fixes https://github.com/rust-lang/rust/issues/80501. I think I managed to keep the perf neutral.
r? `@varkor`
|
|
Rollup of 5 pull requests
Successful merges:
- #81526 (btree: use Option's unwrap_unchecked())
- #81742 (Add a note about the correctness and the effect on unsafe code to the `ExactSizeIterator` docs)
- #81830 (Add long error explanation for E0542)
- #81835 (Improve long explanation for E0546)
- #81843 (Add regression test for #29821)
Failed merges:
- #81836 (Add long explanation for E0547)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Add regression test for #29821
Closes #29821
|
|
r=GuillaumeGomez
Improve long explanation for E0546
Helps with #61137
|
|
Add long error explanation for E0542
Helps with #61137
|
|
Add a note about the correctness and the effect on unsafe code to the `ExactSizeIterator` docs
As it is a safe trait it does not provide any guarantee that the
returned length is correct and as such unsafe code must not rely on it.
That's why `TrustedLen` exists.
Fixes https://github.com/rust-lang/rust/issues/81739
|
|
btree: use Option's unwrap_unchecked()
Now that https://github.com/rust-lang/rust/issues/81383 is available, start using it.
|
|
Add abi field to `Method`
Also bumps version and adds a test (Will conflict with #81500, whichever is merged first)
Rationale: It's possible for methods to have an ABI. This should be exposed in the JSON.
|
|
r=matthewjasper
Apply workaround from #72003 for #56935 to allow for cross-compilation of `rustc_index` crate
This patch applies the same workaround as #72003 to the `rustc_index` crate. This allows recent versions of rustfmt to compile to wasm again.
Related: #72017.
|
|
Add test for #75158
This also shifts some type-size related tests into a new directory, so that we keep the number of files at the root down.
Closes #75158
|
|
Upgrade wasm32 image to Ubuntu 20.04
This switches the wasm32 image, which is used to test
wasm32-unknown-emscripten, to Ubuntu 20.04. While at it, enable
most of the excluded tests, as they seem to work fine with some
minor fixes.
|
|
path trimming: ignore type aliases
Continuation of #73996.
|
|
|
|
Closes #29821
|
|
Remove some function fields
Same kind as #80845.
This PR removes the `all_types` and `ret_types` from the `clean::Function` type.
Another change that I had to do was implementing the `From` trait to be able to convert `hir::def::DefKind` into `clean::TypeKind` without requiring `DocContext` (and so I updated the `clean` method so that it's taken into account).
The last two commits improve a bit the `get_real_types` function and the `Type::generics` method.
r? `@jyn514`
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #81402 (tidy: Run tidy style against markdown files.)
- #81434 (BTree: fix documentation of unstable public members)
- #81680 (Refactor `PrimitiveTypeTable` for Clippy)
- #81737 (typeck: Emit structured suggestions for tuple struct syntax)
- #81738 (Miscellaneous small diagnostics cleanup)
- #81766 (Enable 'task list' markdown extension)
- #81812 (Add a test for escaping LLVMisms in inline asm)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
|
|
Add a test for escaping LLVMisms in inline asm
We escape certain LLVM-specific features when passing the inline
assembly string to the LLVM. Until now, however, there was no test
making sure this behaviour stays intact. This commit adds such a test!
r? `@Amanieu`
cc `@joshtriplett`
|
|
Enable 'task list' markdown extension
Closes https://github.com/rust-lang/rust/issues/71183.
|
|
Miscellaneous small diagnostics cleanup
|
|
typeck: Emit structured suggestions for tuple struct syntax
And tuple variant syntax, but that didn't fit in the subject :)
Now the fact that these are suggestions is exposed both to the layout
engine and to IDEs and rustfix for automatic application.
|
|
Refactor `PrimitiveTypeTable` for Clippy
I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
|
|
BTree: fix documentation of unstable public members
As rightfully requested in #62924 & #70530.
r? `@Mark-Simulacrum`
|
|
tidy: Run tidy style against markdown files.
This adds tidy checks for markdown files. I think it is useful to have some style enforcement (for the same reasons the style is enforced on other files). I think it is worthwhile to avoid `ignore` on rust examples since having broken code in documentation is frustrating. Avoiding trailing whitespace is good because it has semantic meaning in markdown, which I think should be avoided.
|
|
|
|
update Miri
Fixes https://github.com/rust-lang/rust/issues/81770
Cc `@rust-lang/miri` r? `@ghost`
|
|
We escape certain LLVM-specific features when passing the inline
assembly string to the LLVM. Until now, however, there was no test
making sure this behaviour stays intact. This commit adds such a test!
|
|
|
|
This switches the wasm32 image, which is used to test
wasm32-unknown-emscripten to Ubuntu 20.04. While at it, enable
most of the excluded tests, as they seem to work fine with some
minor fixes.
|
|
|
|
|
|
Bump nightly version to 1.52.0
cc `@rust-lang/release`
|
|
- Add documentation about task lists
|
|
Rollup of 7 pull requests
Successful merges:
- #80011 (Stabilize `peekable_next_if`)
- #81580 (Document how `MaybeUninit<Struct>` can be initialized.)
- #81610 (BTreeMap: make Ord bound explicit, compile-test its absence)
- #81664 (Avoid a hir access inside get_static)
- #81675 (Make rustdoc respect `--error-format short` in doctests)
- #81753 (Never MIR inline functions with a different instruction set)
- #81795 (Small refactor with Iterator::reduce)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
Small refactor with Iterator::reduce
|
|
Never MIR inline functions with a different instruction set
|
|
Make rustdoc respect `--error-format short` in doctests
Note that this will not work with `cargo test`, only with `rustdoc --test`, I'll have to modify `cargo` as well.
Fix #81662.
`@rustbot` label +T-rustdoc +A-doctests
|