Skip to content

Commit 04f3a17

Browse files
committed
---
yaml --- r: 209820 b: refs/heads/try c: 58b3b8b h: refs/heads/master v: v3
1 parent ebdfbf1 commit 04f3a17

37 files changed

+76
-129
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: be260316725f55ad0e4236204b8ec2d6a7792272
5+
refs/heads/try: 58b3b8bcfa0546cf571906df48185b7bfcf249b9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/mk/tests.mk

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -753,22 +753,20 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
753753
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
754754
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
755755
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
756+
# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
757+
# external crates.
758+
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
759+
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
760+
PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
761+
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
762+
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
756763
PRETTY_DIRNAME_pretty-rpass = run-pass
757764
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
758765
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
759766
PRETTY_DIRNAME_pretty-rfail = run-fail
760767
PRETTY_DIRNAME_pretty-bench = bench
761768
PRETTY_DIRNAME_pretty-pretty = pretty
762769

763-
define DEF_PRETTY_FULLDEPS
764-
PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rpass-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
765-
endef
766-
767-
$(foreach host,$(CFG_HOST), \
768-
$(foreach target,$(CFG_TARGET), \
769-
$(foreach stage,$(STAGES), \
770-
$(eval $(call DEF_PRETTY_FULLDEPS,$(stage),$(target),$(host))))))
771-
772770
define DEF_RUN_PRETTY_TEST
773771

774772
PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
@@ -782,7 +780,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
782780
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
783781
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
784782
$$(PRETTY_DEPS_$(4)) \
785-
$$(PRETTY_DEPS$(1)_T_$(2)_H_$(3)_$(4))
783+
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
786784
@$$(call E, run pretty-rpass [$(2)]: $$<)
787785
$$(Q)touch $$@.start_time
788786
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \

branches/try/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ fn make_out_name(config: &Config, testfile: &Path, extension: &str) -> PathBuf {
14651465
fn aux_output_dir_name(config: &Config, testfile: &Path) -> PathBuf {
14661466
let f = output_base_name(config, testfile);
14671467
let mut fname = f.file_name().unwrap().to_os_string();
1468-
fname.push(&format!(".{}.libaux", config.mode));
1468+
fname.push("libaux");
14691469
f.with_file_name(&fname)
14701470
}
14711471

branches/try/src/doc/reference.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ fn draw_twice<T: Shape>(surface: Surface, sh: T) {
15551555
}
15561556
```
15571557

1558-
Traits also define an [trait object](#trait-objects) with the same name as the
1558+
Traits also define an [object type](#object-types) with the same name as the
15591559
trait. Values of this type are created by [casting](#type-cast-expressions)
15601560
pointer values (pointing to a type for which an implementation of the given
15611561
trait is in scope) to pointers to the trait name, used as a type.
@@ -2146,7 +2146,7 @@ The following configurations must be defined by the implementation:
21462146
`"unix"` or `"windows"`. The value of this configuration option is defined
21472147
as a configuration itself, like `unix` or `windows`.
21482148
* `target_os = "..."`. Operating system of the target, examples include
2149-
`"win32"`, `"macos"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
2149+
`"windows"`, `"macos"`, `"ios"`, `"linux"`, `"android"`, `"freebsd"`, `"dragonfly"`,
21502150
`"bitrig"` or `"openbsd"`.
21512151
* `target_pointer_width = "..."`. Target pointer width in bits. This is set
21522152
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
@@ -2744,7 +2744,7 @@ A _method call_ consists of an expression followed by a single dot, an
27442744
identifier, and a parenthesized expression-list. Method calls are resolved to
27452745
methods on specific traits, either statically dispatching to a method if the
27462746
exact `self`-type of the left-hand-side is known, or dynamically dispatching if
2747-
the left-hand-side expression is an indirect [trait object](#trait-objects).
2747+
the left-hand-side expression is an indirect [object type](#object-types).
27482748

27492749
### Field expressions
27502750

@@ -3649,23 +3649,23 @@ call_closure(closure_no_args, closure_args);
36493649

36503650
```
36513651

3652-
### Trait objects
3652+
### Object types
36533653

36543654
Every trait item (see [traits](#traits)) defines a type with the same name as
3655-
the trait. This type is called the _trait object_ of the trait. Trait objects
3655+
the trait. This type is called the _object type_ of the trait. Object types
36563656
permit "late binding" of methods, dispatched using _virtual method tables_
36573657
("vtables"). Whereas most calls to trait methods are "early bound" (statically
36583658
resolved) to specific implementations at compile time, a call to a method on an
3659-
trait objects is only resolved to a vtable entry at compile time. The actual
3659+
object type is only resolved to a vtable entry at compile time. The actual
36603660
implementation for each vtable entry can vary on an object-by-object basis.
36613661

36623662
Given a pointer-typed expression `E` of type `&T` or `Box<T>`, where `T`
36633663
implements trait `R`, casting `E` to the corresponding pointer type `&R` or
3664-
`Box<R>` results in a value of the _trait object_ `R`. This result is
3664+
`Box<R>` results in a value of the _object type_ `R`. This result is
36653665
represented as a pair of pointers: the vtable pointer for the `T`
36663666
implementation of `R`, and the pointer value of `E`.
36673667

3668-
An example of a trait object:
3668+
An example of an object type:
36693669

36703670
```
36713671
trait Printable {
@@ -3685,7 +3685,7 @@ fn main() {
36853685
}
36863686
```
36873687

3688-
In this example, the trait `Printable` occurs as a trait object in both the
3688+
In this example, the trait `Printable` occurs as an object type in both the
36893689
type signature of `print`, and the cast expression in `main`.
36903690

36913691
### Type parameters

branches/try/src/liballoc/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ impl<T> fmt::Pointer for Arc<T> {
675675
}
676676

677677
#[stable(feature = "rust1", since = "1.0.0")]
678-
impl<T: Default> Default for Arc<T> {
678+
impl<T: Default + Sync + Send> Default for Arc<T> {
679679
#[stable(feature = "rust1", since = "1.0.0")]
680680
fn default() -> Arc<T> { Arc::new(Default::default()) }
681681
}

branches/try/src/librustc/middle/traits/select.rs

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
532532
obligation.repr(self.tcx()));
533533

534534
self.infcx.probe(|snapshot| {
535-
match self.match_impl(impl_def_id, obligation, snapshot) {
536-
Ok((substs, skol_map)) => {
535+
let (skol_obligation_trait_ref, skol_map) =
536+
self.infcx().skolemize_late_bound_regions(&obligation.predicate, snapshot);
537+
match self.match_impl(impl_def_id, obligation, snapshot,
538+
&skol_map, skol_obligation_trait_ref.trait_ref.clone()) {
539+
Ok(substs) => {
537540
let vtable_impl = self.vtable_impl(impl_def_id,
538541
substs,
539542
obligation.cause.clone(),
@@ -1157,7 +1160,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
11571160
let all_impls = self.all_impls(def_id);
11581161
for &impl_def_id in &all_impls {
11591162
self.infcx.probe(|snapshot| {
1160-
match self.match_impl(impl_def_id, obligation, snapshot) {
1163+
let (skol_obligation_trait_pred, skol_map) =
1164+
self.infcx().skolemize_late_bound_regions(&obligation.predicate, snapshot);
1165+
match self.match_impl(impl_def_id, obligation, snapshot,
1166+
&skol_map, skol_obligation_trait_pred.trait_ref.clone()) {
11611167
Ok(_) => {
11621168
candidates.vec.push(ImplCandidate(impl_def_id));
11631169
}
@@ -2109,9 +2115,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
21092115
// First, create the substitutions by matching the impl again,
21102116
// this time not in a probe.
21112117
self.infcx.commit_if_ok(|snapshot| {
2112-
let (substs, skol_map) =
2118+
let (skol_obligation_trait_ref, skol_map) =
2119+
self.infcx().skolemize_late_bound_regions(&obligation.predicate, snapshot);
2120+
let substs =
21132121
self.rematch_impl(impl_def_id, obligation,
2114-
snapshot);
2122+
snapshot, &skol_map, skol_obligation_trait_ref.trait_ref);
21152123
debug!("confirm_impl_candidate substs={}", substs.repr(self.tcx()));
21162124
Ok(self.vtable_impl(impl_def_id, substs, obligation.cause.clone(),
21172125
obligation.recursion_depth + 1, skol_map, snapshot))
@@ -2298,11 +2306,14 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
22982306
fn rematch_impl(&mut self,
22992307
impl_def_id: ast::DefId,
23002308
obligation: &TraitObligation<'tcx>,
2301-
snapshot: &infer::CombinedSnapshot)
2302-
-> (Normalized<'tcx, Substs<'tcx>>, infer::SkolemizationMap)
2309+
snapshot: &infer::CombinedSnapshot,
2310+
skol_map: &infer::SkolemizationMap,
2311+
skol_obligation_trait_ref: Rc<ty::TraitRef<'tcx>>)
2312+
-> Normalized<'tcx, Substs<'tcx>>
23032313
{
2304-
match self.match_impl(impl_def_id, obligation, snapshot) {
2305-
Ok((substs, skol_map)) => (substs, skol_map),
2314+
match self.match_impl(impl_def_id, obligation, snapshot,
2315+
skol_map, skol_obligation_trait_ref) {
2316+
Ok(substs) => substs,
23062317
Err(()) => {
23072318
self.tcx().sess.bug(
23082319
&format!("Impl {} was matchable against {} but now is not",
@@ -2315,9 +2326,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
23152326
fn match_impl(&mut self,
23162327
impl_def_id: ast::DefId,
23172328
obligation: &TraitObligation<'tcx>,
2318-
snapshot: &infer::CombinedSnapshot)
2319-
-> Result<(Normalized<'tcx, Substs<'tcx>>,
2320-
infer::SkolemizationMap), ()>
2329+
snapshot: &infer::CombinedSnapshot,
2330+
skol_map: &infer::SkolemizationMap,
2331+
skol_obligation_trait_ref: Rc<ty::TraitRef<'tcx>>)
2332+
-> Result<Normalized<'tcx, Substs<'tcx>>, ()>
23212333
{
23222334
let impl_trait_ref = ty::impl_trait_ref(self.tcx(), impl_def_id).unwrap();
23232335

@@ -2328,11 +2340,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
23282340
return Err(());
23292341
}
23302342

2331-
let (skol_obligation, skol_map) = self.infcx().skolemize_late_bound_regions(
2332-
&obligation.predicate,
2333-
snapshot);
2334-
let skol_obligation_trait_ref = skol_obligation.trait_ref;
2335-
23362343
let impl_substs = util::fresh_type_vars_for_impl(self.infcx,
23372344
obligation.cause.span,
23382345
impl_def_id);
@@ -2363,17 +2370,17 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
23632370
return Err(());
23642371
}
23652372

2366-
if let Err(e) = self.infcx.leak_check(&skol_map, snapshot) {
2373+
if let Err(e) = self.infcx.leak_check(skol_map, snapshot) {
23672374
debug!("match_impl: failed leak check due to `{}`",
23682375
ty::type_err_to_str(self.tcx(), &e));
23692376
return Err(());
23702377
}
23712378

23722379
debug!("match_impl: success impl_substs={}", impl_substs.repr(self.tcx()));
2373-
Ok((Normalized {
2380+
Ok(Normalized {
23742381
value: impl_substs,
23752382
obligations: impl_trait_ref.obligations
2376-
}, skol_map))
2383+
})
23772384
}
23782385

23792386
fn fast_reject_trait_refs(&mut self,

branches/try/src/libstd/sync/mpsc/mod.rs

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,6 @@ pub struct Iter<'a, T: 'a> {
306306
rx: &'a Receiver<T>
307307
}
308308

309-
/// An owning iterator over messages on a receiver, this iterator will block
310-
/// whenever `next` is called, waiting for a new message, and `None` will be
311-
/// returned when the corresponding channel has hung up.
312-
#[stable(feature = "receiver_into_iter", since = "1.1.0")]
313-
pub struct IntoIter<T> {
314-
rx: Receiver<T>
315-
}
316-
317309
/// The sending-half of Rust's asynchronous channel type. This half can only be
318310
/// owned by one task, but it can be cloned to send to other tasks.
319311
#[stable(feature = "rust1", since = "1.0.0")]
@@ -907,29 +899,6 @@ impl<'a, T> Iterator for Iter<'a, T> {
907899
fn next(&mut self) -> Option<T> { self.rx.recv().ok() }
908900
}
909901

910-
#[stable(feature = "receiver_into_iter", since = "1.1.0")]
911-
impl<'a, T> IntoIterator for &'a Receiver<T> {
912-
type Item = T;
913-
type IntoIter = Iter<'a, T>;
914-
915-
fn into_iter(self) -> Iter<'a, T> { self.iter() }
916-
}
917-
918-
impl<T> Iterator for IntoIter<T> {
919-
type Item = T;
920-
fn next(&mut self) -> Option<T> { self.rx.recv().ok() }
921-
}
922-
923-
#[stable(feature = "receiver_into_iter", since = "1.1.0")]
924-
impl <T> IntoIterator for Receiver<T> {
925-
type Item = T;
926-
type IntoIter = IntoIter<T>;
927-
928-
fn into_iter(self) -> IntoIter<T> {
929-
IntoIter { rx: self }
930-
}
931-
}
932-
933902
#[unsafe_destructor]
934903
#[stable(feature = "rust1", since = "1.0.0")]
935904
impl<T> Drop for Receiver<T> {
@@ -1538,32 +1507,6 @@ mod test {
15381507
assert_eq!(count_rx.recv().unwrap(), 4);
15391508
}
15401509

1541-
#[test]
1542-
fn test_recv_into_iter_owned() {
1543-
let mut iter = {
1544-
let (tx, rx) = channel::<i32>();
1545-
tx.send(1).unwrap();
1546-
tx.send(2).unwrap();
1547-
1548-
rx.into_iter()
1549-
};
1550-
assert_eq!(iter.next().unwrap(), 1);
1551-
assert_eq!(iter.next().unwrap(), 2);
1552-
assert_eq!(iter.next().is_none(), true);
1553-
}
1554-
1555-
#[test]
1556-
fn test_recv_into_iter_borrowed() {
1557-
let (tx, rx) = channel::<i32>();
1558-
tx.send(1).unwrap();
1559-
tx.send(2).unwrap();
1560-
drop(tx);
1561-
let mut iter = (&rx).into_iter();
1562-
assert_eq!(iter.next().unwrap(), 1);
1563-
assert_eq!(iter.next().unwrap(), 2);
1564-
assert_eq!(iter.next().is_none(), true);
1565-
}
1566-
15671510
#[test]
15681511
fn try_recv_states() {
15691512
let (tx1, rx1) = channel::<i32>();

branches/try/src/test/compile-fail-fulldeps/macro-crate-rlib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// aux-build:rlib_crate_test.rs
1212
// ignore-stage1
1313
// ignore-tidy-linelength
14+
// ignore-android
1415
// ignore-cross-compile gives a different error message
1516

1617
#![feature(plugin)]

branches/try/src/test/run-make/simd-ffi/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ define MK_TARGETS
2727
# on some platforms, but LLVM just prints a warning so that's fine for
2828
# now.
2929
$(1): simd.rs
30-
$$(RUSTC) --target=$(1) --emit=llvm-ir,asm simd.rs \
31-
-C target-feature='+neon,+sse2' -C extra-filename=-$(1)
30+
$$(RUSTC) --target=$(1) --emit=llvm-ir,asm simd.rs -C target-feature='+neon,+sse2'
3231
endef
3332

3433
$(foreach targetxxx,$(TARGETS),$(eval $(call MK_TARGETS,$(targetxxx))))

branches/try/src/test/run-pass-fulldeps/compiler-calls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Test that the CompilerCalls interface to the compiler works.
1212

13-
// ignore-cross-compile
13+
// ignore-android
1414

1515
#![feature(rustc_private, path)]
1616
#![feature(core)]

branches/try/src/test/run-pass-fulldeps/create-dir-all-bare.rs

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

11-
// ignore-cross-compile
11+
// ignore-android
1212

1313
#![feature(rustc_private)]
1414

branches/try/src/test/run-pass-fulldeps/issue-15149.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// no-prefer-dynamic
12-
// ignore-cross-compile
12+
// ignore-android
1313

1414
#![feature(rustc_private)]
1515

branches/try/src/test/run-pass-fulldeps/issue-16992.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// ignore-pretty
12-
// ignore-cross-compile
12+
// ignore-android
1313

1414
#![feature(quote, rustc_private)]
1515

branches/try/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs

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

11-
// ignore-cross-compile
11+
// ignore-android
1212
// ignore-pretty: does not work well with `--test`
1313

1414
#![feature(quote, rustc_private)]

branches/try/src/test/run-pass-fulldeps/qquote.rs

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

11-
// ignore-cross-compile
1211
// ignore-pretty
1312
// ignore-test
1413

branches/try/src/test/run-pass-fulldeps/quote-tokens.rs

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

11-
// ignore-cross-compile
11+
// ignore-android
1212
// ignore-pretty: does not work well with `--test`
1313

1414
#![feature(quote, rustc_private)]

0 commit comments

Comments
 (0)