Skip to content

Commit 977d131

Browse files
committed
---
yaml --- r: 277499 b: refs/heads/try c: 0649942 h: refs/heads/master i: 277497: 1703ece 277495: d027410
1 parent 0d18599 commit 977d131

File tree

21 files changed

+40
-140
lines changed

21 files changed

+40
-140
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: adda14a0339ff47c526d8fb6897d70fbd73a5768
4+
refs/heads/try: 0649942a46d29a4782b4bfcce1c6fe006ad63dc6
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Read ["Installing Rust"] from [The Book].
1616

1717
1. Make sure you have installed the dependencies:
1818

19-
* `g++` 4.7 or later or `clang++` 3.x
19+
* `g++` 4.7 or `clang++` 3.x
2020
* `python` 2.7 (but not 3.x)
2121
* GNU `make` 3.81 or later
2222
* `curl`

branches/try/configure

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,19 +1453,6 @@ then
14531453
cd ${CFG_BUILD_DIR}
14541454
fi
14551455

1456-
# Do a sanity check that the submodule source exists. Because GitHub
1457-
# automatically publishes broken tarballs that can't be disabled, and
1458-
# people download them and try to use them.
1459-
if [ ! -e "${CFG_SRC_DIR}/src/liblibc" ]; then
1460-
err "some submodules are missing. Is this a broken tarball?
1461-
1462-
If you downloaded this tarball from the GitHub release pages at
1463-
https://github.com/rust-lang/rust/releases,
1464-
then please delete it and instead download the source from
1465-
https://www.rust-lang.org/downloads.html"
1466-
1467-
fi
1468-
14691456
# Configure llvm, only if necessary
14701457
step_msg "looking at LLVM"
14711458
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/

branches/try/src/libcollections/btree/map.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,15 +1654,6 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
16541654
Vacant(entry) => entry.insert(default()),
16551655
}
16561656
}
1657-
1658-
/// Returns a reference to this entry's key.
1659-
#[unstable(feature = "map_entry_keys", issue = "32281")]
1660-
pub fn key(&self) -> &K {
1661-
match *self {
1662-
Occupied(ref entry) => entry.key(),
1663-
Vacant(ref entry) => entry.key(),
1664-
}
1665-
}
16661657
}
16671658

