about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-07-28 09:40:05 +0000
committerbors <bors@rust-lang.org>2018-07-28 09:40:05 +0000
commitcc224282de8de427005103e5c0504cbdf1148694 (patch)
tree9061d4e1ab49458fe2ab7c56c3e94ba8d650b6f9 /src/librustc_errors
parent05607476521732c5c71bc063c8be5056aa573b15 (diff)
parent59f8422a17c136582aeecf0c975deb6896df3595 (diff)
downloadrust-cc224282de8de427005103e5c0504cbdf1148694.tar.gz
rust-cc224282de8de427005103e5c0504cbdf1148694.zip
Auto merge of #52802 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests

Successful merges:

 - #52702 (Suggest fix when encountering different mutability from impl to trait)
 - #52703 (Improve a few vectors - calculate capacity or build from iterators)
 - #52740 (Suggest underscore when using dashes in crate namet push fork)
 - #52759 (Impl Send & Sync for JoinHandle)
 - #52760 (rustc_metadata: test loading atoi instead of cos)
 - #52763 (Omit the vendor component in Fuchsia triple)
 - #52765 (Remove unused "-Zenable_nonzeroing_move_hints" flag)
 - #52769 (Incorporate a stray test)
 - #52777 (Fix doc comment for 'ptr::copy_to' method)
 - #52779 (revert accidental atty downgrade)
 - #52781 (Use a slice where a vector is not necessary)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/emitter.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs
index 6bcf0d9eff6..f54626d6a20 100644
--- a/src/librustc_errors/emitter.rs
+++ b/src/librustc_errors/emitter.rs
@@ -749,7 +749,7 @@ impl EmitterWriter {
         max
     }
 
-    fn get_max_line_num(&mut self, span: &MultiSpan, children: &Vec<SubDiagnostic>) -> usize {
+    fn get_max_line_num(&mut self, span: &MultiSpan, children: &[SubDiagnostic]) -> usize {
         let mut max = 0;
 
         let primary = self.get_multispan_max_line_num(span);
@@ -954,7 +954,7 @@ impl EmitterWriter {
 
     fn emit_message_default(&mut self,
                             msp: &MultiSpan,
-                            msg: &Vec<(String, Style)>,
+                            msg: &[(String, Style)],
                             code: &Option<DiagnosticId>,
                             level: &Level,
                             max_line_num_len: usize,
@@ -1317,10 +1317,10 @@ impl EmitterWriter {
 
     fn emit_messages_default(&mut self,
                              level: &Level,
-                             message: &Vec<(String, Style)>,
+                             message: &[(String, Style)],
                              code: &Option<DiagnosticId>,
                              span: &MultiSpan,
-                             children: &Vec<SubDiagnostic>,
+                             children: &[SubDiagnostic],
                              suggestions: &[CodeSuggestion]) {
         let max_line_num_len = if self.ui_testing {
             ANONYMIZED_LINE_NUM.len()
@@ -1433,7 +1433,7 @@ fn overlaps(a1: &Annotation, a2: &Annotation, padding: usize) -> bool {
     num_overlap(a1.start_col, a1.end_col + padding, a2.start_col, a2.end_col, false)
 }
 
-fn emit_to_destination(rendered_buffer: &Vec<Vec<StyledString>>,
+fn emit_to_destination(rendered_buffer: &[Vec<StyledString>],
                        lvl: &Level,
                        dst: &mut Destination,
                        short_message: bool)