Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #137672

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b479199
Run CI multiple times a day
marxin Feb 6, 2025
28dfcd0
document bootstrap logging
jyn514 Feb 13, 2025
2d2849d
Merge pull request #2250 from jyn514/logging
jieyouxu Feb 13, 2025
7d999a5
add notes for perf issue
chenyukang Feb 14, 2025
a21ffd8
Fix borked link
marxin Feb 14, 2025
6714f1d
Start using latest release where -f checks all local links
marxin Feb 14, 2025
f8cc5d7
Merge pull request #2253 from marxin/fix-link2
JohnTitor Feb 14, 2025
27566ab
Merge pull request #2252 from chenyukang/fix-perf
jieyouxu Feb 14, 2025
dce2652
Fix examples to work with nightly-2025-02-13
torfsen Feb 15, 2025
fcfabc1
Fix CI schedule
marxin Feb 15, 2025
ba340ec
Merge pull request #2254 from marxin/start-using-latest-linkcheck2
camelid Feb 15, 2025
34db7ba
Merge pull request #2246 from marxin/CI-more-ofter
camelid Feb 15, 2025
f0a6af0
remove MaybeUninit::uninit_array
cyrgani Feb 15, 2025
089af67
Bump mdbook-linkcheck2 dependency version
marxin Feb 16, 2025
56f6538
Merge pull request #2257 from marxin/start-using-latest-linkcheck2-v2
tshepang Feb 16, 2025
342ced9
Merge pull request #2256 from torfsen/fix-examples-for-nightly-2025-0…
jieyouxu Feb 19, 2025
6e1ac39
Expose algebraic floating point intrinsics
calder Feb 19, 2025
fc02cfd
Do not use CString in the examples of CStr.
hkBst Jan 28, 2025
39667c5
document how to setup RA for nvim automatically
jyn514 Feb 24, 2025
25eac11
use lua locals
jyn514 Feb 24, 2025
ed2ccea
Merge pull request #2259 from jyn514/nvim-config
dianqk Feb 24, 2025
622b4fa
fix: attr cast for espidf
SergioGasquez Feb 25, 2025
d12ecae
Teach structured errors to display short `Ty`
estebank Feb 18, 2025
693ed26
Add tests
estebank Feb 18, 2025
ae3a825
Make E0529 a structured error
estebank Feb 18, 2025
7302dc6
Make E0614 a structured error
estebank Feb 18, 2025
26f74ef
Make E0609 a structured error
estebank Feb 18, 2025
a4e89de
add doc comment detail
estebank Feb 18, 2025
c550bee
Fix rebase
estebank Feb 25, 2025
9423634
Fix posting message to Zulip
Kobzol Feb 25, 2025
5d65732
Merge pull request #2262 from Kobzol/rustc-pull-ci-fix
Kobzol Feb 25, 2025
9313580
Don't suggest constraining unstable associated types
compiler-errors Feb 25, 2025
b7a5497
fix #137508
TaKO8Ki Feb 25, 2025
46392d1
Preparing for merge from rustc
BoxyUwU Feb 25, 2025
d9683df
Merge from rustc
BoxyUwU Feb 25, 2025
69369a7
Merge pull request #2263 from BoxyUwU/rustc-pull2
BoxyUwU Feb 25, 2025
ee8ed8c
Update gcc submodule
Kobzol Feb 26, 2025
bab71fc
revert accidental change in get_closest_merge_commit
RalfJung Feb 26, 2025
72d0a9e
Rollup merge of #134585 - cyrgani:uninit_array, r=Amanieu
fmease Feb 26, 2025
ac500c0
Rollup merge of #136187 - hkBst:patch-27, r=workingjubilee
fmease Feb 26, 2025
7e15873
Rollup merge of #136457 - calder:master, r=tgross35
fmease Feb 26, 2025
dbf65f0
Rollup merge of #137201 - estebank:structured-errors-long-ty, r=oli-obk
fmease Feb 26, 2025
ba41541
Rollup merge of #137620 - SergioGasquez:fix/espidf-maybeunit, r=Chris…
fmease Feb 26, 2025
1507108
Rollup merge of #137631 - TaKO8Ki:issue-137508, r=compiler-errors
fmease Feb 26, 2025
7df49fe
Rollup merge of #137635 - compiler-errors:constrain-unstable, r=Sparr…
fmease Feb 26, 2025
3bbe56f
Rollup merge of #137642 - BoxyUwU:rdg-push, r=Kobzol
fmease Feb 26, 2025
ee2b7d6
Rollup merge of #137660 - Kobzol:gcc-update, r=GuillaumeGomez
fmease Feb 26, 2025
585953a
Rollup merge of #137670 - RalfJung:llvm-commit-logic-revert, r=Kobzol
fmease Feb 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/rustc_ast_passes/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ pub(crate) struct WhereClauseBeforeTypeAlias {
}

#[derive(Subdiagnostic)]

