-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #98669 - Dylan-DPC:rollup-8uzhcip, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - #98415 (Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic`) - #98479 (Add `fetch_not` method on `AtomicBool`) - #98499 (Erase regions in New Abstract Consts) - #98516 (library: fix uefi va_list type definition) - #98554 (Fix box with custom allocator in miri) - #98607 (Clean up arg mismatch diagnostic, generalize tuple wrap suggestion) - #98625 (emit Retag for compound types with reference fields) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
39 changed files
with
511 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
use rustc_macros::{SessionDiagnostic, SessionSubdiagnostic}; | ||
use rustc_middle::ty::Ty; | ||
use rustc_span::Span; | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error(borrowck::move_unsized, code = "E0161")] | ||
pub(crate) struct MoveUnsized<'tcx> { | ||
pub ty: Ty<'tcx>, | ||
#[primary_span] | ||
#[label] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error(borrowck::higher_ranked_lifetime_error)] | ||
pub(crate) struct HigherRankedLifetimeError { | ||
#[subdiagnostic] | ||
pub cause: Option<HigherRankedErrorCause>, | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionSubdiagnostic)] | ||
pub(crate) enum HigherRankedErrorCause { | ||
#[note(borrowck::could_not_prove)] | ||
CouldNotProve { predicate: String }, | ||
#[note(borrowck::could_not_normalize)] | ||
CouldNotNormalize { value: String }, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error(borrowck::higher_ranked_subtype_error)] | ||
pub(crate) struct HigherRankedSubtypeError { | ||
#[primary_span] | ||
pub span: Span, | ||
} | ||
|
||
#[derive(SessionDiagnostic)] | ||
#[error(borrowck::generic_does_not_live_long_enough)] | ||
pub(crate) struct GenericDoesNotLiveLongEnough { | ||
pub kind: String, | ||
#[primary_span] | ||
pub span: Span, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
borrowck-move-unsized = | ||
cannot move a value of type `{$ty}` | ||
.label = the size of `{$ty}` cannot be statically determined | ||
borrowck-higher-ranked-lifetime-error = | ||
higher-ranked lifetime error | ||
borrowck-could-not-prove = | ||
could not prove `{$predicate}` | ||
borrowck-could-not-normalize = | ||
could not normalize `{$value}` | ||
borrowck-higher-ranked-subtype-error = | ||
higher-ranked subtype error | ||
generic-does-not-live-long-enough = | ||
`{$kind}` does not live long enough |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.