about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
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
2019-03-06Add some commentsJohn Kåre Alsaker-1/+7
2019-03-06Execute all parallel blocks even if they panic in a single-threaded compilerJohn Kåre Alsaker-5/+45
2019-03-06Update testsJohn Kåre Alsaker-4/+109
2019-03-06Make wf checking parallelJohn Kåre Alsaker-31/+20
2019-03-06Make misc checking 1 more parallelJohn Kåre Alsaker-37/+17
2019-03-06Make misc checking 2 more parallelJohn Kåre Alsaker-44/+17
2019-03-06Run the first block in a parallel! macro directly in the scope which ↵John Kåre Alsaker-5/+6
guarantees that it will run immediately
2019-03-06Split up privacy checking so privacy_access_levels only does computations ↵John Kåre Alsaker-70/+84
required for AccessLevels
2019-03-05On incorrect cfg literal/identifier, point at the right spanEsteban Küber-3/+3
2019-03-05Add a tracking issue for new as_slice methodsJosh Stone-2/+2
2019-03-05Clean up the example on slice::IterMut::as_slice()Josh Stone-6/+2
2019-03-05Apply suggestions from code reviewMazdak Farrokhzad-4/+4
Co-Authored-By: cuviper <cuviper@gmail.com>
2019-03-05Make adjustments for commentsvarkor-9/+12
2019-03-05Fix rebase falloutvarkor-6/+6
2019-03-05Clean up some generic substs handlingvarkor-18/+35
2019-03-05Fix negative integer literal testvarkor-19/+8
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Update test falloutvarkor-18/+4
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Update const generics testsvarkor-53/+30
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Handle const generics elsewherevarkor-12/+48
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Handle const generics in typeckvarkor-17/+87
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Handle new ConstValue variants in mirvarkor-12/+22
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Implement structural_impls for const genericsvarkor-1/+21
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Add HAS_CT_INFERvarkor-2/+5
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Stub rustdoc const generics implementationsvarkor-0/+12
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Implement collect for const parametersvarkor-85/+150
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Implement wfcheck for const parametersvarkor-9/+50
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Refactor compare_methodvarkor-45/+68
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Add ast_const_to_constvarkor-11/+74
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Make a lazy const from a const paramvarkor-5/+24
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Pretty printing for const genericsvarkor-3/+67
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Add const type flagsvarkor-17/+34
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Take const into account in contextvarkor-26/+74
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Stub methods in infervarkor-19/+34
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Implement Hash for new typesvarkor-0/+27
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Update diagnostics to include const parametersvarkor-4/+5
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05Add type constraints from const parametersvarkor-7/+42
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>