// stacks are disabled.
#[cfg(target_arch = "x86")]
+#[repr(C)]
struct Registers {
eax: u32, ebx: u32, ecx: u32, edx: u32,
ebp: u32, esi: u32, edi: u32, esp: u32,
regs[RUSTRT_R14] = procedure.env as uint;
regs[RUSTRT_R15] = fptr as uint;
- // These registers are picked up by the regulard context switch paths. These
+ // These registers are picked up by the regular context switch paths. These
// will put us in "mostly the right context" except for frobbing all the
// arguments to the right place. We have the small trampoline code inside of
// rust_bootstrap_green_task to do that.
task_local_insn_key.replace(Some(RefCell::new(Vec::new())));
}
-pub struct _InsnCtxt { _x: () }
+pub struct _InsnCtxt {
+ _cannot_construct_outside_of_this_module: ()
+}
#[unsafe_destructor]
impl Drop for _InsnCtxt {
Some(ctx) => ctx.borrow_mut().push(s),
None => {}
}
- _InsnCtxt { _x: () }
+ _InsnCtxt { _cannot_construct_outside_of_this_module: () }
}
pub struct StatRecorder<'a> {
for var in variants.iter() {
let mut size = 0;
for field in var.fields.iter().skip(1) {
- // skip the dicriminant
+ // skip the discriminant
size += llsize_of_real(ccx, sizing_type_of(ccx, *field));
}
sizes.push(size);
// LLVM code generator emits a ".file filename" directive
// for ELF backends. Value of the "filename" is set as the
// LLVM module identifier. Due to a LLVM MC bug[1], LLVM
- // crashes if the module identifer is same as other symbols
+ // crashes if the module identifier is same as other symbols
// such as a function name in the module.
// 1. http://llvm.org/bugs/show_bug.cgi?id=11479
let mut llmod_id = link_meta.crateid.name.clone();
struct InferredInfo<'a> {
item_id: ast::NodeId,
kind: ParamKind,
- index: uint,
param_id: ast::NodeId,
term: VarianceTermPtr<'a>,
}
let term = self.arena.alloc(|| InferredTerm(inf_index));
self.inferred_infos.push(InferredInfo { item_id: item_id,
kind: kind,
- index: index,
param_id: param_id,
term: term });
let newly_added = self.inferred_map.insert(param_id, inf_index);
let variant =
ty::VariantInfo::from_ast_variant(tcx,
ast_variant,
- /*discrimant*/ 0);
+ /*discriminant*/ 0);
for &arg_ty in variant.args.iter() {
self.add_constraints_from_ty(arg_ty, self.covariant);
}
//! // ... something using html
//! ```
+#![allow(dead_code)]
#![allow(non_camel_case_types)]
use libc;
}
/// By default this markdown renderer generates anchors for each header in the
- /// rendered document. The anchor name is the contents of the header spearated
+ /// rendered document. The anchor name is the contents of the header separated
/// by hyphens, and a task-local map is used to disambiguate among duplicate
/// headers (numbers are appended).
///