16681659
impl<'a, K: Ord, V> VacantEntry<'a, K, V> {

branches/try/src/libcollections/btree/set.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ impl<T: Ord> BTreeSet<T> {
477477

478478
/// Adds a value to the set.
479479
///
480-
/// If the set did not have this value present, `true` is returned.
480+
/// If the set did not have a value present, `true` is returned.
481481
///
482-
/// If the set did have this value present, `false` is returned, and the
482+
/// If the set did have this key present, `false` is returned, and the
483483
/// entry is not updated. See the [module-level documentation] for more.
484484
///
485485
/// [module-level documentation]: index.html#insert-and-complex-keys

branches/try/src/librustc/hir/lowering.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ fn cache_ids<'a, OP, R>(lctx: &LoweringContext, expr_id: NodeId, op: OP) -> R
213213
let id_cache: &mut HashMap<_, _> = &mut lctx.id_cache.borrow_mut();
214214

215215
if id_cache.contains_key(&expr_id) {
216+
panic!("relowering!!!");
217+
/*
216218
let cached_id = lctx.cached_id.get();
217219
if cached_id == 0 {
218220
// We're entering a node where we need to track ids, but are not
@@ -224,6 +226,7 @@ fn cache_ids<'a, OP, R>(lctx: &LoweringContext, expr_id: NodeId, op: OP) -> R
224226
assert!(cached_id == id_cache[&expr_id], "id mismatch");
225227
}
226228
lctx.gensym_key.set(id_cache[&expr_id]);
229+
*/
227230
} else {
228231
// We've never lowered this node before, remember it for next time.
229232
let next_id = lctx.id_assigner.peek_node_id();

branches/try/src/librustc_driver/driver.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,21 @@ pub fn phase_2_configure_and_expand(sess: &Session,
645645
ret
646646
});
647647

648+
// Needs to go *after* expansion to be able to check the results
649+
// of macro expansion. This runs before #[cfg] to try to catch as
650+
// much as possible (e.g. help the programmer avoid platform
651+
// specific differences)
652+
time(time_passes, "complete gated feature checking 1", || {
653+
sess.track_errors(|| {
654+
let features = syntax::feature_gate::check_crate(sess.codemap(),
655+
&sess.parse_sess.span_diagnostic,
656+
&krate,
657+
&attributes,
658+
sess.opts.unstable_features);
659+
*sess.features.borrow_mut() = features;
660+
})
661+
})?;
662+
648663
// JBC: make CFG processing part of expansion to avoid this problem:
649664

650665
// strip again, in case expansion added anything with a #[cfg].
@@ -683,8 +698,10 @@ pub fn phase_2_configure_and_expand(sess: &Session,
683698
"checking for inline asm in case the target doesn't support it",
684699
|| no_asm::check_crate(sess, &krate));
685700

686-
// Needs to go *after* expansion to be able to check the results of macro expansion.
687-
time(time_passes, "complete gated feature checking", || {
701+
// One final feature gating of the true AST that gets compiled
702+
// later, to make sure we've got everything (e.g. configuration
703+
// can insert new attributes via `cfg_attr`)
704+
time(time_passes, "complete gated feature checking 2", || {
688705
sess.track_errors(|| {
689706
let features = syntax::feature_gate::check_crate(sess.codemap(),
690707
&sess.parse_sess.span_diagnostic,

branches/try/src/librustc_resolve/diagnostics.rs

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -948,51 +948,6 @@ use something_which_doesnt_exist;
948948
Please verify you didn't misspell the import's name.
949949
"##,
950950

951-
E0434: r##"
952-
This error indicates that a variable usage inside an inner function is invalid
953-
because the variable comes from a dynamic environment. Inner functions do not
954-
have access to their containing environment.
955-
956-
Example of erroneous code:
957-
958-
```compile_fail
959-
fn foo() {
960-
let y = 5;
961-
fn bar() -> u32 {
962-
y // error: can't capture dynamic environment in a fn item; use the
963-
// || { ... } closure form instead.
964-
}
965-
}
966-
```
967-
968-
Functions do not capture local variables. To fix this error, you can replace the
969-
function with a closure:
970-
971-
```
972-
fn foo() {
973-
let y = 5;
974-
let bar = || {
975-
y
976-
};
977-
}
978-
```
979-
980-
or replace the captured variable with a constant or a static item:
981-
982-
```
983-
fn foo() {
984-
static mut X: u32 = 4;
985-
const Y: u32 = 5;
986-
fn bar() -> u32 {
987-
unsafe {
988-
X = 3;
989-
}
990-
Y
991-
}
992-
}
993-
```
994-
"##,
995-
996951
E0435: r##"
997952
A non-constant value was used to initialise a constant. Example of erroneous
998953
code:
@@ -1089,4 +1044,5 @@ register_diagnostics! {
10891044
E0421, // unresolved associated const
10901045
E0427, // cannot use `ref` binding mode with ...
10911046
E0429, // `self` imports are only allowed within a { } list
1047+
E0434, // can't capture dynamic environment in a fn item
10921048
}

branches/try/src/libstd/collections/hash/map.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,15 +1533,6 @@ impl<'a, K, V> Entry<'a, K, V> {
15331533
Vacant(entry) => entry.insert(default()),
15341534
}
15351535
}
1536-
1537-
/// Returns a reference to this entry's key.
1538-
#[unstable(feature = "map_entry_keys", issue = "32281")]
1539-
pub fn key(&self) -> &K {
1540-
match *self {
1541-
Occupied(ref entry) => entry.key(),
1542-
Vacant(ref entry) => entry.key(),
1543-
}
1544-
}
15451536
}
15461537

15471538
impl<'a, K, V> OccupiedEntry<'a, K, V> {

branches/try/src/libsyntax/ext/expand.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ macro_rules! with_exts_frame {
327327
// When we enter a module, record it, for the sake of `module!`
328328
pub fn expand_item(it: P<ast::Item>, fld: &mut MacroExpander)
329329
-> SmallVector<P<ast::Item>> {
330-
expand_annotatable(Annotatable::Item(it), fld)
330+
let it = expand_item_multi_modifier(Annotatable::Item(it), fld);
331+
332+
expand_annotatable(it, fld)
331333
.into_iter().map(|i| i.expect_item()).collect()
332334
}
333335

branches/try/src/test/codegen-units/partitioning/extern-drop-glue.rs

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

1111
// ignore-tidy-linelength
12-
13-
// We specify -Z incremental here because we want to test the partitioning for
14-
// incremental compilation
15-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/extern-drop-glue
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1613

1714
#![allow(dead_code)]
1815
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/extern-generic.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp/partitioning-tests/extern-generic
12+
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp
1513

1614
#![allow(dead_code)]
1715
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/inlining-from-extern-crate.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/inlining-from-extern-crate
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1513

1614
#![crate_type="lib"]
1715

branches/try/src/test/codegen-units/partitioning/local-drop-glue.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-drop-glue
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1513

1614
#![allow(dead_code)]
1715
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/local-generic.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp/partitioning-tests/local-generic
12+
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp
1513

1614
#![allow(dead_code)]
1715
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/local-inlining.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1513

1614
#![allow(dead_code)]
1715
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/local-transitive-inlining.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-transitive-inlining
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1513

1614
#![allow(dead_code)]
1715
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/methods-are-with-self-type.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/methods-are-with-self-type
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1513

1614
#![allow(dead_code)]
1715

branches/try/src/test/codegen-units/partitioning/regular-modules.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp/partitioning-tests/regular-modules
12+
// compile-flags:-Zprint-trans-items=eager -Z incremental=tmp
1513

1614
#![allow(dead_code)]
1715
#![crate_type="lib"]

branches/try/src/test/codegen-units/partitioning/statics.rs

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

1111
// ignore-tidy-linelength
12-
// We specify -Z incremental here because we want to test the partitioning for
13-
// incremental compilation
14-
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/statics
12+
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
1513

1614
#![crate_type="lib"]
1715

branches/try/src/test/compile-fail/expanded-cfg.rs

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

0 commit comments

Comments
 (0)