Skip to content

Commit 1bbe4d4

Browse files
---
yaml --- r: 222063 b: refs/heads/tmp c: 6e377fe h: refs/heads/master i: 222061: 71afb50 222059: b61905a 222055: 8acac5b 222047: 19689d9 v: v3
1 parent 0a826da commit 1bbe4d4

File tree

8 files changed

+35
-52
lines changed

8 files changed

+35
-52
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: 2b45108ecb944d63daba0f1b5529ac4c8afdc295
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: eefd6b2c12c8257c85f2121d7f5a3694b192e755
28+
refs/heads/tmp: 6e377fe5f3495bfc3ed9872e7a43ab339e8d6b6c
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/configure

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ opt_core() {
283283
fi
284284
done
285285
else
286-
if [ -n "$META" ]
286+
if [ ! -z "$META" ]
287287
then
288288
OP="$OP=<$META>"
289289
fi
@@ -317,7 +317,7 @@ envopt() {
317317
fi
318318

319319
# If script or environment provided a value, save it.
320-
if [ -n "$VV" ]
320+
if [ ! -z "$VV" ]
321321
then
322322
putvar $V
323323
fi
@@ -767,7 +767,7 @@ probe CFG_LLDB lldb
767767
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
768768
# installed. Since `javac` is only used if `antlr4` is available,
769769
# probe for it only in this case.
770-
if [ -n "$CFG_ANTLR4" ]
770+
if [ ! -z "$CFG_ANTLR4" ]
771771
then
772772
probe CFG_JAVAC javac
773773
fi
@@ -786,14 +786,14 @@ then
786786
fi
787787
fi
788788

789-
if [ -n "$CFG_GDB" ]
789+
if [ ! -z "$CFG_GDB" ]
790790
then
791791
# Store GDB's version
792792
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
793793
putvar CFG_GDB_VERSION
794794
fi
795795

796-
if [ -n "$CFG_LLDB" ]
796+
if [ ! -z "$CFG_LLDB" ]
797797
then
798798
# Store LLDB's version
799799
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
@@ -819,7 +819,7 @@ step_msg "looking for target specific programs"
819819

820820
probe CFG_ADB adb
821821

822-
if [ -n "$CFG_PANDOC" ]
822+
if [ ! -z "$CFG_PANDOC" ]
823823
then
824824
# Extract "MAJOR MINOR" from Pandoc's version number
825825
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
@@ -845,7 +845,7 @@ then
845845
BIN_SUF=.exe
846846
fi
847847

848-
if [ -n "$CFG_ENABLE_LOCAL_RUST" ]
848+
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
849849
then
850850
system_rustc=$(which rustc)
851851
if [ -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF} ]
@@ -930,18 +930,18 @@ fi
930930

931931
# Okay, at this point, we have made up our minds about whether we are
932932
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
933-
if [ -n "$CFG_ENABLE_CLANG" ]
933+
if [ ! -z "$CFG_ENABLE_CLANG" ]
934934
then
935935
putvar CFG_ENABLE_CLANG
936936
fi
937937

938938
# Same with jemalloc. save the setting here.
939-
if [ -n "$CFG_DISABLE_JEMALLOC" ]
939+
if [ ! -z "$CFG_DISABLE_JEMALLOC" ]
940940
then
941941
putvar CFG_DISABLE_JEMALLOC
942942
fi
943943

944-
if [ -n "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
944+
if [ ! -z "$CFG_LLVM_ROOT" -a -z "$CFG_DISABLE_LLVM_VERSION_CHECK" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
945945
then
946946
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
947947

@@ -970,7 +970,7 @@ fi
970970
# CFG_ENABLE_CLANG is set, that indicates that we are opting into
971971
# running such safeguards.
972972

973-
if [ -n "$CC" ]
973+
if [ ! -z "$CC" ]
974974
then
975975
msg "skipping compiler inference steps; using provided CC=$CC"
976976
CFG_CC="$CC"
@@ -983,7 +983,7 @@ then
983983
putvar CFG_USING_CLANG
984984
fi
985985
else
986-
if [ -n "$CFG_ENABLE_CLANG" ]
986+
if [ ! -z "$CFG_ENABLE_CLANG" ]
987987
then
988988
if [ -z "$CFG_CLANG" ]
989989
then
@@ -997,7 +997,7 @@ else
997997
fi
998998
fi
999999

1000-
if [ -n "$CFG_ENABLE_CLANG" ]
1000+
if [ ! -z "$CFG_ENABLE_CLANG" ]
10011001
then
10021002
case "$CC" in
10031003
(''|*clang)
@@ -1013,7 +1013,7 @@ then
10131013
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10141014
fi
10151015

1016-
if [ -n "$CFG_OSX_CLANG_VERSION" ]
1016+
if [ ! -z "$CFG_OSX_CLANG_VERSION" ]
10171017
then
10181018
case $CFG_OSX_CLANG_VERSION in
10191019
(7.0*)
@@ -1042,7 +1042,7 @@ then
10421042
esac
10431043
fi
10441044

1045-
if [ -n "$CFG_ENABLE_CCACHE" ]
1045+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
10461046
then
10471047
if [ -z "$CFG_CCACHE" ]
10481048
then
@@ -1199,7 +1199,7 @@ do
11991199
;;
12001200
esac
12011201
bindir="${CFG_MSVC_ROOT}/VC/bin"
1202-
if [ -n "$msvc_part" ]; then
1202+
if [ ! -z "$msvc_part" ]; then
12031203
bindir="$bindir/$msvc_part"
12041204
fi
12051205
eval CFG_MSVC_BINDIR_$bits="\"$bindir\""
@@ -1229,7 +1229,7 @@ do
12291229
esac
12301230
done
12311231

1232-
if [ -n "$CFG_PERF" ]
1232+
if [ ! -z "$CFG_PERF" ]
12331233
then
12341234
HAVE_PERF_LOGFD=`$CFG_PERF stat --log-fd 2>&1 | grep 'unknown option'`
12351235
if [ -z "$HAVE_PERF_LOGFD" ];
@@ -1339,11 +1339,11 @@ then
13391339
"${CFG_GIT}" submodule init
13401340

13411341
# Disable submodules that we're not using
1342-
if [ -n "${CFG_LLVM_ROOT}" ]; then
1342+
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
13431343
msg "git: submodule deinit src/llvm"
13441344
"${CFG_GIT}" submodule deinit src/llvm
13451345
fi
1346-
if [ -n "${CFG_JEMALLOC_ROOT}" ]; then
1346+
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
13471347
msg "git: submodule deinit src/jemalloc"
13481348
"${CFG_GIT}" submodule deinit src/jemalloc
13491349
fi
@@ -1390,7 +1390,7 @@ do
13901390
if [ -z $CFG_LLVM_ROOT ]
13911391
then
13921392
LLVM_BUILD_DIR=${CFG_BUILD_DIR}$t/llvm
1393-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]
1393+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]
13941394
then
13951395
LLVM_DBG_OPTS="--enable-debug-symbols --disable-optimized"
13961396
# Just use LLVM straight from its build directory to
@@ -1446,7 +1446,7 @@ do
14461446
msg "configuring LLVM for $t with cmake"
14471447

14481448
CMAKE_ARGS="-DLLVM_INCLUDE_TESTS=OFF"
1449-
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
1449+
if [ ! -z "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
14501450
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"
14511451
else
14521452
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release"
@@ -1538,7 +1538,7 @@ do
15381538

15391539
(*)
15401540
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1541-
if [ -n "$CFG_ENABLE_CCACHE" ]
1541+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
15421542
then
15431543
if [ -z "$CFG_CCACHE" ]
15441544
then
@@ -1672,20 +1672,20 @@ putvar CFG_MANDIR
16721672

16731673
# Avoid spurious warnings from clang by feeding it original source on
16741674
# ccache-miss rather than preprocessed input.
1675-
if [ -n "$CFG_ENABLE_CCACHE" ] && [ -n "$CFG_USING_CLANG" ]
1675+
if [ ! -z "$CFG_ENABLE_CCACHE" ] && [ ! -z "$CFG_USING_CLANG" ]
16761676
then
16771677
CFG_CCACHE_CPP2=1
16781678
putvar CFG_CCACHE_CPP2
16791679
fi
16801680

1681-
if [ -n "$CFG_ENABLE_CCACHE" ]
1681+
if [ ! -z "$CFG_ENABLE_CCACHE" ]
16821682
then
16831683
CFG_CCACHE_BASEDIR=${CFG_SRC_DIR}
16841684
putvar CFG_CCACHE_BASEDIR
16851685
fi
16861686

16871687

1688-
if [ -n $BAD_PANDOC ]
1688+
if [ ! -z $BAD_PANDOC ]
16891689
then
16901690
CFG_PANDOC=
16911691
putvar CFG_PANDOC

branches/tmp/src/doc/trpl/choosing-your-guarantees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The main guarantee provided here is that the data will not be destroyed until al
8181
are out of scope.
8282

8383
This should be used when we wish to dynamically allocate and share some data (read-only) between
84-
various portions of yur program, where it is not certain which portion will finish using the pointer
84+
various portions of your program, where it is not certain which portion will finish using the pointer
8585
last. It's a viable alternative to `&T` when `&T` is either impossible to statically check for
8686
correctness, or creates extremely unergonomic code where the programmer does not wish to spend the
8787
development cost of working with.

branches/tmp/src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ impl<T, E: fmt::Debug> Result<T, E> {
744744
/// x.expect("Testing expect"); // panics with `Testing expect: emergency failure`
745745
/// ```
746746
#[inline]
747-
#[unstable(feature = "result_expect", reason = "newly introduced", issue = "27277")]
747+
#[unstable(feature = "result_expect", reason = "newly introduced")]
748748
pub fn expect(self, msg: &str) -> T {
749749
match self {
750750
Ok(t) => t,

branches/tmp/src/librustc/diagnostics.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,6 @@ Example:
766766
```
767767
type X = u32; // this compiles
768768
```
769-
770-
Note that type parameters for enum-variant constructors go after the variant,
771-
not after the enum (Option::None::<u32>, not Option::<u32>::None).
772769
"##,
773770

774771
E0110: r##"

branches/tmp/src/librustc_lint/builtin.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,16 +436,6 @@ fn is_repr_nullable_ptr<'tcx>(variants: &Vec<Rc<ty::VariantInfo<'tcx>>>) -> bool
436436
false
437437
}
438438

439-
fn ast_ty_to_normalized<'tcx>(tcx: &ty::ctxt<'tcx>,
440-
id: ast::NodeId)
441-
-> Ty<'tcx> {
442-
let tty = match tcx.ast_ty_to_ty_cache.borrow().get(&id) {
443-
Some(&t) => t,
444-
None => panic!("ast_ty_to_ty_cache was incomplete after typeck!")
445-
};
446-
infer::normalize_associated_type(tcx, &tty)
447-
}
448-
449439
impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
450440
/// Check if the given type is "ffi-safe" (has a stable, well-defined
451441
/// representation which can be exported to C code).
@@ -648,7 +638,11 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
648638
}
649639

