| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix `unused_must_use` warning for `Box::from_raw`
|
|
Account for macros in const generics
Fix #104141.
|
|
Don't ICE in `check_must_not_suspend_ty` for mismatched tuple arity
These expressions are just used for their spans, so make it best-effort here.
Fixes #105728
|
|
|
|
|
|
available
|
|
Don't warn about unused parens when they are used by yeet expr
Don't even get me started on how I've found this.
|
|
|
|
Make `missing_copy_implementations` more cautious
- Fixes https://github.com/rust-lang/rust/issues/98348
- Also makes the lint not fire on large types and types containing raw pointers. Thoughts?
|
|
|
|
Fix `emit_unused_delims_expr` ICE
Fixes #104897
This is also related to #104433.
|
|
Reduce macro usage for lints
r? `@cjgillot`
|
|
fmt
add a comment
|
|
Add `type_ascribe!` macro as placeholder syntax for type ascription
This makes it still possible to test the internal semantics of type ascription even once the `:`-syntax is removed from the parser. The macro now gets used in a bunch of UI tests that test the semantics and not syntax of type ascription.
I might have forgotten a few tests but this should hopefully be most of them. The remaining ones will certainly be found once type ascription is removed from the parser altogether.
Part of #101728
|
|
Because it complicates lint implementation greatly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #104397
|
|
Use it in all UI tests that are about the semantics and not the syntax
of type ascription.
|
|
Before, the lint did the checking for `must_use` and pretty printing the
types in a special format in one pass, causing quite complex and
untranslatable code.
Now the collection and printing is split in two. That should also make
it easier to translate or extract the type pretty printing in the
future.
Also fixes an integer overflow in the array length pluralization
calculation.
|
|
Fix `emit_unused_delims_expr` ICE
Fixes #104392
|
|
r=lcnr
Walk types more carefully in `ProhibitOpaqueTypes` visitor
The visitor didn't account for the case where you could have `<TAIT as Trait>::Assoc` normalize to itself, in the case of a `type TAIT = impl Trait` with an unconstrained associated type. That causes the visitor to loop on the same type over and over.
Fixes #104291
|
|
add ui tests
|
|
|
|
Don't print full paths in overlap errors
We don't print the full path in other diagnostics -- I don't think it particularly helps with the error message. I also delayed the printing until actually needing to render the error message.
r? diagnostics
|
|
Rollup of 8 pull requests
Successful merges:
- #95292 (Allow specialized const trait impls.)
- #100386 (Make `Sized` coinductive, again)
- #102215 (Implement the `+whole-archive` modifier for `wasm-ld`)
- #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code)
- #103531 (Suggest calling the instance method of the same name when method not found)
- #103960 (piece of diagnostic migrate)
- #104051 (update Miri)
- #104129 (rustdoc: use javascript to layout notable traits popups)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=estebank
Fix unused lint and parser caring about spaces to won't produce invalid code
Fixes #103435
|
|
|
|
|
|
`Future::Output`
No longer lint against `#[must_use] async fn foo()`.
When encountering a statement that awaits on a `Future`, check if the
`Future`'s parent item is annotated with `#[must_use]` and emit a lint
if so. This effectively makes `must_use` an annotation on the
`Future::Output` instead of only the `Future` itself.
Fix #78149.
|
|
Do not point at whole statement, only at the expression (skip pointing at `;`)
|
|
|
|
|
|
Port `dead_code` lints to be translatable.
This adds an additional comma to lists with three or more items, to be consistent with list formatters like `icu4x`.
r? `@davidtwco`
|
|
Fix unreachable_pub suggestion for enum with fields
Resolves #103317
|
|
|
|
Note scope of TAIT more accurately
This maybe explains why the person was confused in #101897, since we say "same module" but really should've said "same impl".
r? ``@oli-obk``
|
|
|
|
|
|
|
|
Rust's niche handling allows for wrapping valid ranges with end < start;
for instance, a valid range with start=43 and end=41 means a niche of
42. Most places in the compiler handle this correctly, but
ty_find_init_error assumed that `lo > 0` means the type cannot contain a
zero.
Fix it to handle wrapping ranges.
Add a test to cover this case.
|
|
|
|
make `order_dependent_trait_objects` show up in future-breakage reports
tried to change it to a hard error in #102474 but breaking the more than 1000 dependents of `traitobject` doesn't feel great :sweat_smile:
This lint has existed since more than 3 years now and the way this is currently implemented is buggy and will break with #102472. imo we should upgrade it to also report for dependencies and maybe also backport this to beta. Then after maybe 2-3 stable versions I would like to finally convert this lint to a hard error.
|