Rollup merge of #104922 - estebank:fur-elize, r=oli-obk
Detect long types in E0308 and write them to disk On type error with long types, print an abridged type and write the full type to disk. Print the widest possible short type while still fitting in the terminal.
This commit is contained in:
commit
086bdbbd73
15 changed files with 316 additions and 101 deletions
|
@ -952,6 +952,17 @@ impl Session {
|
|||
) -> Option<Symbol> {
|
||||
attrs.iter().find(|at| at.has_name(name)).and_then(|at| at.value_str())
|
||||
}
|
||||
|
||||
pub fn diagnostic_width(&self) -> usize {
|
||||
let default_column_width = 140;
|
||||
if let Some(width) = self.opts.diagnostic_width {
|
||||
width
|
||||
} else if self.opts.unstable_opts.ui_testing {
|
||||
default_column_width
|
||||
} else {
|
||||
termize::dimensions().map_or(default_column_width, |(w, _)| w)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// JUSTIFICATION: defn of the suggested wrapper fns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue