Skip to content

Commit 4e522b1

Browse files
committed
---
yaml --- r: 275106 b: refs/heads/stable c: 257fa0f h: refs/heads/master
1 parent 7ea298b commit 4e522b1

File tree

101 files changed

+2557
-488
lines changed

Some content is hidden

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

101 files changed

+2557
-488
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 04d554f6fe17388288bc896358e4227c180d8788
32+
refs/heads/stable: 257fa0f479e6a0fc069710a4c2ea52e551bafe97
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.mailmap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Gareth Daniel Smith <garethdanielsmith@gmail.com> Gareth Smith <garethdanielsmit
8282
Georges Dubus <georges.dubus@gmail.com> <georges.dubus@compiletoi.net>
8383
Graham Fawcett <graham.fawcett@gmail.com> Graham Fawcett <fawcett@uwindsor.ca>
8484
Graydon Hoare <graydon@pobox.com> Graydon Hoare <graydon@mozilla.com>
85-
Guillaume Gomez <guillaume1.gomez@gmail.com>
85+
Guillaume Gomez <guillaume1.gomez@gmail.com> Guillaume Gomez <ggomez@ggo.ifr.lan>
8686
Heather <heather@cynede.net> <Cynede@Gentoo.org>
8787
Heather <heather@cynede.net> <Heather@cynede.net>
8888
Herman J. Radtke III <herman@hermanradtke.com> Herman J. Radtke III <hermanradtke@gmail.com>

branches/stable/configure

Lines changed: 85 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,97 +1327,101 @@ then
13271327
fi
13281328
fi
13291329

1330-
step_msg "making directories"
1330+
if [ -z "$CFG_ENABLE_RUSTBUILD" ]; then
13311331

1332-
for i in \
1333-
doc doc/std doc/extra \
1334-
dl tmp dist
1335-
do
1336-
make_dir $i
1337-
done
1332+
step_msg "making directories"
13381333

1339-
for t in $CFG_HOST
1340-
do
1341-
make_dir $t/llvm
1342-
done
1334+
for i in \
1335+
doc doc/std doc/extra \
1336+
dl tmp dist
1337+
do
1338+
make_dir $i
1339+
done
13431340

1344-
for t in $CFG_HOST
1345-
do
1346-
make_dir $t/rustllvm
1347-
done
1341+
for t in $CFG_HOST
1342+
do
1343+
make_dir $t/llvm
1344+
done
13481345

1349-
for t in $CFG_TARGET
1350-
do
1351-
make_dir $t/rt
1352-
for s in 0 1 2 3
1346+
for t in $CFG_HOST
13531347
do
1354-
make_dir $t/rt/stage$s
1355-
make_dir $t/rt/jemalloc
1356-
make_dir $t/rt/compiler-rt
1357-
for i in \
1358-
isaac sync test \
1359-
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/powerpc
1360-
do
1361-
make_dir $t/rt/stage$s/$i
1362-
done
1348+
make_dir $t/rustllvm
13631349
done
1364-
done
13651350

1366-
for h in $CFG_HOST
1367-
do
1368-
for t in $CFG_TARGET
1351+
for t in $CFG_TARGET
1352+
do
1353+
make_dir $t/rt
1354+
for s in 0 1 2 3
13691355
do
1370-
# host bin dir stage0
1371-
make_dir $h/stage0/bin
1372-
1373-
# host lib dir stage0
1374-
make_dir $h/stage0/lib
1375-
1376-
# host test dir stage0
1377-
make_dir $h/stage0/test
1378-
1379-
# target bin dir stage0
1380-
make_dir $h/stage0/lib/rustlib/$t/bin
1381-
1382-
# target lib dir stage0
1383-
make_dir $h/stage0/lib/rustlib/$t/lib
1384-
1385-
for i in 1 2 3
1386-
do
1387-
# host bin dir
1388-
make_dir $h/stage$i/bin
1389-
1390-
# host lib dir
1391-
make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE
1392-
1393-
# host test dir
1394-
make_dir $h/stage$i/test
1395-
1396-
# target bin dir
1397-
make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/rustlib/$t/bin
1398-
1399-
# target lib dir
1400-
make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/rustlib/$t/lib
1401-
done
1356+
make_dir $t/rt/stage$s
1357+
make_dir $t/rt/jemalloc
1358+
make_dir $t/rt/compiler-rt
1359+
for i in \
1360+
isaac sync test \
1361+
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/powerpc
1362+
do
1363+
make_dir $t/rt/stage$s/$i
1364+
done
14021365
done
1366+
done
14031367

1404-
make_dir $h/test/run-pass
1405-
make_dir $h/test/run-pass-valgrind
1406-
make_dir $h/test/run-pass-fulldeps
1407-
make_dir $h/test/run-fail
1408-
make_dir $h/test/run-fail-fulldeps
1409-
make_dir $h/test/compile-fail
1410-
make_dir $h/test/parse-fail
1411-
make_dir $h/test/compile-fail-fulldeps
1412-
make_dir $h/test/bench
1413-
make_dir $h/test/perf
1414-
make_dir $h/test/pretty
1415-
make_dir $h/test/debuginfo-gdb
1416-
make_dir $h/test/debuginfo-lldb
1417-
make_dir $h/test/codegen
1418-
make_dir $h/test/codegen-units
1419-
make_dir $h/test/rustdoc
1420-
done
1368+
for h in $CFG_HOST
1369+
do
1370+
for t in $CFG_TARGET
1371+
do
1372+
# host bin dir stage0
1373+
make_dir $h/stage0/bin
1374+
1375+
# host lib dir stage0
1376+
make_dir $h/stage0/lib
1377+
1378+
# host test dir stage0
1379+
make_dir $h/stage0/test
1380+
1381+
# target bin dir stage0
1382+
make_dir $h/stage0/lib/rustlib/$t/bin
1383+
1384+
# target lib dir stage0
1385+
make_dir $h/stage0/lib/rustlib/$t/lib
1386+
1387+
for i in 1 2 3
1388+
do
1389+
# host bin dir
1390+
make_dir $h/stage$i/bin
1391+
1392+
# host lib dir
1393+
make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE
1394+
1395+
# host test dir
1396+
make_dir $h/stage$i/test
1397+
1398+
# target bin dir
1399+
make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/rustlib/$t/bin
1400+
1401+
# target lib dir
1402+
make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/rustlib/$t/lib
1403+
done
1404+
done
1405+
1406+
make_dir $h/test/run-pass
1407+
make_dir $h/test/run-pass-valgrind
1408+
make_dir $h/test/run-pass-fulldeps
1409+
make_dir $h/test/run-fail
1410+
make_dir $h/test/run-fail-fulldeps
1411+
make_dir $h/test/compile-fail
1412+
make_dir $h/test/parse-fail
1413+
make_dir $h/test/compile-fail-fulldeps
1414+
make_dir $h/test/bench
1415+
make_dir $h/test/perf
1416+
make_dir $h/test/pretty
1417+
make_dir $h/test/debuginfo-gdb
1418+
make_dir $h/test/debuginfo-lldb
1419+
make_dir $h/test/codegen
1420+
make_dir $h/test/codegen-units
1421+
make_dir $h/test/rustdoc
1422+
done
1423+
1424+
fi
14211425

14221426
# Configure submodules
14231427
step_msg "configuring submodules"

branches/stable/src/bootstrap/build/mod.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,25 @@ impl Build {
160160
if fs::metadata(self.src.join(".git")).is_err() {
161161
return
162162
}
163-
let out = output(Command::new("git").arg("submodule").arg("status"));
163+
let git_submodule = || {
164+
let mut cmd = Command::new("git");
165+
cmd.current_dir(&self.src).arg("submodule");
166+
return cmd
167+
};
168+
let out = output(git_submodule().arg("status"));
164169
if !out.lines().any(|l| l.starts_with("+") || l.starts_with("-")) {
165170
return
166171
}
167172

168-
self.run(Command::new("git").arg("submodule").arg("sync"));
169-
self.run(Command::new("git").arg("submodule").arg("init"));
170-
self.run(Command::new("git").arg("submodule").arg("update"));
171-
self.run(Command::new("git").arg("submodule").arg("update")
172-
.arg("--recursive"));
173-
self.run(Command::new("git").arg("submodule").arg("status")
174-
.arg("--recursive"));
175-
self.run(Command::new("git").arg("submodule").arg("foreach")
176-
.arg("--recursive")
177-
.arg("git").arg("clean").arg("-fdx"));
178-
self.run(Command::new("git").arg("submodule").arg("foreach")
179-
.arg("--recursive")
180-
.arg("git").arg("checkout").arg("."));
173+
self.run(git_submodule().arg("sync"));
174+
self.run(git_submodule().arg("init"));
175+
self.run(git_submodule().arg("update"));
176+
self.run(git_submodule().arg("update").arg("--recursive"));
177+
self.run(git_submodule().arg("status").arg("--recursive"));
178+
self.run(git_submodule().arg("foreach").arg("--recursive")
179+
.arg("git").arg("clean").arg("-fdx"));
180+
self.run(git_submodule().arg("foreach").arg("--recursive")
181+
.arg("git").arg("checkout").arg("."));
181182
}
182183

183184
/// Clear out `dir` if our build has been flagged as dirty, and also set

branches/stable/src/liballoc_jemalloc/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ extern {}
4545
// explicitly request it), and on Android we explicitly request it as
4646
// unprefixing cause segfaults (mismatches in allocators).
4747
extern {
48-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
48+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
4949
link_name = "je_mallocx")]
5050
fn mallocx(size: size_t, flags: c_int) -> *mut c_void;
51-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
51+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5252
link_name = "je_rallocx")]
5353
fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void;
54-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
54+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5555
link_name = "je_xallocx")]
5656
fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t;
57-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
57+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
5858
link_name = "je_sdallocx")]
5959
fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int);
60-
#[cfg_attr(any(target_os = "macos", target_os = "android"),
60+
#[cfg_attr(any(target_os = "macos", target_os = "android", target_os = "ios"),
6161
link_name = "je_nallocx")]
6262
fn nallocx(size: size_t, flags: c_int) -> size_t;
6363
}

