Auto merge of #152517 - jhpratt:rollup-fGRcId6, r=jhpratt
Rollup of 17 pull requests Successful merges: - rust-lang/rust#142415 (Add note when inherent impl for a alias type defined outside of the crate) - rust-lang/rust#142680 (Fix passing/returning structs with the 64-bit SPARC ABI) - rust-lang/rust#150768 (Don't compute FnAbi for LLVM intrinsics in backends) - rust-lang/rust#151152 (Add FCW for derive helper attributes that will conflict with built-in attributes) - rust-lang/rust#151814 (layout: handle rigid aliases without params) - rust-lang/rust#151863 (Borrowck: simplify diagnostics for placeholders) - rust-lang/rust#152159 (Add note for `?Sized` params in int-ptr casts diag) - rust-lang/rust#152434 (Clarify names of `QueryVTable` functions for "executing" a query) - rust-lang/rust#152478 (Remove tm_factory field from CodegenContext) - rust-lang/rust#152498 (Partially revert "resolve: Update `NameBindingData::vis` in place") - rust-lang/rust#152316 (fix: add continue) - rust-lang/rust#152394 (Correctly check if a macro call is actually a macro call in rustdoc highlighter) - rust-lang/rust#152425 (Port #![test_runner] to the attribute parser) - rust-lang/rust#152481 (Use cg_ssa's produce_final_output_artifacts in cg_clif) - rust-lang/rust#152485 (fix issue#152482) - rust-lang/rust#152495 (Clean up some subdiagnostics) - rust-lang/rust#152502 (Implement `BinaryHeap::from_raw_vec`)
This commit is contained in:
commit
7ad4e69ad5
77 changed files with 1234 additions and 791 deletions
|
|
@ -383,6 +383,10 @@ pub fn decorate_attribute_lint(
|
|||
lints::DocAutoCfgExpectsHideOrShow.decorate_lint(diag)
|
||||
}
|
||||
|
||||
&AttributeLintKind::AmbiguousDeriveHelpers => {
|
||||
lints::AmbiguousDeriveHelpers.decorate_lint(diag)
|
||||
}
|
||||
|
||||
&AttributeLintKind::DocAutoCfgHideShowUnexpectedItem { attr_name } => {
|
||||
lints::DocAutoCfgHideShowUnexpectedItem { attr_name }.decorate_lint(diag)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1975,27 +1975,17 @@ pub(crate) struct OverflowingBinHex<'a> {
|
|||
pub sign_bit_sub: Option<OverflowingBinHexSignBitSub<'a>>,
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
pub(crate) enum OverflowingBinHexSign {
|
||||
#[note(
|
||||
"the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}`"
|
||||
)]
|
||||
Positive,
|
||||
#[note("the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}`")]
|
||||
#[note("and the value `-{$lit}` will become `{$actually}{$ty}`")]
|
||||
Negative,
|
||||
}
|
||||
|
||||
impl Subdiagnostic for OverflowingBinHexSign {
|
||||
fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
|
||||
match self {
|
||||
OverflowingBinHexSign::Positive => {
|
||||
diag.note(inline_fluent!("the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}` and will become `{$actually}{$ty}`"));
|
||||
}
|
||||
OverflowingBinHexSign::Negative => {
|
||||
diag.note(inline_fluent!(
|
||||
"the literal `{$lit}` (decimal `{$dec}`) does not fit into the type `{$ty}`"
|
||||
));
|
||||
diag.note(inline_fluent!("and the value `-{$lit}` will become `{$actually}{$ty}`"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Subdiagnostic)]
|
||||
pub(crate) enum OverflowingBinHexSub<'a> {
|
||||
#[suggestion(
|
||||
|
|
@ -3752,6 +3742,10 @@ pub(crate) struct DocAliasDuplicated {
|
|||
#[diag("only `hide` or `show` are allowed in `#[doc(auto_cfg(...))]`")]
|
||||
pub(crate) struct DocAutoCfgExpectsHideOrShow;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag("there exists a built-in attribute with the same name")]
|
||||
pub(crate) struct AmbiguousDeriveHelpers;
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag("`#![doc(auto_cfg({$attr_name}(...)))]` only accepts identifiers or key/value items")]
|
||||
pub(crate) struct DocAutoCfgHideShowUnexpectedItem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue