about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2019-03-08Improve recovery for missing trait in a trait implVadim Petrochenkov-16/+15
2019-03-07Point at coercion reason for if exprs without else clauseEsteban Küber-1/+62
``` error[E0317]: if may be missing an else clause --> $DIR/if-without-else-as-fn-expr.rs:2:5 | LL | fn foo(bar: usize) -> usize { | ----- found `usize` because of this return type LL | / if bar % 5 == 0 { LL | | return 3; LL | | } | |_____^ expected (), found usize | = note: expected type `()` found type `usize` = note: `if` expressions without `else` must evaluate to `()` ```
2019-03-07Adds diagnostic message and UI test.Wesley Norris-1/+24
2019-03-07Update treat-err-as-bug help textEsteban Küber-1/+1
2019-03-07Fix with_emitter callersEsteban Küber-3/+3
2019-03-07fix bad logicEsteban Küber-3/+4
2019-03-07Fix segfaults in release build C-variadic fnsDan Robertson-9/+27
`va_start` and `va_end` must be called to initialize/cleanup the "spoofed" `VaList` in a Rust defined C-variadic function even if the `VaList` is not used.
2019-03-07hir: remove some obsolete NodeId methodsljedrz-49/+35
2019-03-07hir: remove Visitor::visit_def_mentionljedrz-20/+1
2019-03-07hir: replace NodeId with HirId in Destinationljedrz-29/+30
2019-03-07hir: remove NodeId from PatKindljedrz-53/+48
2019-03-07Keep current behavior while accepting error countEsteban Küber-11/+30
2019-03-07Actually publish miri in the manifestOliver Scherer-1/+3
2019-03-07fix bad use of with_emitterEsteban Küber-2/+2
2019-03-07hir: remove NodeId from PathSegmentljedrz-14/+4
2019-03-07HirIdification: replace NodeId method callsljedrz-339/+336
2019-03-06Wrap a long configure lineJosh Stone-1/+2
2019-03-06[CI] Update binutils for powerpc64 and powerpc64leJosh Stone-1/+20
Cargo powerpc64 and powerpc64le are seeing `SIGILL` crashes in openssl, which was found to be a linking problem, fixed by newer binutils. See <https://github.com/rust-lang/rust/issues/57345#issuecomment-462094555> For powerpc64 we're using crosstool-ng, which doesn't offer a newer binutils version, but we can just compile it separately. On powerpc64le we're already building binutils. Both are now updated to binutils 2.32. Closes rust-lang/cargo#6320 Closes rust-lang/rust#57345 Closes rust-lang/rustup.rs#1620
2019-03-06Fix incorrect defaultEsteban Kuber-1/+1
2019-03-06Make `-Z treat-err-as-bug` take a number of errors to be emittedEsteban Küber-19/+28
`-Z treat-err-as-bug=0` will cause `rustc` to panic after the first error is reported. `-Z treat-err-as-bug=2` will cause `rustc` to panic after 3 errors have been reported.
2019-03-06Rely on drop to emit unclosed delimsEsteban Küber-1/+0
2019-03-06Simplify codeEsteban Küber-29/+16
2019-03-06Add regression test for #58886Esteban Küber-0/+53
2019-03-06Always emit mismatched delim errors, never panicEsteban Küber-3/+2
2019-03-06Collect unclosed delimiters in parent parserEsteban Küber-35/+45
2019-03-06Emit missing unclosed delimiter errorsEsteban Küber-55/+56
2019-03-06Panic when unmatched delimiters aren't emittedEsteban Küber-1/+8
2019-03-06Reduce test caseEsteban Küber-18/+4
2019-03-06Emit unclosed delimiters during recoveryEsteban Küber-1/+14
2019-03-06Bail when encountering a second unexpected token in the same spanEsteban Küber-78/+25
2019-03-06Do not panic on missing close parenEsteban Küber-1/+110
Fix #58856.
2019-03-07Auto merge of #58583 - varkor:const-generics-ty, r=oli-obkbors-412/+1201
Add const generics to ty (and transitive dependencies) Split out from #53645. This work is a collaborative effort with @yodaldevoid. There are a number of stubs. Some I plan to leave for the next PRs (e.g. `infer` and `rustdoc`). Others I can either fix up in this PR, or as follow ups (which would avoid the time-consuming rebasing). It was a little hard to split this up, as so much depends on ty and friends. Apologies for the large diff. r? @eddyb
2019-03-06Surround found token with `Esteban Küber-3/+3
2019-03-06Fix buffer invalidation at BufReader.read_vectoredAndré Vicente Milack-9/+11
2019-03-06Apply suggestions from code reviewRalf Jung-1/+1
2019-03-06Apply suggestions from code reviewMazdak Farrokhzad-3/+3
Co-Authored-By: RalfJung <post@ralfj.de>
2019-03-06Default to integrated `rust-lld` linker for UEFI targetsPhilipp Oppermann-1/+1
2019-03-06Make Cargo a rustc tool againJohn Kåre Alsaker-2/+2
2019-03-06rust-lldb: fix crash when printing empty stringAndy Russell-0/+37
2019-03-06add test for spurious intra-doc link warningQuietMisdreavus-0/+18
2019-03-06don't process `external_traits` when collecting intra-doc linksQuietMisdreavus-0/+10
2019-03-06Fix buffer invalidation for BufReadAndré Vicente Milack-2/+43
There are two moments when a BufRead object needs to empty it's internal buffer: - In a seek call; - In a read call when all data in the internal buffer had been already consumed and the output buffer has a greater or equal size than the internal buffer. In both cases, the buffer was not being properly emptied, but only marked as consumed (self.pos = self.cap). That should be no problem if the inner reader is only Read, but if it is Seek as well, then it's possible to access the data in the buffer by using the seek_relative method. In order to prevent this from happening, both self.pos and self.cap should be set to 0. Two test cases were added to detect that failure: - test_buffered_reader_invalidated_after_read - test_buffered_reader_invalidated_after_seek Both tests are very similar to each other. The inner reader contains the following data: [5, 6, 7, 0, 1, 2, 3, 4]. The buffer capacity is 3 bytes. - First, we call fill_buffer, which loads [5, 6, 7] into the internal buffer, and then consume those 3 bytes. - Then we either read the 5 remaining bytes in a single read call or we move to the end of the stream by calling seek. In both cases the buffer should be emptied to prevent the previous data [5, 6, 7] from being read. - We now call seek_relative(-2) and read two bytes, which should give us the last 2 bytes of the stream: [3, 4]. Before this commit, the the seek_relative method would consider that we're still in the range of the internal buffer, so instead of fetching data from the inner reader, it would return the two last bytes that were incorrectly still in the buffer: [6, 7]. Therefore, the test would fail. Now, when seek_relative is called the buffer is empty. So the expected data [3, 4] is fetched from the inner reader and the test passes.
2019-03-06Improve codeGuillaume Gomez-1/+4
2019-03-06Regression test for issue #58158.Felix S. Klock II-0/+40
2019-03-06Avoid ICE during `repr(packed)` well-formedness check via delay_span_bug.Felix S. Klock II-4/+7
(It is possible that there is a more fundamental invariant being violated, in terms of the `check_type_defn` code assuming that lifting to tcx will always succeed. But I am unaware of any test input that hits this that isn't already type-incorrect in some fashion.)
2019-03-06Regression test for #58813Felix S. Klock II-0/+14
(Update: Fixed test; revision is meant to introduce compile-failure, w/o ICE.)
2019-03-06Refactor const_to_opvarkor-9/+4
2019-03-06Desugared asyncs into generators and minimised.Giles Cope-12/+13
2019-03-05libstd: implement Error::source for io::ErrorSean McArthur-0/+8
2019-03-06Rename check_privacy to check_private_in_publicJohn Kåre Alsaker-9/+9