Skip to content

Rollup of 10 pull requests #103417

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7f5a19b
DiagnosticBuilder -> Diagnostic
compiler-errors Oct 6, 2022
c1538f0
Make span_suggestions take IntoIterator
compiler-errors Oct 7, 2022
419fde7
Handle RPITITs properly in register_hidden_type
compiler-errors Oct 21, 2022
9f6b9dd
Delay ambiguity span bug in normalize query iff not rustdoc
compiler-errors Oct 21, 2022
cb61113
tests
compiler-errors Oct 21, 2022
7280f3d
Truncate thread names on Linux and Apple targets
cuviper Oct 22, 2022
12e4584
Move truncation next to other thread tests for tidy
cuviper Oct 22, 2022
ed40d46
Properly escape quotes when suggesting switching between char/string …
clubby789 Oct 22, 2022
8762485
Update UI tests
clubby789 Oct 22, 2022
2ac29f6
rustdoc: remove unused CSS class `.result-description`
notriddle Oct 22, 2022
aa8931c
Introduce subst_iter and subst_iter_copied on EarlyBinder
compiler-errors Oct 16, 2022
62b65b5
Change `unknown_lint` applicability to `MaybeIncorrect`
smoelius Oct 22, 2022
94a9ee3
Use functions for headings rustodoc GUI test
GuillaumeGomez Oct 22, 2022
9f0503e
Fix typo in docs of `String::leak`.
finnbear Oct 22, 2022
466a634
Rollup merge of #102763 - compiler-errors:nits, r=cjgillot
notriddle Oct 22, 2022
3bd9cc5
Rollup merge of #103123 - compiler-errors:early-binder-iter, r=cjgillot
notriddle Oct 22, 2022
97bd375
Rollup merge of #103354 - clubby789:escape-string-literals, r=compile…
notriddle Oct 22, 2022
691c3cf
Rollup merge of #103355 - compiler-errors:rpitit-default-check, r=oli…
notriddle Oct 22, 2022
afab9f1
Rollup merge of #103368 - compiler-errors:normalization-ambiguity-bug…
notriddle Oct 22, 2022
d901b16
Rollup merge of #103379 - cuviper:truncate-thread-name, r=thomcc
notriddle Oct 22, 2022
c05c282
Rollup merge of #103388 - notriddle:notriddle/result-description, r=G…
notriddle Oct 22, 2022
2002cc3
Rollup merge of #103399 - smoelius:unknown-lint-maybe-incorrect, r=fe…
notriddle Oct 22, 2022
8035bb8
Rollup merge of #103401 - GuillaumeGomez:gui-test-headings-cleanup, r…
notriddle Oct 22, 2022
65e0bd0
Rollup merge of #103412 - finnbear:fix_docs_typo_string_leak, r=thomcc
notriddle Oct 22, 2022
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
Next Next commit
DiagnosticBuilder -> Diagnostic
  • Loading branch information
compiler-errors committed Oct 7, 2022
commit 7f5a19ba209561394c35e7a2fd0257299093d491
19 changes: 6 additions & 13 deletions compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use rustc_errors::{
Applicability, Diagnostic, DiagnosticBuilder, EmissionGuarantee, ErrorGuaranteed,
};
use rustc_errors::{Applicability, Diagnostic};
use rustc_hir as hir;
use rustc_hir::intravisit::Visitor;
use rustc_hir::Node;
Expand Down Expand Up @@ -629,25 +627,20 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
self.buffer_error(err);
}

fn suggest_map_index_mut_alternatives(
&self,
ty: Ty<'_>,
err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>,
span: Span,
) {
fn suggest_map_index_mut_alternatives(&self, ty: Ty<'tcx>, err: &mut Diagnostic, span: Span) {
let Some(adt) = ty.ty_adt_def() else { return };
let did = adt.did();
if self.infcx.tcx.is_diagnostic_item(sym::HashMap, did)
|| self.infcx.tcx.is_diagnostic_item(sym::BTreeMap, did)
{
struct V<'a, 'b, 'tcx, G: EmissionGuarantee> {
struct V<'a, 'tcx> {
assign_span: Span,
err: &'a mut DiagnosticBuilder<'b, G>,
err: &'a mut Diagnostic,
ty: Ty<'tcx>,
suggested: bool,
}
impl<'a, 'b: 'a, 'hir, 'tcx, G: EmissionGuarantee> Visitor<'hir> for V<'a, 'b, 'tcx, G> {
fn visit_stmt(&mut self, stmt: &'hir hir::Stmt<'hir>) {
impl<'a, 'tcx> Visitor<'tcx> for V<'a, 'tcx> {
fn visit_stmt(&mut self, stmt: &'tcx hir::Stmt<'tcx>) {
hir::intravisit::walk_stmt(self, stmt);
let expr = match stmt.kind {
hir::StmtKind::Semi(expr) | hir::StmtKind::Expr(expr) => expr,
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_passes/src/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ use self::VarKind::*;
use rustc_ast::InlineAsmOptions;
use rustc_data_structures::fx::FxIndexMap;
use rustc_errors::Applicability;
use rustc_errors::Diagnostic;
use rustc_hir as hir;
use rustc_hir::def::*;
use rustc_hir::def_id::{DefId, LocalDefId};
Expand Down Expand Up @@ -1690,7 +1691,7 @@ impl<'tcx> Liveness<'_, 'tcx> {
&self,
name: &str,
opt_body: Option<&hir::Body<'_>>,
err: &mut rustc_errors::DiagnosticBuilder<'_, ()>,
err: &mut Diagnostic,
) -> bool {
let mut has_litstring = false;
let Some(opt_body) = opt_body else {return false;};
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {

fn try_lookup_name_relaxed(
&mut self,
err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>,
err: &mut Diagnostic,
source: PathSource<'_>,
path: &[Segment],
span: Span,
Expand Down Expand Up @@ -465,7 +465,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
.contains(span)
{
// Already reported this issue on the lhs of the type ascription.
err.delay_as_bug();
err.downgrade_to_delayed_bug();
return (true, candidates);
}
}
Expand Down Expand Up @@ -576,7 +576,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {

fn suggest_trait_and_bounds(
&mut self,
err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>,
err: &mut Diagnostic,
source: PathSource<'_>,
res: Option<Res>,
span: Span,
Expand Down Expand Up @@ -651,7 +651,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {

fn suggest_typo(
&mut self,
err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>,
err: &mut Diagnostic,
source: PathSource<'_>,
path: &[Segment],
span: Span,
Expand Down Expand Up @@ -686,7 +686,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {

fn err_code_special_cases(
&mut self,
err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>,
err: &mut Diagnostic,
source: PathSource<'_>,
path: &[Segment],
span: Span,
Expand Down