pub(crate) enum WhereClauseBeforeTypeAliasSugg {
#[suggestion(ast_passes_remove_suggestion, applicability = "machine-applicable", code = "")]
Remove {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
None => "value".to_owned(),
};
if needs_note {
let ty = self.infcx.tcx.short_string(ty, err.long_ty_path());
if let Some(local) = place.as_local() {
let span = self.body.local_decls[local].source_info.span;
err.subdiagnostic(crate::session_diagnostics::TypeNoCopy::Label {
Expand Down
9 changes: 3 additions & 6 deletions compiler/rustc_borrowck/src/diagnostics/move_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,9 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
self.suggest_cloning(err, place_ty, expr, None);
}

let ty = self.infcx.tcx.short_string(place_ty, err.long_ty_path());
err.subdiagnostic(crate::session_diagnostics::TypeNoCopy::Label {
is_partial_move: false,
ty,
ty: place_ty,
place: &place_desc,
span,
});
Expand Down Expand Up @@ -629,10 +628,9 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
self.suggest_cloning(err, place_ty, expr, Some(use_spans));
}

let ty = self.infcx.tcx.short_string(place_ty, err.long_ty_path());
err.subdiagnostic(crate::session_diagnostics::TypeNoCopy::Label {
is_partial_move: false,
ty,
ty: place_ty,
place: &place_desc,
span: use_span,
});
Expand Down Expand Up @@ -833,10 +831,9 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
self.suggest_cloning(err, bind_to.ty, expr, None);
}

let ty = self.infcx.tcx.short_string(bind_to.ty, err.long_ty_path());
err.subdiagnostic(crate::session_diagnostics::TypeNoCopy::Label {
is_partial_move: false,
ty,
ty: bind_to.ty,
place: place_desc,
span: binding_span,
});
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ impl Display for RegionName {
}

impl rustc_errors::IntoDiagArg for RegionName {
fn into_diag_arg(self) -> rustc_errors::DiagArgValue {
self.to_string().into_diag_arg()
fn into_diag_arg(self, path: &mut Option<std::path::PathBuf>) -> rustc_errors::DiagArgValue {
self.to_string().into_diag_arg(path)
}
}

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_borrowck/src/session_diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,17 +459,17 @@ pub(crate) enum OnClosureNote<'a> {
}

#[derive(Subdiagnostic)]
pub(crate) enum TypeNoCopy<'a> {
pub(crate) enum TypeNoCopy<'a, 'tcx> {
#[label(borrowck_ty_no_impl_copy)]
Label {
is_partial_move: bool,
ty: String,
ty: Ty<'tcx>,
place: &'a str,
#[primary_span]
span: Span,
},
#[note(borrowck_ty_no_impl_copy)]
Note { is_partial_move: bool, ty: String, place: &'a str },
Note { is_partial_move: bool, ty: Ty<'tcx>, place: &'a str },
}

#[derive(Diagnostic)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/assert_module_sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl fmt::Display for CguReuse {
}

impl IntoDiagArg for CguReuse {
fn into_diag_arg(self) -> DiagArgValue {
fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> DiagArgValue {
DiagArgValue::Str(Cow::Owned(self.to_string()))
}
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl<'a> CopyPath<'a> {
struct DebugArgPath<'a>(pub &'a Path);

impl IntoDiagArg for DebugArgPath<'_> {
fn into_diag_arg(self) -> rustc_errors::DiagArgValue {
fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> rustc_errors::DiagArgValue {
DiagArgValue::Str(Cow::Owned(format!("{:?}", self.0)))
}
}
Expand Down Expand Up @@ -1087,7 +1087,7 @@ pub enum ExpectedPointerMutability {
}

impl IntoDiagArg for ExpectedPointerMutability {
fn into_diag_arg(self) -> DiagArgValue {
fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> DiagArgValue {
match self {
ExpectedPointerMutability::Mut => DiagArgValue::Str(Cow::Borrowed("*mut")),
ExpectedPointerMutability::Not => DiagArgValue::Str(Cow::Borrowed("*_")),
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_const_eval/src/const_eval/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ impl MachineStopType for ConstEvalErrKind {
| WriteThroughImmutablePointer => {}
AssertFailure(kind) => kind.add_args(adder),
Panic { msg, line, col, file } => {
adder("msg".into(), msg.into_diag_arg());
adder("file".into(), file.into_diag_arg());
adder("line".into(), line.into_diag_arg());
adder("col".into(), col.into_diag_arg());
adder("msg".into(), msg.into_diag_arg(&mut None));
adder("file".into(), file.into_diag_arg(&mut None));
adder("line".into(), line.into_diag_arg(&mut None));
adder("col".into(), col.into_diag_arg(&mut None));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ impl ReportErrorExt for ResourceExhaustionInfo {
}

impl rustc_errors::IntoDiagArg for InternKind {
fn into_diag_arg(self) -> DiagArgValue {
fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> DiagArgValue {
DiagArgValue::Str(Cow::Borrowed(match self {
InternKind::Static(Mutability::Not) => "static",
InternKind::Static(Mutability::Mut) => "static_mut",
Expand Down
12 changes: 9 additions & 3 deletions compiler/rustc_errors/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,17 @@ where
/// converted rather than on `DiagArgValue`, which enables types from other `rustc_*` crates to
/// implement this.
pub trait IntoDiagArg {
fn into_diag_arg(self) -> DiagArgValue;
/// Convert `Self` into a `DiagArgValue` suitable for rendering in a diagnostic.
///
/// It takes a `path` where "long values" could be written to, if the `DiagArgValue` is too big
/// for displaying on the terminal. This path comes from the `Diag` itself. When rendering
/// values that come from `TyCtxt`, like `Ty<'_>`, they can use `TyCtxt::short_string`. If a
/// value has no shortening logic that could be used, the argument can be safely ignored.
fn into_diag_arg(self, path: &mut Option<std::path::PathBuf>) -> DiagArgValue;
}

impl IntoDiagArg for DiagArgValue {
fn into_diag_arg(self) -> DiagArgValue {
fn into_diag_arg(self, _: &mut Option<std::path::PathBuf>) -> DiagArgValue {
self
}
}
Expand Down Expand Up @@ -395,7 +401,7 @@ impl DiagInner {
}

pub(crate) fn arg(&mut self, name: impl Into<DiagArgName>, arg: impl IntoDiagArg) {
self.args.insert(name.into(), arg.into_diag_arg());
self.args.insert(name.into(), arg.into_diag_arg(&mut self.long_ty_path));
}

/// Fields used for Hash, and PartialEq trait.
Expand Down
Loading
Loading