650640
fn check_def(&mut self, sp: Span, id: ast::NodeId) {
651-
let tty = ast_ty_to_normalized(self.cx.tcx, id);
641+
let tty = match self.cx.tcx.ast_ty_to_ty_cache.borrow().get(&id) {
642+
Some(&t) => t,
643+
None => panic!("ast_ty_to_ty_cache was incomplete after typeck!")
644+
};
645+
let tty = infer::normalize_associated_type(self.cx.tcx, &tty);
652646

653647
match ImproperCTypesVisitor::check_type_for_ffi(self, &mut FnvHashSet(), tty) {
654648
FfiResult::FfiSafe => {}
@@ -713,10 +707,7 @@ impl LintPass for ImproperCTypes {
713707
check_ty(cx, &*input.ty);
714708
}
715709
if let ast::Return(ref ret_ty) = decl.output {
716-
let tty = ast_ty_to_normalized(cx.tcx, ret_ty.id);
717-
if !tty.is_nil() {
718-
check_ty(cx, &ret_ty);
719-
}
710+
check_ty(cx, &**ret_ty);
720711
}
721712
}
722713

branches/tmp/src/libstd/rand/os.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ mod imp {
4141
const NR_GETRANDOM: libc::c_long = 318;
4242
#[cfg(target_arch = "x86")]
4343
const NR_GETRANDOM: libc::c_long = 355;
44-
#[cfg(any(target_arch = "arm", target_arch = "powerpc"))]
44+
#[cfg(any(target_arch = "arm", target_arch = "aarch64", target_arch = "powerpc"))]
4545
const NR_GETRANDOM: libc::c_long = 384;
46-
#[cfg(any(target_arch = "aarch64"))]
47-
const NR_GETRANDOM: libc::c_long = 278;
4846

4947
unsafe {
5048
syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), 0)

branches/tmp/src/test/compile-fail/lint-ctypes.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub type I32Pair = (i32, i32);
2626
pub struct ZeroSize;
2727
pub type RustFn = fn();
2828
pub type RustBadRet = extern fn() -> Box<u32>;
29-
pub type CVoidRet = ();
3029

3130
extern {
3231
pub fn bare_type1(size: isize); //~ ERROR: found Rust type
@@ -53,8 +52,6 @@ extern {
5352
pub fn good6(s: StructWithProjectionAndLifetime);
5453
pub fn good7(fptr: extern fn() -> ());
5554
pub fn good8(fptr: extern fn() -> !);
56-
pub fn good9() -> ();
57-
pub fn good10() -> CVoidRet;
5855
}
5956

6057
fn main() {

0 commit comments

Comments
 (0)