branches/stable/src/libcore/ptr.rs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,54 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
161161
intrinsics::move_val_init(&mut *dst, src)
162162
}
163163

164+
/// Performs a volatile read of the value from `src` without moving it. This
165+
/// leaves the memory in `src` unchanged.
166+
///
167+
/// Volatile operations are intended to act on I/O memory, and are guaranteed
168+
/// to not be elided or reordered by the compiler across other volatile
169+
/// operations. See the LLVM documentation on [[volatile]].
170+
///
171+
/// [volatile]: http://llvm.org/docs/LangRef.html#volatile-memory-accesses
172+
///
173+
/// # Safety
174+
///
175+
/// Beyond accepting a raw pointer, this is unsafe because it semantically
176+
/// moves the value out of `src` without preventing further usage of `src`.
177+
/// If `T` is not `Copy`, then care must be taken to ensure that the value at
178+
/// `src` is not used before the data is overwritten again (e.g. with `write`,
179+
/// `zero_memory`, or `copy_memory`). Note that `*src = foo` counts as a use
180+
/// because it will attempt to drop the value previously at `*src`.
181+
#[inline]
182+
#[unstable(feature = "volatile", reason = "recently added", issue = "31756")]
183+
pub unsafe fn read_volatile<T>(src: *const T) -> T {
184+
intrinsics::volatile_load(src)
185+
}
186+
187+
/// Performs a volatile write of a memory location with the given value without
188+
/// reading or dropping the old value.
189+
///
190+
/// Volatile operations are intended to act on I/O memory, and are guaranteed
191+
/// to not be elided or reordered by the compiler across other volatile
192+
/// operations. See the LLVM documentation on [[volatile]].
193+
///
194+
/// [volatile]: http://llvm.org/docs/LangRef.html#volatile-memory-accesses
195+
///
196+
/// # Safety
197+
///
198+
/// This operation is marked unsafe because it accepts a raw pointer.
199+
///
200+
/// It does not drop the contents of `dst`. This is safe, but it could leak
201+
/// allocations or resources, so care must be taken not to overwrite an object
202+
/// that should be dropped.
203+
///
204+
/// This is appropriate for initializing uninitialized memory, or overwriting
205+
/// memory that has previously been `read` from.
206+
#[inline]
207+
#[unstable(feature = "volatile", reason = "recently added", issue = "31756")]
208+
pub unsafe fn write_volatile<T>(dst: *mut T, src: T) {
209+
intrinsics::volatile_store(dst, src);
210+
}
211+
164212
#[lang = "const_ptr"]
165213
impl<T: ?Sized> *const T {
166214
/// Returns true if the pointer is null.

branches/stable/src/librustc/front/check_attr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ impl<'a, 'v> Visitor<'v> for CheckAttrVisitor<'a> {
101101
for attr in &item.attrs {
102102
self.check_attribute(attr, target);
103103
}
104+
visit::walk_item(self, item);
104105
}
105106
}
106107

branches/stable/src/librustc/lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ declare_lint! {
132132

133133
declare_lint! {
134134
pub MATCH_OF_UNIT_VARIANT_VIA_PAREN_DOTDOT,
135-
Warn,
135+
Deny,
136136
"unit struct or enum variant erroneously allowed to match via path::ident(..)"
137137
}
138138

branches/stable/src/librustc/middle/expr_use_visitor.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,11 @@ impl<'d,'t,'a,'tcx> ExprUseVisitor<'d,'t,'a,'tcx> {
721721
if let Some(adjustment) = adj {
722722
match adjustment {
723723
adjustment::AdjustReifyFnPointer |
724-
adjustment::AdjustUnsafeFnPointer => {
724+
adjustment::AdjustUnsafeFnPointer |
725+
adjustment::AdjustMutToConstPointer => {
725726
// Creating a closure/fn-pointer or unsizing consumes
726727
// the input and stores it into the resulting rvalue.
727-
debug!("walk_adjustment(AdjustReifyFnPointer|AdjustUnsafeFnPointer)");
728+
debug!("walk_adjustment: trivial adjustment");
728729
let cmt_unadjusted =
729730
return_if_err!(self.mc.cat_expr_unadjusted(expr));
730731
self.delegate_consume(expr.id, expr.span, cmt_unadjusted);

branches/stable/src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ impl<'t, 'a,'tcx> MemCategorizationContext<'t, 'a, 'tcx> {
430430

431431
adjustment::AdjustReifyFnPointer |
432432
adjustment::AdjustUnsafeFnPointer |
433+
adjustment::AdjustMutToConstPointer |
433434
adjustment::AdjustDerefRef(_) => {
434435
debug!("cat_expr({:?}): {:?}",
435436
adjustment,

0 commit comments

Comments
 (0)