| Age | Commit message (Collapse) | Author | Lines |
|
Also sort them.
|
|
It appears identically as a closure in two functions.
Also change its return type from `bool` to `Option<()>` so it can be
used with `?`.
|
|
|
|
|
|
Remove is global hack
In attempt to fix https://github.com/rust-lang/rust/issues/114057 we found several issues with how compiler computes layouts, this change removes `is_global` from `and` to stop impl from being shadowed.
In depth conversation can be read here https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Getting.20different.20types.20from.20almost.20same.20inputs
This is a fix candidate opened for performance run.
r? `@lcnr`
|
|
|
|
Do not assert that hidden types don't have erased regions.
cc https://github.com/rust-lang/rust/issues/116306
`args` can have erased regions.
In the linked issue, this is reached by computing whether a large type is `Freeze` to compute its ABI.
I do not have a minimized test to include.
|
|
r=compiler-errors,estebank
Add a note to duplicate diagnostics
Helps explain why there may be a difference between manual testing and the test suite output and highlights them as something to potentially look into
For existing duplicate diagnostics I just blessed them other than a few files that had other `NOTE` annotations in
|
|
Move subtyper below reveal_all and change reveal_all
In previous attempt https://github.com/rust-lang/rust/pull/116378 we tried to handle `Opaque` in few different places, but this isn't necessary, after moving subtyper below reveal_all and calling `super_place` on reveal_all, issues cease to exist.
r? ``@oli-obk``
Fixes https://github.com/rust-lang/rust/issues/116332
Fixes https://github.com/rust-lang/rust/issues/116265
Fixes https://github.com/rust-lang/rust/issues/116383
Fixes https://github.com/rust-lang/rust/issues/116333
|
|
Add Span to various smir types
Had to make few extra changes to few structs to attach spans to them.
r? ``@oli-obk``
|
|
stabilize `Option::as_`(`mut_`)`slice`
This is the stabilization to #108545. Thanks to everyone who helped getting this into Rust proper.
|
|
|
|
|
|
Remove mir::LocalDecl::internal.
It does not serve any purpose, as we don't have typeck-based generator witnesses any more.
|
|
|
|
|
|
Tweak wording of E0562
Fix #80476.
|
|
Diagnostics: Be more careful when suggesting struct fields
Consolidate the various places which filter out struct fields that shouldn't be suggested into a single function.
Previously, each of those code paths had slightly different and incomplete metrics for no good reason. Now, there's only a single 'complete' metric (namely `is_field_suggestable`) which also filters out hygienic fields that come from different syntax contexts.
Fixes #116334.
|
|
More accurately point to where default return type should go
When getting the "default return type" span, instead of pointing to the low span of the next token, point to the high span of the previous token. This:
1. Makes forming return type suggestions more uniform, since we expect them all in the same place.
2. Arguably makes labels easier to understand, since we're pointing to where the implicit `-> ()` would've gone, rather than the starting brace or the semicolon.
r? ```@estebank```
|
|
Fix misuses of a vs an
Fixes the misuse of "a" vs "an", according to English grammatical
expectations and using https://www.a-or-an.com/
|
|
Only trigger `refining_impl_trait` lint on reachable traits
Public but unreachable traits don't matter 😸
r? `@tmandry`
|
|
Add `async_fn_in_trait` lint
cc https://github.com/rust-lang/rust/pull/115822#issuecomment-1731168465
Mostly unsure what the messaging should be. Feedback required.
r? `@tmandry`
|
|
|
|
Remove the `TypedArena::alloc_from_iter` specialization.
It was added in #78569. It's complicated and doesn't actually help
performance.
r? `@cjgillot`
|
|
Co-authored-by: Travis Cross <tc@traviscross.com>
|
|
|
|
|
|
chinedufn:fix-expect-unused-in-impl-block-rust-issue-114416, r=cjgillot
Fix multiple `expect` attribs in impl block
Closes #114416
|
|
Fix #80476.
|
|
|
|
|
|
Remove E0551
Because it's the same as E0539.
Fixes #51489.
r? `@Nilstrieb`
|
|
Point to full `async fn` for future
Semi-follow-up to https://github.com/rust-lang/rust/pull/116296#discussion_r1342007575
cc `@asquared31415`
|
|
Because it's the same as E0539.
Fixes #51489.
|
|
It's easier to read in sorted order.
|
|
Emit feature gate *warning* for `auto` traits pre-expansion
Auto traits were introduced before we were more careful about not stabilizing new syntax pre-expansion.
This is a more conservative step in the general direction we want to go in https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Removal.20of.20.60auto.20trait.60.20syntax.
Fixes #116121
|
|
Signed-off-by: cui fliter <imcusg@gmail.com>
|
|
|
|
coverage: Allow each coverage statement to have multiple code regions
The original implementation of coverage instrumentation was built around the assumption that a coverage counter/expression would be associated with *up to one* code region. When it was discovered that *multiple* regions would sometimes need to share a counter, a workaround was found: for the remaining regions, the instrumentor would create a fresh expression that adds zero to the existing counter/expression.
That got the job done, but resulted in some awkward code, and produces unnecessarily complicated coverage maps in the final binary.
---
This PR removes that tension by changing `StatementKind::Coverage`'s code region field from `Option<CodeRegion>` to `Vec<CodeRegion>`.
The changes on the codegen side are fairly straightforward. As long as each `CoverageKind::Counter` only injects one `llvm.instrprof.increment`, the rest of coverage codegen is happy to handle multiple regions mapped to the same counter/expression, with only minor option-to-vec adjustments.
On the instrumentor/mir-transform side, we can get rid of the code that creates extra (x + 0) expressions. Instead we gather all of the code regions associated with a single BCB, and inject them all into one coverage statement.
---
There are several patches here but they can be divided in to three phases:
- Preparatory work
- Actually switching over to multiple regions per coverage statement
- Cleaning up
So viewing the patches individually may be easier.
|
|
r=compiler-errors
non_lifetime_binders: fix ICE in lint opaque-hidden-inferred-bound
Opaque types like `impl for<T> Trait<T>` would previously lead to an ICE.
r? `@compiler-errors`
|
|
Factor out common token generation in `fluent_messages`.
The failure and success cases are similar enough that they can share code.
r? `@davidtwco`
|
|
Fix broken links
The previous address is no longer available, replace it with the latest available one.
|
|
a small wf and clause cleanup
- remove `Clause::from_projection_clause`, instead use `ToPredicate`
- change `predicate_obligations` to directly take a `Clause`
- remove some unnecessary `&`
- use clause in `min_specialization` checks where easily applicable
|
|
Suggest `pin!()` instead of `Pin::new()` when appropriate
When encountering a type that needs to be pinned but that is `!Unpin`, suggest using the `pin!()` macro.
Fix #57994.
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #115863 (Add check_unused_messages in tidy)
- #116210 (Ensure that `~const` trait bounds on associated functions are in const traits or impls)
- #116358 (Rename both of the `Match` relations)
- #116371 (Remove unused features from `rustc_llvm`.)
- #116374 (Print normalized ty)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Print normalized ty
Inside `mir_assign_valid_types` we are comparing normalized type of `mir_place` but in debug message we are not printing the normalized value, this changes that.
|
|
Remove unused features from `rustc_llvm`.
r? `@bjorn3`
|
|
Rename both of the `Match` relations
Both of these names kinda were ambiguous.
r? lcnr
|
|
Ensure that `~const` trait bounds on associated functions are in const traits or impls
Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/How.20to.2Fshould.20I.20try.20to.20pinpoint.20ICEs.20related.20to.20effects.3F
|