Skip to content

Commit b285f1e

Browse files
committed
auto merge of #8455 : nikomatsakis/rust/issue-5762-objects-dralston-d, r=graydon
Fix #5762 and various other aspects of object invocation. r? @graydon
2 parents 63c62be + 7343478 commit b285f1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1155
-560
lines changed

src/librustc/back/abi.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ pub static tydesc_field_take_glue: uint = 2u;
4646
pub static tydesc_field_drop_glue: uint = 3u;
4747
pub static tydesc_field_free_glue: uint = 4u;
4848
pub static tydesc_field_visit_glue: uint = 5u;
49-
pub static n_tydesc_fields: uint = 6u;
49+
pub static tydesc_field_borrow_offset: uint = 6u;
50+
pub static n_tydesc_fields: uint = 7u;
5051

5152
// The two halves of a closure: code and environment.
5253
pub static fn_field_code: uint = 0u;

src/librustc/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ pub fn build_session(sopts: @session::options,
785785
pub fn build_session_(sopts: @session::options,
786786
cm: @codemap::CodeMap,
787787
demitter: diagnostic::Emitter,
788-
span_diagnostic_handler: @diagnostic::span_handler)
788+
span_diagnostic_handler: @mut diagnostic::span_handler)
789789
-> Session {
790790
let target_cfg = build_target_config(sopts, demitter);
791791
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler,

src/librustc/driver/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub struct Session_ {
192192
// For a library crate, this is always none
193193
entry_fn: @mut Option<(NodeId, codemap::span)>,
194194
entry_type: @mut Option<EntryFnType>,
195-
span_diagnostic: @diagnostic::span_handler,
195+
span_diagnostic: @mut diagnostic::span_handler,
196196
filesearch: @filesearch::FileSearch,
197197
building_library: @mut bool,
198198
working_dir: Path,
@@ -261,7 +261,7 @@ impl Session_ {
261261
pub fn next_node_id(@self) -> ast::NodeId {
262262
return syntax::parse::next_node_id(self.parse_sess);
263263
}
264-
pub fn diagnostic(@self) -> @diagnostic::span_handler {
264+
pub fn diagnostic(@self) -> @mut diagnostic::span_handler {
265265
self.span_diagnostic
266266
}
267267
pub fn debugging_opt(@self, opt: uint) -> bool {

src/librustc/metadata/creader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use syntax::oldvisit;
2929

3030
// Traverses an AST, reading all the information about use'd crates and extern
3131
// libraries necessary for later resolving, typechecking, linking, etc.
32-
pub fn read_crates(diag: @span_handler,
32+
pub fn read_crates(diag: @mut span_handler,
3333
crate: &ast::Crate,
3434
cstore: @mut cstore::CStore,
3535
filesearch: @FileSearch,
@@ -74,7 +74,7 @@ fn dump_crates(crate_cache: &[cache_entry]) {
7474
}
7575

7676
fn warn_if_multiple_versions(e: @mut Env,
77-
diag: @span_handler,
77+
diag: @mut span_handler,
7878
crate_cache: &[cache_entry]) {
7979
use std::either::*;
8080

@@ -113,7 +113,7 @@ fn warn_if_multiple_versions(e: @mut Env,
113113
}
114114

115115
struct Env {
116-
diag: @span_handler,
116+
diag: @mut span_handler,
117117
filesearch: @FileSearch,
118118
cstore: @mut cstore::CStore,
119119
os: loader::os,

src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub type encode_inlined_item<'self> = &'self fn(ecx: &EncodeContext,
5555
ii: ast::inlined_item);
5656

5757
pub struct EncodeParams<'self> {
58-
diag: @span_handler,
58+
diag: @mut span_handler,
5959
tcx: ty::ctxt,
6060
reexports2: middle::resolve::ExportMap2,
6161
item_symbols: &'self HashMap<ast::NodeId, ~str>,
@@ -82,7 +82,7 @@ struct Stats {
8282
}
8383

8484
pub struct EncodeContext<'self> {
85-
diag: @span_handler,
85+
diag: @mut span_handler,
8686
tcx: ty::ctxt,
8787
stats: @mut Stats,
8888
reexports2: middle::resolve::ExportMap2,

src/librustc/metadata/loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub enum os {
4343
}
4444

4545
pub struct Context {
46-
diag: @span_handler,
46+
diag: @mut span_handler,
4747
filesearch: @FileSearch,
4848
span: span,
4949
ident: @str,
@@ -163,7 +163,7 @@ pub fn package_id_from_metas(metas: &[@ast::MetaItem]) -> Option<@str> {
163163
}
164164

165165
pub fn note_linkage_attrs(intr: @ident_interner,
166-
diag: @span_handler,
166+
diag: @mut span_handler,
167167
attrs: ~[ast::Attribute]) {
168168
let r = attr::find_linkage_metas(attrs);
169169
for mi in r.iter() {

src/librustc/metadata/tyencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use syntax::diagnostic::span_handler;
2525
use syntax::print::pprust::*;
2626

2727
pub struct ctxt {
28-
diag: @span_handler,
28+
diag: @mut span_handler,
2929
// Def -> str Callback:
3030
ds: @fn(def_id) -> ~str,
3131
// The type context.

src/librustc/middle/astencode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ impl tr for method_origin {
586586
}
587587
)
588588
}
589-
typeck::method_trait(did, m, vstore) => {
590-
typeck::method_trait(did.tr(xcx), m, vstore)
589+
typeck::method_trait(did, m) => {
590+
typeck::method_trait(did.tr(xcx), m)
591591
}
592592
}
593593
}

src/librustc/middle/borrowck/check_loans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl<'self> CheckLoanCtxt<'self> {
362362
}
363363

364364
mc::cat_discr(b, _) |
365-
mc::cat_deref(b, _, mc::uniq_ptr(*)) => {
365+
mc::cat_deref(b, _, mc::uniq_ptr) => {
366366
assert_eq!(cmt.mutbl, mc::McInherited);
367367
cmt = b;
368368
}

src/librustc/middle/borrowck/gather_loans/gather_moves.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ fn check_is_legal_to_move_from(bccx: @BorrowckCtxt,
173173
}
174174
}
175175

176-
mc::cat_deref(b, _, mc::uniq_ptr(*)) |
176+
mc::cat_deref(b, _, mc::uniq_ptr) |
177177
mc::cat_discr(b, _) => {
178178
check_is_legal_to_move_from(bccx, cmt0, b)
179179
}

0 commit comments

Comments
 (0)