summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-04-11Fix a test on stableAlex Crichton-0/+1
2016-04-07Don't loop forever on error recovery with EOFNick Cameron-1/+10
closes #31804
2016-04-07fix compile-fail and parse-fail tests by blindly opting back intoFelix S. Klock II-11/+31
parser recovery (so that expected errors match up) I'm opting into parser recovery in all these cases out of expediency, not because the error messages you get with recovery enabled are actually all that usable in all cases listed.
2016-04-07Put in `-Z continue-parse-after-error`Felix S. Klock II-0/+19
This works by adding a boolean flag, `continue_after_error`, to `syntax::errors::Handler` that can be imperatively set to `true` or `false` via a new `fn set_continue_after_error`. The flag starts off true (since we generally try to recover from compiler errors, and `Handler` is shared across all phases). Then, during the `phase_1_parse_input`, we consult the setting of the `-Z continue-parse-after-error` debug flag to determine whether we should leave the flag set to `true` or should change it to `false`. ---- (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.)
2016-04-07syntax: Stop the bump loop for trait items at } and EOF.Eduard Burtescu-13/+36
backport of 221d0fbad0b201ef9264d3c9a30cd8c143ed51b2 to beta with hand-resolution of conflicts and reverting to `try!` syntax.
2016-04-07syntax: Prevent bumping the parser EOF to stop infinite loops.Eduard Burtescu-0/+11
2016-03-24std: Revert addition of `into_ascii_*` methodsAlex Crichton-106/+0
The addition of these methods in #31335 required adding impls of the trait for the `String` and `Vec<T>` types. This unfortunately caused a regression (#32074) in type inference for using these methods which the libs team has decided to not push forward with. These methods were stabilized in #32020 which was intended to get backported to beta, but the backport hasn't happened just yet. This commit reverts both the addition and stabilization of these methods. One proposed method of handling this, in #32076, was to move the methods to an extra trait to avoid conflicts with type inference. After some discussion, however, the libs team concluded that we probably want to reevaluate what we're doing here, so discussion will continue on the tracking issue, #27809. Conflicts: src/libstd/ascii.rs
2016-03-16Add comment explaining purpose of testNiko Matsakis-0/+3
2016-03-16Do not report errors from regionck if other errors were alreadyNiko Matsakis-2/+37
reported during the lifetime of this inferencer. Fixes #30580.
2016-03-16remove wrong assert in check_matchAriel Ben-Yehuda-4/+21
the assert was invalidated by PR #31020 Fixes #31561
2016-03-16don't treat unit patterns as wildcard patternsAriel Ben-Yehuda-1/+30
Fixes #32004
2016-03-16clean up check_pat_enumAriel Ben-Yehuda-46/+28
2016-03-16truncate i8-s to i1-s when loading constantsAriel Ben-Yehuda-9/+36
Fixes #30891
2016-03-03Ignore a rustdoc test that does not work on betaBrian Anderson-0/+1
2016-03-01Auto merge of #31962 - sanxiyn:const-eval-map, r=arielb1bors-1/+39
Fix #31910.
2016-03-01Auto merge of #31335 - SimonSapin:ascii-into, r=alexcrichtonbors-0/+106
The default implementations (with `where Self: Sized`) are so that methods that take `self` by value can exist in a trait that’s implemented for dynamically-sized types (`str` and `[u8]`). CC https://github.com/rust-lang/rust/issues/27809#issuecomment-177564950 CC @alexcrichton
2016-03-01Auto merge of #31713 - alexcrichton:rustbuild-docs, r=brsonbors-1/+157
This commit implements documentation generation of the nomicon, the book, the style guide, and the standalone docs. New steps were added for each one as well as appropriate makefile targets for each one as well.
2016-02-29Auto merge of #31884 - alexcrichton:no-bootstrap-from-existing, r=brsonbors-101/+216
These commits add support to the rustbuild build system to compile non-build-system compilers. For example this will allow creating an ARM compiler on a x86 system. The high level way this works is: * The only compiler ever run is the build target compiler. No other compiler is assumed to be runnable. * As a result, all output artifacts come from the build compiler. * The libs for the stageN cross-compiled compiler will be linked into place after the build target builds them. This will break the assumption that a compiler never links to anything it didn't itself produce, but it retains the assumption that a compiler only ever links to anything built in the same stage. I believe this means that the stage1 cross-compiled compilers will still be usable. I tested this by creating an `arm-unknown-linux-gnueabihf` compiler. So far the linking ended up all working OK (including LLVM being cross compiled), but I haven't been able to run it yet (in QEMU for a raspberry pi). I think that's because my system linker is messed up or something like that (some newer option is assumed when it's not actually there). Overall, though, this means that rustbuild can compile an arm-unknown-linux-gnueabihf compiler. Ideally we could even start shipping nightlies based on this at some point!
2016-02-29test: Mark all rpass-valgrind as no-prefer-dynamicAlex Crichton-0/+11
This applies the same fix as added in 595d5b2f which is to just compile all valgrind tests statically instead of dynamically. It looks like this is a resurgence of either #30383 or #31328 in some weird fashion. I'm not actually sure what's going on with the bots, and it's unclear whether this is a valgrind bug or a libstd bug, but for now let's just get things landing again. Closes #30383
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-227/+203
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-29Use HIR map instead of tcx in constant evaluatorSeo Sanghyeon-1/+39
Constant evaluator can be called while tcx is in construction.
2016-02-29Auto merge of #31958 - teoryn:patch-3, r=nagisabors-1/+1
2016-02-29Auto merge of #31960 - aidanhs:aphs-tweak-aliasing-docs, r=Manishearthbors-1/+1
See https://doc.rust-lang.org/book/unsafe.html#what-does-safe-mean for the book version of these points which already contain the T.
2016-02-29Add the 'T' present in the rust bookAidan Hobson Sayers-1/+1
2016-02-28Fix typo (an Result)Kevin Stock-1/+1
2016-02-28Fix typo (!#[no_std])Kevin Stock-1/+1
2016-02-28Auto merge of #31897 - tshepang:ref-not-needed, r=steveklabnikbors-1/+1
Also, `path` seems better than `p`
2016-02-28rustbuild: Update dependenciesAlex Crichton-35/+18
* Fixes a warning with libc * Brings in some new flag updates for various platforms through gcc-rs * Otherwise routine updates here/there
2016-02-28rustbuild: Update nightly dateAlex Crichton-8/+12
Also fix a bug where we didn't clean out previous nightlies
2016-02-28rustbuild: Relax assertions about stage0Alex Crichton-3/+1
This allows bootstrapping new platforms immediately in stage0
2016-02-28rustbuild: Remove extra rustc flagsAlex Crichton-15/+1
These should all no longer be necessary as they've been folded into the compiler.
2016-02-28rustbuild: Add steps for linking a sysrootAlex Crichton-6/+88
When cross compiling for a new host, we can't actually run the host compiler to generate its own libs. In theory, however, all stage2 compilers (for any host) will produce the same libraries, so we just require the build compiler to produce the necessary host libraries and then we link those into place.
2016-02-28rustbuild: Document what steps areAlex Crichton-0/+14
2016-02-28rustbuild: Compile with the build compilerAlex Crichton-2/+2
This switches the defaults to ensure that everything is built with the build compiler rather than the host compiler itself (which we're not guaranteed to be able to run)
2016-02-28rustbuild: Move assembling rustc to its own stepAlex Crichton-18/+20
Right now it's implicitly done as part of building the compiler, but this was intended to be a standalone step to ensure we tracked what built what.
2016-02-28rustbuild: Fix a copy/paste errorAlex Crichton-1/+1
Fixes `--step librustc`
2016-02-28rustbuild: Enable cross-compiling LLVMAlex Crichton-7/+50
Currently all multi-host builds assume the the build platform can run the `llvm-config` binary generated for each host platform we're creating a compiler for. Unfortunately this assumption isn't always true when cross compiling, so we need to handle this case. This commit alters the build script of `rustc_llvm` to understand when it's running an `llvm-config` which is different than the platform we're targeting for.
2016-02-28rustbuild: Fix compiler-rt build on gnueabihfAlex Crichton-0/+8
Needs a different target to get built and also we apparently need to appease the C++ compiler somehow.
2016-02-28rustbuild: Sync changes to Cargo.lockAlex Crichton-2/+0
2016-02-28rustbuild: Only pass RUSTC_FLAGS to target compilesAlex Crichton-3/+3
These flags aren't applicable to build scripts, and may actuall wreak havoc.
2016-02-28rustbuild: Enable bootstrapping new hostsAlex Crichton-7/+4
This commit fixes a longstanding issue with the makefiles where all host platforms bootstrap themselves. This commit alters the build logic for the bootstrap to instead only bootstrap the build triple, and all other compilers are compiled from that one compiler. The benefit of this change is that we can cross-compile compilers which cannot run on the build platform. For example our builders could start creating `arm-unknown-linux-gnueabihf` compilers. This reduces the amount of bootstrapping we do, reducing the amount of test coverage, but overall it should largely just end in faster build times for multi-host compiles as well as enabling a feature which can't be done today. cc #5258
2016-02-28doc: "ref" not needed in the exampleTshepang Lekhonkhobe-1/+1
Also, `path` seems better than `p`
2016-02-28Auto merge of #31902 - mitaa:rdoc-shorter, r=alexcrichtonbors-3/+75
fixes #31899 r? @alexcrichton
2016-02-27Auto merge of #31942 - bluss:iter-desugar, r=steveklabnikbors-1/+1
Make for loop desugaring for iterators more precise The UFCS call IntoIterator::into_iter() is used by the for loop.
2016-02-27Auto merge of #31931 - Luke-Nukem:master, r=steveklabnikbors-9/+9
Refinement of paragraph referenced by [this issue](https://github.com/rust-lang/rust/issues/31927). The paragraph in question had been adjusted already, but I've made some further clarifications which should help with readability and not leave the reader any `dangling pointers`.
2016-02-27Auto merge of #31915 - nagisa:mir-unpretty-fix, r=arielb1bors-12/+28
Fixes https://github.com/rust-lang/rust/issues/31913
2016-02-27Make for loop desugaring for iterators more preciseUlrik Sverdrup-1/+1
The UFCS call IntoIterator::into_iter() is used by the for loop.
2016-02-27Resolve ambiguous documentationKevin Stock-4/+4
See http://www.ietf.org/rfc/rfc2119.txt
2016-02-27Add testSimonas Kazlauskas-0/+15
2016-02-27Fix MIR unpretty on failure conditionsSimonas Kazlauskas-12/+13