Skip to content

Commit 5d24495

Browse files
committed
---
yaml --- r: 46423 b: refs/heads/auto c: e29b7ee h: refs/heads/master i: 46421: 378f872 46419: 574c584 46415: 0cf36e2 v: v3
1 parent f64209d commit 5d24495

File tree

7 files changed

+15
-57
lines changed

7 files changed

+15
-57
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: db25210244f1eca61c63aff139185812e2da3e9b
17+
refs/heads/auto: e29b7eedf9670e2a86647b318f6cb9c2a8a46463
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"Highlight the 78th text column
2+
"Feature became available in v7.3
3+
if version >= 703
4+
set colorcolumn=78
5+
endif

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,15 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\(f\|f32\|f64\)\>
103103
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9_]\+\)\>"
104104
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9_]\+\)\(f\|f32\|f64\)\>"
105105

106+
"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
107+
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
106108
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
107109

108110
syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo
109111
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
110112

111-
syn keyword rustTodo TODO FIXME XXX NB
113+
114+
syn keyword rustTodo TODO FIXME XXX NB unsafe
112115

113116
hi def link rustHexNumber rustNumber
114117
hi def link rustBinNumber rustNumber
@@ -134,6 +137,7 @@ hi def link rustType Type
134137
hi def link rustTodo Todo
135138
hi def link rustAttribute PreProc
136139
hi def link rustStorage StorageClass
140+
hi def link rustLifetime Special
137141

138142
" Other Suggestions:
139143
" hi rustAssert ctermfg=yellow

branches/auto/src/librustc/lib/llvm.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,6 @@ pub enum FileType {
184184
ObjectFile = 1
185185
}
186186

187-
pub enum Metadata {
188-
MD_dbg = 0,
189-
MD_tbaa = 1,
190-
MD_prof = 2,
191-
MD_fpmath = 3,
192-
MD_range = 4,
193-
MD_tbaa_struct = 5
194-
}
195-
196187
// Opaque pointer types
197188
pub enum Module_opaque {}
198189
pub type ModuleRef = *Module_opaque;

branches/auto/src/librustc/middle/trans/_match.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,29 +1361,13 @@ pub fn compile_submatch(bcx: block,
13611361
if opts.len() > 0u {
13621362
match opts[0] {
13631363
var(_, vdef) => {
1364-
let variants = ty::enum_variants(tcx, vdef.enm);
1365-
if variants.len() == 1 {
1364+
if (*ty::enum_variants(tcx, vdef.enm)).len() == 1u {
13661365
kind = single;
13671366
} else {
13681367
let enumptr =
13691368
PointerCast(bcx, val, T_opaque_enum_ptr(ccx));
13701369
let discrimptr = GEPi(bcx, enumptr, [0u, 0u]);
1371-
1372-
1373-
assert variants.len() > 1;
1374-
let min_discrim = do variants.foldr(0) |&x, y| {
1375-
int::min(x.disr_val, y)
1376-
};
1377-
let max_discrim = do variants.foldr(0) |&x, y| {
1378-
int::max(x.disr_val, y)
1379-
};
1380-
1381-
test_val = LoadRangeAssert(bcx, discrimptr,
1382-
min_discrim as c_ulonglong,
1383-
(max_discrim + 1)
1384-
as c_ulonglong,
1385-
lib::llvm::True);
1386-
1370+
test_val = Load(bcx, discrimptr);
13871371
kind = switch;
13881372
}
13891373
}

branches/auto/src/librustc/middle/trans/build.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ use lib::llvm::llvm;
1414
use lib::llvm::{CallConv, TypeKind, AtomicBinOp, AtomicOrdering};
1515
use lib::llvm::{Opcode, IntPredicate, RealPredicate, True, False};
1616
use lib::llvm::{ValueRef, TypeRef, BasicBlockRef, BuilderRef, ModuleRef};
17-
use libc::{c_uint, c_int, c_ulonglong};
17+
use libc::{c_uint, c_int};
1818
use middle::trans::common::*;
19-
use middle::trans::machine::llsize_of_real;
2019

2120
use core::cast::transmute;
2221
use core::cast;
@@ -537,25 +536,6 @@ pub fn Load(cx: block, PointerVal: ValueRef) -> ValueRef {
537536
}
538537
}
539538
540-
pub fn LoadRangeAssert(cx: block, PointerVal: ValueRef, lo: c_ulonglong,
541-
hi: c_ulonglong, signed: lib::llvm::Bool) -> ValueRef {
542-
let value = Load(cx, PointerVal);
543-
544-
unsafe {
545-
let t = llvm::LLVMGetElementType(llvm::LLVMTypeOf(PointerVal));
546-
let min = llvm::LLVMConstInt(t, lo, signed);
547-
let max = llvm::LLVMConstInt(t, hi, signed);
548-
549-
550-
do vec::as_imm_buf([min, max]) |ptr, len| {
551-
llvm::LLVMSetMetadata(value, lib::llvm::MD_range as c_uint,
552-
llvm::LLVMMDNode(ptr, len as c_uint));
553-
}
554-
}
555-
556-
value
557-
}
558-
559539
pub fn Store(cx: block, Val: ValueRef, Ptr: ValueRef) {
560540
unsafe {
561541
if cx.unreachable { return; }

branches/auto/src/librustc/middle/trans/datum.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,7 @@ pub impl Datum {
431431
} else {
432432
match self.mode {
433433
ByValue => self.val,
434-
ByRef => {
435-
if ty::type_is_bool(self.ty) {
436-
LoadRangeAssert(bcx, self.val, 0, 2, lib::llvm::True)
437-
} else {
438-
Load(bcx, self.val)
439-
}
440-
}
434+
ByRef => Load(bcx, self.val)
441435
}
442436
}
443437
}

0 commit comments

Comments
 (0)