Skip to content

Commit 6db50b0

Browse files
committed
---
yaml --- r: 71987 b: refs/heads/dist-snap c: 72c24e2 h: refs/heads/master i: 71985: 05503a0 71983: 344f68f v: v3
1 parent b553e85 commit 6db50b0

File tree

7 files changed

+154
-176
lines changed

7 files changed

+154
-176
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 52445129fdb4ee847332acbf516ced8f73b7990a
10+
refs/heads/dist-snap: 72c24e20a9caf49b855b4c0de44aad6b039d09f4
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/back/link.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,7 @@ pub fn build_link_meta(sess: Session, c: &ast::crate, output: &Path,
615615
}
616616
617617
pub fn truncated_hash_result(symbol_hasher: &hash::State) -> ~str {
618-
unsafe {
619-
symbol_hasher.result_str()
620-
}
618+
symbol_hasher.result_str()
621619
}
622620
623621

branches/dist-snap/src/librustc/middle/lang_items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ pub impl<'self> LanguageItemCollector<'self> {
369369
}
370370

371371
fn collect_local_language_items(&self) {
372-
let this = unsafe { ptr::addr_of(&self) };
372+
let this = ptr::addr_of(&self);
373373
visit_crate(*self.crate, (), mk_simple_visitor(@SimpleVisitor {
374374
visit_item: |item| {
375375
for item.attrs.each |attribute| {

branches/dist-snap/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use metadata::csearch::get_type_name_if_impl;
1919
use metadata::cstore::find_extern_mod_stmt_cnum;
2020
use metadata::decoder::{def_like, dl_def, dl_field, dl_impl};
2121
use middle::lang_items::LanguageItems;
22-
use middle::lint::{deny, allow, forbid, level, unused_imports, warn};
22+
use middle::lint::{allow, level, unused_imports};
2323
use middle::lint::{get_lint_level, get_lint_settings_level};
2424
use middle::pat_util::pat_bindings;
2525

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ pub struct icx_popper {
9191
#[unsafe_destructor]
9292
impl Drop for icx_popper {
9393
fn finalize(&self) {
94-
unsafe {
95-
if self.ccx.sess.count_llvm_insns() {
96-
self.ccx.stats.llvm_insn_ctxt.pop();
97-
}
94+
if self.ccx.sess.count_llvm_insns() {
95+
self.ccx.stats.llvm_insn_ctxt.pop();
9896
}
9997
}
10098
}
@@ -145,9 +143,7 @@ pub fn decl_fn(llmod: ModuleRef, name: &str, cc: lib::llvm::CallConv,
145143
llvm::LLVMGetOrInsertFunction(llmod, buf, llty)
146144
}
147145
});
148-
unsafe {
149-
lib::llvm::SetFunctionCallConv(llfn, cc);
150-
}
146+
lib::llvm::SetFunctionCallConv(llfn, cc);
151147
return llfn;
152148
}
153149

@@ -730,11 +726,9 @@ pub fn cast_shift_expr_rhs(cx: block, op: ast::binop,
730726

731727
pub fn cast_shift_const_rhs(op: ast::binop,
732728
lhs: ValueRef, rhs: ValueRef) -> ValueRef {
733-
unsafe {
734-
cast_shift_rhs(op, lhs, rhs,
735-
|a, b| unsafe { llvm::LLVMConstTrunc(a, b) },
736-
|a, b| unsafe { llvm::LLVMConstZExt(a, b) })
737-
}
729+
cast_shift_rhs(op, lhs, rhs,
730+
|a, b| unsafe { llvm::LLVMConstTrunc(a, b) },
731+
|a, b| unsafe { llvm::LLVMConstZExt(a, b) })
738732
}
739733

740734
pub fn cast_shift_rhs(op: ast::binop,
@@ -2865,9 +2859,7 @@ pub fn create_module_map(ccx: @CrateContext) -> ValueRef {
28652859
llvm::LLVMAddGlobal(ccx.llmod, maptype, buf)
28662860
}
28672861
});
2868-
unsafe {
2869-
lib::llvm::SetLinkage(map, lib::llvm::InternalLinkage);
2870-
}
2862+
lib::llvm::SetLinkage(map, lib::llvm::InternalLinkage);
28712863
let mut elts: ~[ValueRef] = ~[];
28722864
for ccx.module_data.each |key, &val| {
28732865
let elt = C_struct(~[p2i(ccx, C_cstr(ccx, @/*bad*/ copy *key)),

branches/dist-snap/src/librustc/middle/trans/build.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ use core::str;
2727
use core::vec;
2828

2929
pub fn terminate(cx: block, _: &str) {
30-
unsafe {
31-
cx.terminated = true;
32-
}
30+
cx.terminated = true;
3331
}
3432

3533
pub fn check_not_terminated(cx: block) {

0 commit comments

Comments
 (0)