Skip to content

Commit f02b354

Browse files
committed
---
yaml --- r: 151029 b: refs/heads/try2 c: c3b2f2b h: refs/heads/master i: 151027: 6fd27f1 v: v3
1 parent d4afdb4 commit f02b354

File tree

28 files changed

+25
-89
lines changed

28 files changed

+25
-89
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: bcc3e8c0d44bbbbf752db45a9c85f7ac4b4d61ce
8+
refs/heads/try2: c3b2f2b0c6f074fb98add56a1977d407e294c9ed
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,7 @@ defining one.
22532253
22542254
The type parameters bound by a trait are in scope in each of the
22552255
method declarations. So, re-declaring the type parameter
2256-
`T` as an explicit type parameter for `length`, in either the trait or
2256+
`T` as an explicit type parameter for `len`, in either the trait or
22572257
the impl, would be a compile-time error.
22582258
22592259
Within a trait definition, `Self` is a special type that you can think

branches/try2/src/libhexfloat/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) ->
105105
Some(Ident{ident, span}) => match token::get_ident(ident).get() {
106106
"f32" => Some(ast::TyF32),
107107
"f64" => Some(ast::TyF64),
108-
"f128" => Some(ast::TyF128),
109108
_ => {
110109
cx.span_err(span, "invalid floating point type in hexfloat!");
111110
None

branches/try2/src/librustc/front/feature_gate.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
5757
("linkage", Active),
5858
("struct_inherit", Active),
5959

60-
("quad_precision_float", Active),
61-
6260
// These are used to test this portion of the compiler, they don't actually
6361
// mean anything
6462
("test_accepted_feature", Accepted),
@@ -79,15 +77,13 @@ enum Status {
7977

8078
/// A set of features to be used by later passes.
8179
pub struct Features {
82-
pub default_type_params: Cell<bool>,
83-
pub quad_precision_float: Cell<bool>
80+
pub default_type_params: Cell<bool>
8481
}
8582

8683
impl Features {
8784
pub fn new() -> Features {
8885
Features {
89-
default_type_params: Cell::new(false),
90-
quad_precision_float: Cell::new(false)
86+
default_type_params: Cell::new(false)
9187
}
9288
}
9389
}
@@ -368,5 +364,4 @@ pub fn check_crate(sess: &Session, krate: &ast::Crate) {
368364
sess.abort_if_errors();
369365

370366
sess.features.default_type_params.set(cx.has_feature("default_type_params"));
371-
sess.features.quad_precision_float.set(cx.has_feature("quad_precision_float"));
372367
}

branches/try2/src/librustc/metadata/tydecode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,6 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
317317
'D' => return ty::mk_mach_int(ast::TyI64),
318318
'f' => return ty::mk_mach_float(ast::TyF32),
319319
'F' => return ty::mk_mach_float(ast::TyF64),
320-
'Q' => return ty::mk_mach_float(ast::TyF128),
321320
_ => fail!("parse_ty: bad numeric type")
322321
}
323322
}

branches/try2/src/librustc/metadata/tyencode.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ fn enc_sty(w: &mut MemWriter, cx: &ctxt, st: &ty::sty) {
236236
match t {
237237
TyF32 => mywrite!(w, "Mf"),
238238
TyF64 => mywrite!(w, "MF"),
239-
TyF128 => mywrite!(w, "MQ")
240239
}
241240
}
242241
ty::ty_enum(def, ref substs) => {

branches/try2/src/librustc/middle/resolve.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,6 @@ fn PrimitiveTypeTable() -> PrimitiveTypeTable {
772772
table.intern("char", TyChar);
773773
table.intern("f32", TyFloat(TyF32));
774774
table.intern("f64", TyFloat(TyF64));
775-
table.intern("f128", TyFloat(TyF128));
776775
table.intern("int", TyInt(TyI));
777776
table.intern("i8", TyInt(TyI8));
778777
table.intern("i16", TyInt(TyI16));

branches/try2/src/librustc/middle/trans/debuginfo.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,7 @@ fn basic_type_metadata(cx: &CrateContext, t: ty::t) -> DIType {
11701170
},
11711171
ty::ty_float(float_ty) => match float_ty {
11721172
ast::TyF32 => ("f32".to_owned(), DW_ATE_float),
1173-
ast::TyF64 => ("f64".to_owned(), DW_ATE_float),
1174-
ast::TyF128 => ("f128".to_owned(), DW_ATE_float)
1173+
ast::TyF64 => ("f64".to_owned(), DW_ATE_float)
11751174
},
11761175
_ => cx.sess().bug("debuginfo::basic_type_metadata - t is invalid type")
11771176
};

branches/try2/src/librustc/middle/trans/reflect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ impl<'a, 'b> Reflector<'a, 'b> {
163163
ty::ty_uint(ast::TyU64) => self.leaf("u64"),
164164
ty::ty_float(ast::TyF32) => self.leaf("f32"),
165165
ty::ty_float(ast::TyF64) => self.leaf("f64"),
166-
ty::ty_float(ast::TyF128) => self.leaf("f128"),
167166

168167
// Should rename to str_*/vec_*.
169168
ty::ty_str(vst) => {

branches/try2/src/librustc/middle/trans/type_.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ impl Type {
8888
ty!(llvm::LLVMDoubleTypeInContext(ccx.llcx))
8989
}
9090

91-
pub fn f128(ccx: &CrateContext) -> Type {
92-
ty!(llvm::LLVMFP128TypeInContext(ccx.llcx))
93-
}
94-
9591
pub fn bool(ccx: &CrateContext) -> Type {
9692
Type::i8(ccx)
9793
}
@@ -134,8 +130,7 @@ impl Type {
134130
pub fn float_from_ty(ccx: &CrateContext, t: ast::FloatTy) -> Type {
135131
match t {
136132
ast::TyF32 => Type::f32(ccx),
137-
ast::TyF64 => Type::f64(ccx),
138-
ast::TyF128 => Type::f128(ccx)
133+
ast::TyF64 => Type::f64(ccx)
139134
}
140135
}
141136

branches/try2/src/librustc/middle/ty.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ mod primitives {
706706
def_prim_ty!(TY_U64, super::ty_uint(ast::TyU64), 12)
707707
def_prim_ty!(TY_F32, super::ty_float(ast::TyF32), 14)
708708
def_prim_ty!(TY_F64, super::ty_float(ast::TyF64), 15)
709-
def_prim_ty!(TY_F128, super::ty_float(ast::TyF128), 16)
710709

711710
pub static TY_BOT: t_box_ = t_box_ {
712711
sty: super::ty_bot,
@@ -1306,9 +1305,6 @@ pub fn mk_f32() -> t { mk_prim_t(&primitives::TY_F32) }
13061305
#[inline]
13071306
pub fn mk_f64() -> t { mk_prim_t(&primitives::TY_F64) }
13081307

1309-
#[inline]
1310-
pub fn mk_f128() -> t { mk_prim_t(&primitives::TY_F128) }
1311-
13121308
#[inline]
13131309
pub fn mk_uint() -> t { mk_prim_t(&primitives::TY_UINT) }
13141310

@@ -1348,7 +1344,6 @@ pub fn mk_mach_float(tm: ast::FloatTy) -> t {
13481344
match tm {
13491345
ast::TyF32 => mk_f32(),
13501346
ast::TyF64 => mk_f64(),
1351-
ast::TyF128 => mk_f128()
13521347
}
13531348
}
13541349

branches/try2/src/librustc/middle/typeck/astconv.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,6 @@ pub fn ast_ty_to_prim_ty(tcx: &ty::ctxt, ast_ty: &ast::Ty) -> Option<ty::t> {
341341
Some(ty::mk_mach_uint(uit))
342342
}
343343
ast::TyFloat(ft) => {
344-
if ft == ast::TyF128 && !tcx.sess.features.quad_precision_float.get() {
345-
tcx.sess.span_err(path.span, "quadruple precision floats are \
346-
missing complete runtime support");
347-
tcx.sess.span_note(path.span, "add \
348-
#[feature(quad_precision_float)] \
349-
to the crate attributes to enable");
350-
}
351344
check_path_args(tcx, path, NO_TPS | NO_REGIONS);
352345
Some(ty::mk_mach_float(ft))
353346
}

branches/try2/src/librustdoc/html/format.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@ impl fmt::Show for clean::Type {
332332
ast::TyUint(ast::TyU64) => "u64",
333333
ast::TyFloat(ast::TyF32) => "f32",
334334
ast::TyFloat(ast::TyF64) => "f64",
335-
ast::TyFloat(ast::TyF128) => "f128",
336335
ast::TyStr => "str",
337336
ast::TyBool => "bool",
338337
ast::TyChar => "char",

branches/try2/src/libstd/intrinsics.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ pub trait TyVisitor {
9595

9696
fn visit_f32(&mut self) -> bool;
9797
fn visit_f64(&mut self) -> bool;
98-
#[cfg(not(stage0))]
99-
fn visit_f128(&mut self) -> bool;
10098

10199
fn visit_char(&mut self) -> bool;
102100

branches/try2/src/libstd/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@
5252
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
5353
html_root_url = "http://static.rust-lang.org/doc/master")]
5454
#![feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args,
55-
simd, linkage, default_type_params, phase, concat_idents, quad_precision_float)]
55+
simd, linkage, default_type_params, phase, concat_idents)]
5656

5757
// Don't link to std. We are std.
5858
#![no_std]
5959

60-
// NOTE: remove after snapshot
61-
#![allow(unknown_features)]
6260
#![deny(missing_doc)]
6361

6462
// When testing libstd, bring in libuv as the I/O backend so tests can print

branches/try2/src/libstd/reflect.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,6 @@ impl<V:TyVisitor + MovePtr> TyVisitor for MovePtrAdaptor<V> {
176176
true
177177
}
178178

179-
#[cfg(not(stage0))]
180-
fn visit_f128(&mut self) -> bool {
181-
self.align_to::<f128>();
182-
if ! self.inner.visit_f128() { return false; }
183-
self.bump_past::<f128>();
184-
true
185-
}
186-
187179
fn visit_char(&mut self) -> bool {
188180
self.align_to::<char>();
189181
if ! self.inner.visit_char() { return false; }

branches/try2/src/libstd/repr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,6 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
280280

281281
fn visit_f32(&mut self) -> bool { self.write::<f32>() }
282282
fn visit_f64(&mut self) -> bool { self.write::<f64>() }
283-
#[cfg(not(stage0))]
284-
fn visit_f128(&mut self) -> bool { fail!("not implemented") }
285283

286284
fn visit_char(&mut self) -> bool {
287285
self.get::<char>(|this, &ch| {

branches/try2/src/libsyntax/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ pub struct TyParam {
181181
pub ident: Ident,
182182
pub id: NodeId,
183183
pub bounds: OwnedSlice<TyParamBound>,
184-
pub default: Option<P<Ty>>
184+
pub default: Option<P<Ty>>,
185+
pub span: Span
185186
}
186187

187188
#[deriving(Clone, Eq, TotalEq, Encodable, Decodable, Hash)]
@@ -730,7 +731,6 @@ impl fmt::Show for UintTy {
730731
pub enum FloatTy {
731732
TyF32,
732733
TyF64,
733-
TyF128
734734
}
735735

736736
impl fmt::Show for FloatTy {

branches/try2/src/libsyntax/ast_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn uint_ty_max(t: UintTy) -> u64 {
187187
}
188188

189189
pub fn float_ty_to_str(t: FloatTy) -> ~str {
190-
match t { TyF32 => "f32".to_owned(), TyF64 => "f64".to_owned(), TyF128 => "f128".to_owned() }
190+
match t { TyF32 => "f32".to_owned(), TyF64 => "f64".to_owned() }
191191
}
192192

193193
pub fn is_call_expr(e: @Expr) -> bool {

branches/try2/src/libsyntax/ext/build.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ pub trait AstBuilder {
6666
fn strip_bounds(&self, bounds: &Generics) -> Generics;
6767

6868
fn typaram(&self,
69+
span: Span,
6970
id: ast::Ident,
7071
bounds: OwnedSlice<ast::TyParamBound>,
7172
default: Option<P<ast::Ty>>) -> ast::TyParam;
@@ -368,14 +369,16 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
368369
}
369370

370371
fn typaram(&self,
372+
span: Span,
371373
id: ast::Ident,
372374
bounds: OwnedSlice<ast::TyParamBound>,
373375
default: Option<P<ast::Ty>>) -> ast::TyParam {
374376
ast::TyParam {
375377
ident: id,
376378
id: ast::DUMMY_NODE_ID,
377379
bounds: bounds,
378-
default: default
380+
default: default,
381+
span: span
379382
}
380383
}
381384

branches/try2/src/libsyntax/ext/deriving/generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl<'a> TraitDef<'a> {
380380
// require the current trait
381381
bounds.push(cx.typarambound(trait_path.clone()));
382382

383-
cx.typaram(ty_param.ident, OwnedSlice::from_vec(bounds), None)
383+
cx.typaram(self.span, ty_param.ident, OwnedSlice::from_vec(bounds), None)
384384
}));
385385
let trait_generics = Generics {
386386
lifetimes: lifetimes,

branches/try2/src/libsyntax/ext/deriving/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fn mk_ty_param(cx: &ExtCtxt, span: Span, name: &str, bounds: &[Path],
193193
let path = b.to_path(cx, span, self_ident, self_generics);
194194
cx.typarambound(path)
195195
}).collect();
196-
cx.typaram(cx.ident_of(name), bounds, None)
196+
cx.typaram(span, cx.ident_of(name), bounds, None)
197197
}
198198

199199
fn mk_generics(lifetimes: Vec<ast::Lifetime> , ty_params: Vec<ast::TyParam> ) -> Generics {

branches/try2/src/libsyntax/ext/quote.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,7 @@ fn mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr {
436436
LIT_FLOAT(fident, fty) => {
437437
let s_fty = match fty {
438438
ast::TyF32 => "TyF32".to_owned(),
439-
ast::TyF64 => "TyF64".to_owned(),
440-
ast::TyF128 => "TyF128".to_owned()
439+
ast::TyF64 => "TyF64".to_owned()
441440
};
442441
let e_fty = cx.expr_ident(sp, id_ext(s_fty));
443442

branches/try2/src/libsyntax/fold.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ pub fn fold_ty_param<T: Folder>(tp: &TyParam, fld: &mut T) -> TyParam {
448448
ident: tp.ident,
449449
id: id,
450450
bounds: tp.bounds.map(|x| fold_ty_param_bound(x, fld)),
451-
default: tp.default.map(|x| fld.fold_ty(x))
451+
default: tp.default.map(|x| fld.fold_ty(x)),
452+
span: tp.span
452453
}
453454
}
454455

branches/try2/src/libsyntax/parse/lexer.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -593,15 +593,10 @@ fn scan_number(c: char, rdr: &mut StringReader) -> token::Token {
593593
/* FIXME (#2252): if this is out of range for either a
594594
32-bit or 64-bit float, it won't be noticed till the
595595
back-end. */
596-
} else if c == '1' && n == '2' && nextnextch(rdr).unwrap_or('\x00') == '8' {
597-
bump(rdr);
598-
bump(rdr);
599-
bump(rdr);
600-
check_float_base(rdr, start_bpos, rdr.last_pos, base);
601-
return token::LIT_FLOAT(str_to_ident(num_str.as_slice()), ast::TyF128);
596+
} else {
597+
fatal_span(rdr, start_bpos, rdr.last_pos,
598+
"expected `f32` or `f64` suffix".to_owned());
602599
}
603-
fatal_span(rdr, start_bpos, rdr.last_pos,
604-
"expected `f32`, `f64` or `f128` suffix".to_owned());
605600
}
606601
if is_float {
607602
check_float_base(rdr, start_bpos, rdr.last_pos, base);

branches/try2/src/libsyntax/parse/parser.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3393,6 +3393,7 @@ impl<'a> Parser<'a> {
33933393
// matches typaram = IDENT optbounds ( EQ ty )?
33943394
fn parse_ty_param(&mut self) -> TyParam {
33953395
let ident = self.parse_ident();
3396+
let span = self.span;
33963397
let (_, opt_bounds) = self.parse_optional_ty_param_bounds(false);
33973398
// For typarams we don't care about the difference b/w "<T>" and "<T:>".
33983399
let bounds = opt_bounds.unwrap_or_default();
@@ -3407,7 +3408,8 @@ impl<'a> Parser<'a> {
34073408
ident: ident,
34083409
id: ast::DUMMY_NODE_ID,
34093410
bounds: bounds,
3410-
default: default
3411+
default: default,
3412+
span: span,
34113413
}
34123414
}
34133415

branches/try2/src/test/run-pass/quad-precision-float.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

branches/try2/src/test/run-pass/reflect-visit-type.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ impl TyVisitor for MyVisitor {
5858

5959
fn visit_f32(&mut self) -> bool { true }
6060
fn visit_f64(&mut self) -> bool { true }
61-
fn visit_f128(&mut self) -> bool { true }
6261

6362
fn visit_char(&mut self) -> bool { true }
6463

0 commit comments

Comments
 (0)