about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-01-03Only bump error count when we are sure that the diagnostic is not a repetition.Rafael Fernández López-5/+5
This ensures that if we emit the same diagnostic twice, the error count will match the real number of errors shown to the user. Fixes #42106
2018-01-02Auto merge of #47105 - matthewjasper:dont-panic-for-mut-in-static, r=estebankbors-0/+21
Delay panic for aliasing violation for static items. Closes #46604
2018-01-02Auto merge of #47111 - rkruppe:repr-transparent, r=estebankbors-6/+86
Check all repr hints together when checking for mis-applied attributes Fixes #47094 Besides fixing that bug, this change has a user-visible effect on the spans in the "incompatible repr hints" warning and another error: they now point at `foo` and/or `bar` in `repr(foo, bar)` instead of the whole attribute. This is sometimes more precise (e.g., `#[repr(C, packed)]` on an enum points at the `packed`) but sometimes not. I moved a compile-fail test to a ui test to illustrate how it now looks in the common case of only one attribute.
2018-01-01Check all repr hints together when checking for mis-applied attributesRobin Kruppe-6/+86
Fixes #47094 Besides fixing that bug, this change has a user-visible effect on the spans in the "incompatible repr hints" warning and another error: they now point at `foo` and/or `bar` in `repr(foo, bar)` instead of the whole attribute. This is sometimes more precise (e.g., `#[repr(C, packed)]` on an enum points at the `packed`) but sometimes not. I moved a compile-fail test to a ui test to illustrate how it now looks in the common case of only one attribute.
2018-01-01Delay panic for aliasing violation for static items.matthewjasper-0/+21
2018-01-01Auto merge of #46278 - MaloJaffre:ci-compiler-docs, r=kennytmbors-39/+0
Add compiler docs testing to CI. Fixes #47025. I don't know if `x86_64-gnu` is the right builder for this, but there seems to be time left on [Travis](https://travis-ci.org/rust-lang/rust/jobs/307488864). Remaining problems blocking this PR: - [x] broken links caused by rustdoc issues: - [x] `pub use self::Enum::...`: #46766 and #46767 (fixed by #47050, thanks @ollie27!) - [x] `impl Deref for DerefToStdType`: #32129 (ignored in linkchecker) - [x] `#[feature(decl_macro)]` and `use std::vec`: #47038 (ignored in linkchecker) - [x] `rustc_data_structures::sync::{Lrc, RwLock}` aliases `std` types: #32130 (ignored in linkchecker) - [x] markdown differences, in rust repository and in external crates, now failing the build with #46880 merged (all fixed) - [x] multiple crate updates needed: `rand`, `log`, `parking_lot_core`, `flate2` - [x] submodule updates needed to deduplicate dependencies: `rust-installer`, ~`cargo`~ (done by #47052) - [x] #44953 test broken by `log` update (removed, this can be controversial) - [x] Waiting `x86_64-gnu` build results ([done](https://travis-ci.org/rust-lang/rust/builds/323451069)) See individual commits for more details.
2018-01-01Remove a test blocking the update of the `log` crateMalo Jaffré-39/+0
It tested #44953. `log` macros in newer versions are no longer recursive, so these duplicated error messages (about unstable feature uses) previously occurring at each level of recursion are no longer possible, even with the fix by #45540. Furthermore this test breaks when multiple versions of `log` are in the sysroot (`log 0.3.9` depends on`log 0.4.1`)
2018-01-01Auto merge of #47098 - estebank:immutable-field, r=nagisabors-41/+44
Reword trying to operate in immutable fields The previous message ("cannot assign/mutably borrow immutable field") when trying to modify a field of an immutable binding gave the (incorrect) impression that fields can be mutable independently of their ADT's binding. Slightly reword the message to read "cannot assign/mutably borrow field of immutable binding". Re #35937.
2018-01-01Auto merge of #46895 - ricochet1k:macro-lifetimes, r=jseyfriedbors-0/+148
Allow lifetimes in macros This is a resurrection of PR #41927 which was a resurrection of #33135, which is intended to fix #34303. In short, this allows macros_rules! to use :lifetime as a matcher to match 'lifetimes. Still to do: - [x] Feature gate
2018-01-01Auto merge of #47064 - kennytm:force-trailing-newlines, r=estebankbors-45/+20
Add a tidy check for missing or too many trailing newlines. I've noticed recently there are lots of review comments requesting to fix trailing newlines. If this is going to be an official style here, it's better to let the CI do this repetitive check.
2017-12-31Reword trying to operate in immutable fieldsEsteban Küber-41/+44
The previous message ("cannot assign/mutably borrow immutable field") when trying to modify a field of an immutable binding gave the (incorrect) impression that fields can be mutable independently of their ADT's binding. Slightly reword the message to read "cannot assign/mutably borrow field of immutable binding".
2017-12-31Removed unnecessary output of linker options when linker is not installedFelix Schütt-1/+1
It's unnecessary to print the linker options if there is no linker installed. Currently, for libraries, the output is still printed, see #46998 for discussion
2017-12-31Auto merge of #47084 - ↵bors-0/+36
zackmdavis:and_the_case_of_the_bloated_tuple_struct_indices, r=petrochenkov in which leading zeroes on tuple-struct accesses are abjured Resolves #47073. If accepted, a point in the compatibility section of the release notes is warranted.
2017-12-30in which leading zeroes on tuple-struct accesses are abjuredZack M. Davis-0/+36
Resolves #47073.
2017-12-31Auto merge of #47044 - topecongiro:fixed-ices, r=estebankbors-0/+153
Add tests on fixed ICEs Closes #29924. Closes #38857. Closes #39665. Closes #39872. Closes #41210. Closes #41880. Closes #43483. Note that compile-fail/E0599.rs is for #41210.
2017-12-30Add tests on fixed ICEsSeiichi Uchida-0/+153
Closes #29924. Closes #38857. Closes #39665. Closes #39872. Closes #39553. Closes #41210. Closes #41880. Closes #43483.
2017-12-30Remove excessive trailing newlines.kennytm-25/+0
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-20/+20
2017-12-29Auto merge of #47050 - ollie27:rustdoc_import_links, r=QuietMisdreavusbors-0/+34
rustdoc: Don't try to generate links for modules in import paths The modules may be private or may even be enums so it would generate dead links. Fixes #29814 Fixes #46766 Fixes #46767
2017-12-28rustdoc: Don't try to generate links for modules in import pathsOliver Middleton-0/+34
The modules may be private or may even be enums so it would generate dead links.
2017-12-28Add feature gate macro_lifetime_matcherMatt Peterson-0/+36
2017-12-28Fix build and add a macro lifetime labels testMatt Peterson-0/+43
2017-12-28Resurrecting #33135Michael Hewson-0/+69
Started rebasing @sgrif's PR #33135 off of current master. (Well, actually merging it into a new branch based off current master.) The following files still need to be fixed or at least reviewed: - `src/libsyntax/ext/tt/macro_parser.rs`: calls `Parser::parse_lifetime`, which doesn't exist anymore - `src/libsyntax/parse/parser.rs`: @sgrif added an error message to `Parser::parse_lifetime`. Code has since been refactored, so I just took it out for now. - `src/libsyntax/ext/tt/transcribe.rs`: This code has been refactored bigtime. Not sure whether @sgrif's changes here are still necessary. Took it out for this commit.
2017-12-28Auto merge of #47021 - shssoichiro:46576-Incorrect-Span-Imports, r=estebankbors-2/+47
Pass correct span when lowering grouped imports Solves incorrect diagnostics for unused or deprecated imports. Closes #46576. Deprecated imports had an existing test which asserted the incorrect span. That test has been corrected as part of this commit.
2017-12-28Auto merge of #47031 - topecongiro:issue-41719, r=jseyfriedbors-0/+18
Report an error when resolving non-ident macro path failed Closes #41719. Please feel free to bikeshed on the error message.
2017-12-28Auto merge of #47013 - topecongiro:issue-46655, r=petrochenkovbors-3/+28
Do not expand a derive invocation when derive is not allowed Closes #46655. The first commit is what actually closes #46655. The second one is just a refactoring I have done while waiting on a test.
2017-12-28Prefer to use attr::contains_name() and attr::find_by_name()Seiichi Uchida-3/+5
2017-12-28Auto merge of #47017 - topecongiro:issue-33469, r=estebankbors-0/+19
Do not panic on interpolated token inside quote macro Closes #33469.
2017-12-27Auto merge of #47014 - topecongiro:fixed-ices, r=estebankbors-0/+192
Add tests to fixed ICEs Closes #27078. Closes #27985. Closes #39848. Closes #42164. Closes #42479. Closes #45662. Closes #45965. Closes #46152.
2017-12-28Report an error when resolving non-ident macro path failedtopecongiro-0/+18
2017-12-27Auto merge of #46479 - bkchr:termination_trait, r=arielb1bors-70/+270
Implements RFC 1937: `?` in `main` This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function. Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help! The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
2017-12-27Auto merge of #47009 - eddyb:issue-46855, r=arielb1bors-0/+34
rustc_trans: support ZST indexing involving uninhabited types. Fixes #46855 in a minimal way. I decided against supporting non-memory `Rvalue::Len` in this PR (see https://github.com/rust-lang/rust/issues/46855#issuecomment-352965807), as `PlaceContext::Inspect` is also used for `Rvalue::Discriminant`. r? @arielb1
2017-12-27Auto merge of #47007 - eddyb:issue-46897, r=arielb1bors-2/+3
rustc: don't use union layouts for tagged union enums. Fixes #46897, fixes #43517 (AFAICT from the testcases). This PR doesn't add any testcases, we should try to at least get perf ones (cc @Mark-Simulacrum). I couldn't find an example in those issues where the choice of LLVM array vs struct (with N identical fields) for padding filler types is still needed, *on top of* this change, to prevent excessive LLVM sinking. r? @arielb1
2017-12-27Auto merge of #46977 - est31:column_fix, r=dtolnaybors-5/+5
Make the output of the column! macro 1 based Fixes #46868. I didn't add any regression tests as the change already had to change tests inside the codebase. r? @dtolnay
2017-12-27Auto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkovbors-18/+8
Use def span for non-ascii ident feature gate error
2017-12-27Revert "New generated main returns void"Bastian Köcher-2/+2
This reverts commit 267800a7c0834dd8ca93a82a20cb0cdd9e7dc025.
2017-12-26Auto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1bors-1/+146
[MIR Borrowck] Moveck inline asm statements Closes #45695 New behavior: * Input operands to `asm!` are moved, direct output operands are initialized. * Direct, non-read-write outputs match the assignment changes in #46752 (Shallow writes, end borrows).
2017-12-26rustc: don't use union layouts for tagged union enums.Eduard-Mihai Burtescu-2/+3
2017-12-26rustc_trans: support ZST indexing involving uninhabited types.Eduard-Mihai Burtescu-0/+34
2017-12-26Pass correct span when lowering grouped importsJosh Holmer-2/+47
Solves incorrect diagnostics for unused or deprecated imports. Closes #46576. Deprecated imports had an existing test which asserted the incorrect span. That test has been corrected as part of this commit.
2017-12-26Auto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxcbors-20/+5
"incompatible arm" diagnostic span tweak Use span label instead of span note for single line spans in "incompatible arm" diagnostic.
2017-12-26Do not panic on interpolated token inside quote macroSeiichi Uchida-0/+19
2017-12-26Revert "Just compare the symbol names and types, not the addresses"Bastian Köcher-6/+6
This reverts commit 7d4d98e5c870a2dcdca8ea3aa47ecee680a35e60.
2017-12-26Use `start` for the `sepcomp-inlining` testBastian Köcher-3/+8
2017-12-26The test functions are now in the same compile unitBastian Köcher-2/+2
2017-12-26Just compare the symbol names and types, not the addressesBastian Köcher-6/+6
2017-12-26Convert codegen-unit tests to use `start` instead of `main`Bastian Köcher-454/+148
The new Termination traits brings in the unwinding machinery and that blows up the required `TRANS_ITEM`s.
2017-12-26Adds termination_trait feature gateBastian Köcher-0/+15
2017-12-26Fixes codegen-units testsBastian Köcher-1/+400
2017-12-26New generated main returns voidBastian Köcher-2/+2