Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a052f2c
Add the `#[derive_const]` attribute
fee1-dead Sep 20, 2022
2f7b4d9
Don't internalize __llvm_profile_counter_bias
abrachet Oct 10, 2022
9bcc083
run-make-fulldeps: fix split debuginfo test
davidtwco Nov 7, 2022
29dc083
llvm: dwo only emitted when object code emitted
davidtwco Nov 7, 2022
0e0bcd9
prevent uninitialized access in black_box for zero-sized-types
krasimirgg Nov 4, 2022
3074678
Mark `trait_upcasting` feature no longer incomplete.
crlf0710 Nov 7, 2022
c467006
suggest removing unnecessary . to use a floating point literal
TaKO8Ki Nov 8, 2022
004986b
avoid unnecessary `format!`
TaKO8Ki Nov 8, 2022
6018f11
emit errors when using `RangeFrom` and `RangeTo`
TaKO8Ki Nov 9, 2022
84e1fbc
Add no_std AArch64 support for the QNX Neutrino (nto) 7.1 RTOS
flba-eb Sep 5, 2022
ae71df9
Add `nto` as known `target_os`
flba-eb Oct 5, 2022
014f7f4
Remove some redundant arguments
oli-obk Nov 3, 2022
21ce587
Don't add message that will never be shown to users
oli-obk Nov 11, 2022
df2adc4
Print all labels, even if they have no span. Fall back to main item's…
oli-obk Nov 4, 2022
f149837
Add Tristan as maintainer
flba-eb Nov 11, 2022
f6d7f08
Issue error when `-C link-self-contained` option is used on unsupport…
StackDoubleFlow Nov 8, 2022
934c414
Update cargo
weihanglo Nov 11, 2022
f88bbba
Rollup merge of #102049 - fee1-dead-contrib:derive_const, r=oli-obk
Manishearth Nov 11, 2022
988a938
Rollup merge of #102701 - flba-eb:add_qnx_nostd_support, r=cjgillot
Manishearth Nov 11, 2022
4759140
Rollup merge of #102900 - abrachet:master, r=bjorn3
Manishearth Nov 11, 2022
20d7207
Rollup merge of #103970 - oli-obk:unhide_unknown_spans, r=estebank
Manishearth Nov 11, 2022
cbffebb
Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoerister
Manishearth Nov 11, 2022
401963b
Rollup merge of #104110 - krasimirgg:msan-16, r=nagisa
Manishearth Nov 11, 2022
83b5e07
Rollup merge of #104117 - crlf0710:update_feature_gate, r=jackh726
Manishearth Nov 11, 2022
02a768b
Rollup merge of #104137 - StackDoubleFlow:err-lsc-unsupported, r=petr…
Manishearth Nov 11, 2022
081cc38
Rollup merge of #104144 - TaKO8Ki:suggest-removing-unnecessary-dot, r…
Manishearth Nov 11, 2022
82f5085
Rollup merge of #104302 - weihanglo:update-cargo, r=weihanglo
Manishearth Nov 11, 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
Prev Previous commit
Next Next commit
Remove some redundant arguments
  • Loading branch information
oli-obk committed Nov 11, 2022
commit 014f7f4092da54315c4f4a781f2e8879a2372120
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl Emitter for AnnotateSnippetEmitterWriter {
let (mut primary_span, suggestions) = self.primary_span_formatted(&diag, &fluent_args);

self.fix_multispans_in_extern_macros_and_render_macro_backtrace(
&self.source_map,
&mut primary_span,
&mut children,
&diag.level,
Expand Down
13 changes: 5 additions & 8 deletions compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ pub trait Emitter: Translate {

fn fix_multispans_in_extern_macros_and_render_macro_backtrace(
&self,
source_map: &Option<Lrc<SourceMap>>,
span: &mut MultiSpan,
children: &mut Vec<SubDiagnostic>,
level: &Level,
Expand All @@ -340,7 +339,7 @@ pub trait Emitter: Translate {
.collect();

if !backtrace {
self.fix_multispans_in_extern_macros(source_map, span, children);
self.fix_multispans_in_extern_macros(span, children);
}

self.render_multispans_macro_backtrace(span, children, backtrace);
Expand Down Expand Up @@ -480,23 +479,22 @@ pub trait Emitter: Translate {
// this will change the span to point at the use site.
fn fix_multispans_in_extern_macros(
&self,
source_map: &Option<Lrc<SourceMap>>,
span: &mut MultiSpan,
children: &mut Vec<SubDiagnostic>,
) {
let Some(source_map) = source_map else { return };
debug!("fix_multispans_in_extern_macros: before: span={:?} children={:?}", span, children);
self.fix_multispan_in_extern_macros(source_map, span);
self.fix_multispan_in_extern_macros(span);
for child in children.iter_mut() {
self.fix_multispan_in_extern_macros(source_map, &mut child.span);
self.fix_multispan_in_extern_macros(&mut child.span);
}
debug!("fix_multispans_in_extern_macros: after: span={:?} children={:?}", span, children);
}

// This "fixes" MultiSpans that contain `Span`s pointing to locations inside of external macros.
// Since these locations are often difficult to read,
// we move these spans from the external macros to their corresponding use site.
fn fix_multispan_in_extern_macros(&self, source_map: &Lrc<SourceMap>, span: &mut MultiSpan) {
fn fix_multispan_in_extern_macros(&self, span: &mut MultiSpan) {
let Some(source_map) = self.source_map() else { return };
// First, find all the spans in external macros and point instead at their use site.
let replacements: Vec<(Span, Span)> = span
.primary_spans()
Expand Down Expand Up @@ -544,7 +542,6 @@ impl Emitter for EmitterWriter {
debug!("emit_diagnostic: suggestions={:?}", suggestions);

self.fix_multispans_in_extern_macros_and_render_macro_backtrace(
&self.sm,
&mut primary_span,
&mut children,
&diag.level,
Expand Down