fix alignment
This commit is contained in:
parent
bd71d11a8f
commit
2628f3cc8f
34 changed files with 458 additions and 473 deletions
|
@ -314,7 +314,7 @@ fn collect_tests_from_dir(config: &Config,
|
|||
collect_tests_from_dir(config,
|
||||
base,
|
||||
&file_path,
|
||||
&relative_file_path,
|
||||
relative_file_path,
|
||||
tests)?;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,8 +123,7 @@ fn unify_integral_variable<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
|
|||
val: ty::IntVarValue)
|
||||
-> RelateResult<'tcx, Ty<'tcx>>
|
||||
{
|
||||
infcx
|
||||
.int_unification_table
|
||||
infcx.int_unification_table
|
||||
.borrow_mut()
|
||||
.unify_var_value(vid, val)
|
||||
.map_err(|e| int_unification_error(vid_is_expected, e))?;
|
||||
|
@ -140,8 +139,7 @@ fn unify_float_variable<'a,'tcx>(infcx: &InferCtxt<'a,'tcx>,
|
|||
val: ast::FloatTy)
|
||||
-> RelateResult<'tcx, Ty<'tcx>>
|
||||
{
|
||||
infcx
|
||||
.float_unification_table
|
||||
infcx.float_unification_table
|
||||
.borrow_mut()
|
||||
.unify_var_value(vid, val)
|
||||
.map_err(|e| float_unification_error(vid_is_expected, e))?;
|
||||
|
|
|
@ -469,8 +469,7 @@ fn iterate_over_potentially_unsafe_regions_in_type<'a, 'b, 'tcx>(
|
|||
ty::TyTuple(ref tys) |
|
||||
ty::TyClosure(_, box ty::ClosureSubsts { upvar_tys: ref tys, .. }) => {
|
||||
for ty in tys {
|
||||
iterate_over_potentially_unsafe_regions_in_type(
|
||||
cx, context, ty, depth+1)?
|
||||
iterate_over_potentially_unsafe_regions_in_type(cx, context, ty, depth+1)?
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -354,17 +354,13 @@ pub fn check_crate(tcx: &TyCtxt, trait_map: ty::TraitMap) -> CompileResult {
|
|||
coherence::check_coherence(&ccx));
|
||||
})?;
|
||||
|
||||
time(time_passes, "wf checking", ||
|
||||
check::check_wf_new(&ccx))?;
|
||||
time(time_passes, "wf checking", || check::check_wf_new(&ccx))?;
|
||||
|
||||
time(time_passes, "item-types checking", ||
|
||||
check::check_item_types(&ccx))?;
|
||||
time(time_passes, "item-types checking", || check::check_item_types(&ccx))?;
|
||||
|
||||
time(time_passes, "item-bodies checking", ||
|
||||
check::check_item_bodies(&ccx))?;
|
||||
time(time_passes, "item-bodies checking", || check::check_item_bodies(&ccx))?;
|
||||
|
||||
time(time_passes, "drop-impl checking", ||
|
||||
check::check_drop_impls(&ccx))?;
|
||||
time(time_passes, "drop-impl checking", || check::check_drop_impls(&ccx))?;
|
||||
|
||||
check_for_entry_fn(&ccx);
|
||||
|
||||
|
|
|
@ -508,8 +508,7 @@ impl fmt::Display for clean::Type {
|
|||
primitive_link(f, clean::Slice,
|
||||
&format!("&{}{}[{}]", lt, m, **bt)),
|
||||
_ => {
|
||||
primitive_link(f, clean::Slice,
|
||||
&format!("&{}{}[", lt, m))?;
|
||||
primitive_link(f, clean::Slice, &format!("&{}{}[", lt, m))?;
|
||||
write!(f, "{}", **bt)?;
|
||||
primitive_link(f, clean::Slice, "]")
|
||||
}
|
||||
|
|
|
@ -180,8 +180,7 @@ fn doit(sess: &parse::ParseSess, mut lexer: lexer::StringReader,
|
|||
if klass == "" {
|
||||
write!(out, "{}", Escape(&snip))?;
|
||||
} else {
|
||||
write!(out, "<span class='{}'>{}</span>", klass,
|
||||
Escape(&snip))?;
|
||||
write!(out, "<span class='{}'>{}</span>", klass, Escape(&snip))?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1739,8 +1739,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
|
|||
<td class='docblock short'>
|
||||
{stab_docs} {docs}
|
||||
</td>
|
||||
</tr>
|
||||
",
|
||||
</tr>",
|
||||
name = *myitem.name.as_ref().unwrap(),
|
||||
stab_docs = stab_docs,
|
||||
docs = shorter(Some(&Markdown(doc_value).to_string())),
|
||||
|
|
|
@ -3612,7 +3612,8 @@ impl<'a> Parser<'a> {
|
|||
let path = ident_to_path(ident_span, ident);
|
||||
self.bump();
|
||||
let delim = self.expect_open_delim()?;
|
||||
let tts = self.parse_seq_to_end(&token::CloseDelim(delim),
|
||||
let tts = self.parse_seq_to_end(
|
||||
&token::CloseDelim(delim),
|
||||
SeqSep::none(), |p| p.parse_token_tree())?;
|
||||
let mac = Mac_ { path: path, tts: tts, ctxt: EMPTY_CTXT };
|
||||
pat = PatKind::Mac(codemap::Spanned {node: mac,
|
||||
|
|
|
@ -1058,8 +1058,7 @@ impl<'a> State<'a> {
|
|||
self.end() // end the outer fn box
|
||||
}
|
||||
ast::ForeignItemKind::Static(ref t, m) => {
|
||||
self.head(&visibility_qualified(item.vis,
|
||||
"static"))?;
|
||||
self.head(&visibility_qualified(item.vis, "static"))?;
|
||||
if m {
|
||||
self.word_space("mut")?;
|
||||
}
|
||||
|
@ -1119,8 +1118,7 @@ impl<'a> State<'a> {
|
|||
self.ann.pre(self, NodeItem(item))?;
|
||||
match item.node {
|
||||
ast::ItemKind::ExternCrate(ref optional_path) => {
|
||||
self.head(&visibility_qualified(item.vis,
|
||||
"extern crate"))?;
|
||||
self.head(&visibility_qualified(item.vis, "extern crate"))?;
|
||||
if let Some(p) = *optional_path {
|
||||
let val = p.as_str();
|
||||
if val.contains("-") {
|
||||
|
@ -1138,16 +1136,14 @@ impl<'a> State<'a> {
|
|||
self.end()?; // end outer head-block
|
||||
}
|
||||
ast::ItemKind::Use(ref vp) => {
|
||||
self.head(&visibility_qualified(item.vis,
|
||||
"use"))?;
|
||||
self.head(&visibility_qualified(item.vis, "use"))?;
|
||||
self.print_view_path(&vp)?;
|
||||
word(&mut self.s, ";")?;
|
||||
self.end()?; // end inner head-block
|
||||
self.end()?; // end outer head-block
|
||||
}
|
||||
ast::ItemKind::Static(ref ty, m, ref expr) => {
|
||||
self.head(&visibility_qualified(item.vis,
|
||||
"static"))?;
|
||||
self.head(&visibility_qualified(item.vis, "static"))?;
|
||||
if m == ast::Mutability::Mutable {
|
||||
self.word_space("mut")?;
|
||||
}
|
||||
|
@ -1163,8 +1159,7 @@ impl<'a> State<'a> {
|
|||
self.end()?; // end the outer cbox
|
||||
}
|
||||
ast::ItemKind::Const(ref ty, ref expr) => {
|
||||
self.head(&visibility_qualified(item.vis,
|
||||
"const"))?;
|
||||
self.head(&visibility_qualified(item.vis, "const"))?;
|
||||
self.print_ident(item.ident)?;
|
||||
self.word_space(":")?;
|
||||
self.print_type(&ty)?;
|
||||
|
@ -1192,8 +1187,7 @@ impl<'a> State<'a> {
|
|||
self.print_block_with_attrs(&body, &item.attrs)?;
|
||||
}
|
||||
ast::ItemKind::Mod(ref _mod) => {
|
||||
self.head(&visibility_qualified(item.vis,
|
||||
"mod"))?;
|
||||
self.head(&visibility_qualified(item.vis, "mod"))?;
|
||||
self.print_ident(item.ident)?;
|
||||
self.nbsp()?;
|
||||
self.bopen()?;
|
||||
|
|
Loading…
Reference in a new issue