about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-11-24Rollup merge of #55767 - tromey:disable-some-pretty-printers, r=alexcrichtonkennytm-9/+9
Disable some pretty-printers when gdb is rust-enabled A rust-enabled gdb already knows how to display string slices, structs, tuples, and enums (and after #54004, the pretty-printers can't handle enums at all). This patch disables these pretty-printers when gdb is rust-enabled. The "gdb-pretty-struct-and-enums-pre-gdb-7-7.rs" test is renamed, because it does not seem to depend on any behavior of that version of gdb, and because gdb 7.7 is 4 years old now.
2018-11-23Auto merge of #55808 - estebank:type-arguments, r=petrochenkovbors-30/+92
Suggest correct syntax when writing type arg instead of assoc type - When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`. - When encountering multiple missing associated types, emit only one diagnostic. - Point at associated type def span for context. - Point at each extra type argument. Follow up to #48288, fix #20977.
2018-11-22Do not point at associated types from other cratesEsteban Küber-30/+0
This is a somewhat arbitrary restriction in order to be consistent in the output of the tests regardless of target platform.
2018-11-22Reword and fix testEsteban Küber-21/+19
2018-11-22Suggest correct syntax when writing type arg instead of assoc typeEsteban Küber-2/+6
When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
2018-11-22Point at the associated type's def spanEsteban Küber-0/+62
2018-11-22Join multiple E0191 errors in the same location under a single diagnosticEsteban Küber-20/+13
2018-11-22Point at every unexpected lifetime and type argument in E0107Esteban Küber-3/+38
2018-11-22Auto merge of #56143 - nikomatsakis:issue-56128-segment-id-ice-nightly, ↵bors-0/+15
r=petrochenkov Issue 56128 segment id ice nightly Tentative fix for #56128 From what I can tell, the problem is that if you have `pub(super) use foo::{a, b}`, then when we explode the `a` and `b`, the segment ids from the `super` path were not getting cloned. However, once I fixed *that*, then I ran into a problem that the "visibility" node-ids were not present in the final HIR -- this is because the visibility of the "stem" that is returned in this case was getting reset to inherited. I don't *think* it is a problem to undo that, so that the visibility is returned unmodified. Fixes #55475 Fixes #56128 cc @nrc @petrochenkov
2018-11-22fix codegen-units testsRalf Jung-37/+38
2018-11-22Auto merge of #53586 - eddyb:top-lock, r=alexcrichtonbors-2/+2
Move Cargo.{toml,lock} to the repository root directory. This should give us back `src/` in errors, panics and debuginfo, for free. r? @Mark-Simulacrum @alexcrichton cc @michaelwoerister
2018-11-22Move Cargo.{toml,lock} to the repository root directory.Eduard-Mihai Burtescu-2/+2
2018-11-22Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichtonGuillaume Gomez-4/+4
Fix error message for `-C panic=xxx`. Fixes rust-lang/cargo#6334
2018-11-22Rollup merge of #56002 - Axary:master, r=estebankGuillaume Gomez-0/+45
fix #55972: Erroneous self arguments on bare functions emit subpar compilation error #55972 r? @estebank
2018-11-22Rollup merge of #55980 - csmoe:issue-55891, r=estebankGuillaume Gomez-10/+30
Suggest on closure args count mismatching with pipe span Closes #55891 r? @estebank
2018-11-22Rollup merge of #55961 - tromey:Bug-55944-vecdeque, r=nikomatsakisGuillaume Gomez-0/+11
Fix VecDeque pretty-printer This fixes the VecDeque pretty-printer to handle cases where head < tail. Closes #55944
2018-11-22Rollup merge of #55367 - GuillaumeGomez:private-item-doc-test-lint, ↵Guillaume Gomez-0/+36
r=QuietMisdreavus lint if a private item has doctests Fixes #55333. r? @QuietMisdreavus
2018-11-21Move a flaky process test out of libstdAlex Crichton-0/+25
This test ensures that everything in `env::vars()` is inherited but that's not actually true because other tests may add env vars after we spawn the process, causing the test to be flaky! This commit moves the test to a run-pass test where it can execute in isolation. Along the way this removes a lot of the platform specificity of the test, using iteslf to print the environment instead of a foreign process.
2018-11-22Auto merge of #56147 - petrochenkov:impice, r=nikomatsakisbors-0/+67
resolve: Fix some asserts in import validation The asserts are not actually correct in presence of ambiguity errors. Fixes https://github.com/rust-lang/rust/issues/56125
2018-11-21add compile-pass annotationNiko Matsakis-0/+2
2018-11-21Auto merge of #56065 - oli-obk:min_const_fn_loop_ice, r=davidtwcobors-0/+13
Replace the ICEing on const fn loops with an error fixes #56035
2018-11-21Add test for sidebar link generationGuillaume Gomez-0/+23
2018-11-22resolve: Fix some asserts in import validationVadim Petrochenkov-0/+67
2018-11-21Fix BTreeSet and BTreeMap gdb pretty-printersTom Tromey-8/+9
The BTreeSet and BTreeMap gdb pretty-printers did not take the node structure into account, and consequently only worked for shallow sets. This fixes the problem by iterating over child nodes when needed. This patch avoids the current approach of implementing some of the value manipulations in debugger-indepdendent code. This was done for convenience: a type lookup was needed for the first time, and there currently are no lldb formatters for these types. Closes #55771
2018-11-21add regression testNiko Matsakis-0/+13
2018-11-21macro_literal_matcher: fixes per petrochenkov's reviewDan Aloni-2/+0
2018-11-21Stabilize macro_literal_matcherDan Aloni-32/+2
2018-11-21Enclose type in backticks for "reached the recursion limit while ↵varkor-7/+7
auto-dereferencing" error
2018-11-21Add tests for unsized-locals functions stability.Masaki Hara-0/+28
2018-11-21Add tests verifying #50940.Masaki Hara-0/+40
2018-11-21Check arg/ret sizedness at ExprKind::Path.Masaki Hara-44/+23
2018-11-21Auto merge of #56117 - petrochenkov:iempty, r=eddybbors-0/+11
resolve: Make "empty import canaries" invisible from other crates Empty imports `use prefix::{};` are desugared into `use prefix::{self as _};` to make sure the prefix is checked for privacy/stability/etc. This caused issues in cross-crate scenarios because gensyms are lost in crate metadata (the `_` is a gensym). Fixes https://github.com/rust-lang/rust/issues/55811
2018-11-21Explain why we do not overwrite qualification of localsOliver Scherer-5/+29
2018-11-21Add regression test for overwriting qualifs by assignmentOliver Scherer-0/+22
2018-11-21Fix a commentOliver Scherer-1/+1
2018-11-21TidyOliver Scherer-2/+2
2018-11-21Ensure assignments don't allow skipping projection checksOliver Scherer-0/+32
2018-11-21Properly assign to aggregate fieldsOliver Scherer-0/+20
2018-11-20Add unstable Literal::subspan().Sergio Benitez-0/+182
2018-11-21resolve: Make "empty import canaries" invisible from other cratesVadim Petrochenkov-0/+11
2018-11-21Add a couple more testsVadim Petrochenkov-3/+33
2018-11-21Stabilize `extern_crate_item_prelude`Vadim Petrochenkov-130/+0
2018-11-20Enclose type in backticks for "non-exhaustive patterns" errorvarkor-6/+6
This makes the error style consistent with the convention in error messages.
2018-11-20Auto merge of #55720 - RalfJung:const-eval-raw, r=oli-obkbors-28/+36
Make const_eval_raw query return just an AllocId r? @oli-obk
2018-11-20Auto merge of #55663 - varkor:must_use-traits, r=estebankbors-0/+36
Allow #[must_use] on traits Addresses https://github.com/rust-lang/rust/issues/55506, but we'll probably want to add it to some library traits like `Iterator` before the issue is considered fixed. Fixes https://github.com/rust-lang/rust/issues/51560. `#[must_use]` is already permitted on traits, with no effect, so this seems like a bug fix, but I might be overlooking something. This currently warns for `impl Trait` or `dyn Trait` when the `Trait` is `#[must_use]` (although I don't think the latter is currently possible, so it's simply future-proofed).
2018-11-20Incorporate `dyn` into more comments and docs.Corey Farwell-1/+2
2018-11-20improve error noteAxary-6/+6
2018-11-20Trailing newlineOliver Scherer-1/+1
2018-11-20Fix invalid bitcast taking bool out of a union represented as a scalarOlivier Goffart-0/+6
As reported in https://github.com/rust-lang/rust/pull/54668#issuecomment-440186476
2018-11-20Add sanity test for promotion and `const_let`Oliver Scherer-0/+35