Skip to content

Commit c4c9ecc

Browse files
committed
---
yaml --- r: 46847 b: refs/heads/auto c: 239e642 h: refs/heads/master i: 46845: 60a585a 46843: 9518015 46839: b21d2fb 46831: 40d6c94 46815: 7d0bdcc 46783: cc9f7ca 46719: 0601442 46591: 98b4d64 v: v3
1 parent 5c9ca33 commit c4c9ecc

File tree

12 files changed

+22
-38
lines changed

12 files changed

+22
-38
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: 6b5d1afeec9ca48c224a8c69d1d3515edf9b1108
17+
refs/heads/auto: 239e64242c2f35b223403be611ad6a25ce8e76c2

branches/auto/src/libcore/sys.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ use str;
2222
pub type FreeGlue = &self/fn(*TypeDesc, *c_void);
2323

2424
// Corresponds to runtime type_desc type
25-
pub enum TypeDesc = {
25+
pub struct TypeDesc {
2626
size: uint,
2727
align: uint,
2828
take_glue: uint,
2929
drop_glue: uint,
3030
free_glue: uint
3131
// Remaining fields not listed
32-
};
32+
}
3333

3434
/// The representation of a Rust closure
3535
pub struct Closure {

branches/auto/src/librustc/front/intrinsic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ pub mod intrinsic {
2222
}
2323
}
2424

25-
pub enum TyDesc = {
25+
pub struct TyDesc {
2626
size: uint,
2727
align: uint
2828
// Remaining fields not listed
29-
};
29+
}
3030

3131
pub trait TyVisitor {
3232
fn visit_bot(&self) -> bool;

branches/auto/src/librustc/middle/region.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ use syntax::{ast, visit};
3636

3737
pub type parent = Option<ast::node_id>;
3838

39-
/* Records the parameter ID of a region name. */
40-
pub type binding = {
41-
node_id: ast::node_id,
42-
name: ~str,
43-
br: ty::bound_region
44-
};
45-
4639
/**
4740
Encodes the bounding lifetime for a given AST node:
4841

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ use util::ppaux::ty_to_str;
2222
// ______________________________________________________________________
2323
// compute sizeof / alignof
2424

25-
pub type metrics = {
26-
bcx: block,
27-
sz: ValueRef,
28-
align: ValueRef
29-
};
30-
31-
pub type tag_metrics = {
32-
bcx: block,
33-
sz: ValueRef,
34-
align: ValueRef,
35-
payload_align: ValueRef
36-
};
37-
3825
// Returns the number of bytes clobbered by a Store to this type.
3926
pub fn llsize_of_store(cx: @CrateContext, t: TypeRef) -> uint {
4027
unsafe {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,6 @@ type constness_cache = HashMap<ast::def_id, const_eval::constness>;
775775
pub type node_type_table = @mut SmallIntMap<t>;
776776

777777
fn mk_rcache() -> creader_cache {
778-
type val = {cnum: int, pos: uint, len: uint};
779778
return oldmap::HashMap();
780779
}
781780

branches/auto/src/librustc/middle/typeck/collect.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ pub fn collect_item_types(ccx: @mut CrateCtxt, crate: @ast::crate) {
9494
(intrinsic_item.ident, (def_id, ty));
9595
}
9696

97+
ast::item_struct(*) => {
98+
let ty = ty::mk_struct(ccx.tcx, def_id, substs);
99+
ccx.tcx.intrinsic_defs.insert
100+
(intrinsic_item.ident, (def_id, ty));
101+
}
102+
97103
_ => {}
98104
}
99105
}

branches/auto/src/librustdoc/demo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use core::prelude::*;
2626
/// The base price of a muffin on a non-holiday
2727
const price_of_a_muffin: float = 70f;
2828

29-
type WaitPerson = {
29+
struct WaitPerson {
3030
hair_color: ~str
31-
};
31+
}
3232

3333
/// The type of things that produce omnomnom
3434
enum OmNomNomy {

branches/auto/src/libsyntax/codemap.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ pub struct FileLines {
217217
pub enum FileSubstr {
218218
pub FssNone,
219219
pub FssInternal(span),
220-
pub FssExternal({filename: ~str, line: uint, col: CharPos})
221220
}
222221

223222
/// Identifies an offset of a multi-byte character in a FileMap
@@ -348,12 +347,6 @@ pub impl CodeMap {
348347
FssInternal(sp) =>
349348
self.lookup_char_pos_adj(
350349
sp.lo + (pos - loc.file.start_pos)),
351-
FssExternal(ref eloc) =>
352-
LocWithOpt {
353-
filename: /* FIXME (#2543) */ copy (*eloc).filename,
354-
line: (*eloc).line + loc.line - 1u,
355-
col: if loc.line == 1 {eloc.col + loc.col} else {loc.col},
356-
file: None}
357350
}
358351
}
359352
@@ -368,7 +361,6 @@ pub impl CodeMap {
368361
expn_info: sp.expn_info
369362
})
370363
}
371-
FssExternal(_) => sp
372364
}
373365
}
374366

branches/auto/src/libsyntax/parse/obsolete.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub enum ObsoleteSyntax {
4949
ObsoleteMutOwnedPointer,
5050
ObsoleteMutVector,
5151
ObsoleteTraitImplVisibility,
52+
ObsoleteRecordType,
5253
}
5354

5455
impl to_bytes::IterBytes for ObsoleteSyntax {
@@ -145,6 +146,10 @@ pub impl Parser {
145146
because the `impl...for...` form defines overloads for \
146147
methods that already exist; remove the `pub` or `priv`"
147148
),
149+
ObsoleteRecordType => (
150+
"structural record type",
151+
"use a structure instead"
152+
),
148153
};
149154

150155
self.report(sp, kind, kind_str, desc);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ use parse::obsolete::{ObsoleteSyntax, ObsoleteLowerCaseKindBounds};
7575
use parse::obsolete::{ObsoleteUnsafeBlock, ObsoleteImplSyntax};
7676
use parse::obsolete::{ObsoleteTraitBoundSeparator, ObsoleteMutOwnedPointer};
7777
use parse::obsolete::{ObsoleteMutVector, ObsoleteTraitImplVisibility};
78+
use parse::obsolete::{ObsoleteRecordType};
7879
use parse::prec::{as_prec, token_to_binop};
7980
use parse::token::{can_begin_expr, is_ident, is_ident_or_path};
8081
use parse::token::{is_plain_ident, INTERPOLATED, special_idents};
@@ -657,6 +658,7 @@ pub impl Parser {
657658
if elems.len() == 0 {
658659
self.unexpected_last(&token::RBRACE);
659660
}
661+
self.obsolete(*self.last_span, ObsoleteRecordType);
660662
ty_rec(elems)
661663
} else if *self.token == token::LBRACKET {
662664
self.expect(&token::LBRACKET);

branches/auto/src/test/run-pass/alignment-gep-tup-like-1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
type pair<A,B> = {
11+
struct pair<A,B> {
1212
a: A, b: B
13-
};
13+
}
1414

1515
fn f<A:Copy + &static>(a: A, b: u16) -> @fn() -> (A, u16) {
1616
let result: @fn() -> (A, u16) = || (a, b);

0 commit comments

Comments
 (0)