about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-07-22add rustc_private as a proper language feature gateAleksey Kladov-0/+17
At the moment, `rustc_private` as a (library) feature exists by accident: `char::is_xid_start`, `char::is_xid_continue` methods in libcore define it.
2019-07-20Introduce rustc_lexerAleksey Kladov-8/+15
The idea here is to make a reusable library out of the existing rust-lexer, by separating out pure lexing and rustc-specific concerns, like spans, error reporting an interning. So, rustc_lexer operates directly on `&str`, produces simple tokens which are a pair of type-tag and a bit of original text, and does not report errors, instead storing them as flags on the token.
2019-07-20Auto merge of #62710 - estebank:bad-named-args, r=petrochenkovbors-19/+29
Specific error for positional args after named args in `format!()` When writing positional arguments after named arguments in the `format!()` and `println!()` macros, provide a targeted diagnostic. Follow up to https://github.com/rust-lang/rust/pull/57522/files#r247278885
2019-07-19Implement checks for meta-variables in macrosJulien Cretin-0/+254
2019-07-19Auto merge of #62694 - lundibundi:help-infer-fn-ret, r=eddybbors-7/+51
rustc_typeck: improve diagnostics for -> _ fn return type This should implement IIUC the mentioned issue. ~~I'm not sure if there is a better way than `get_infer_ret_ty` to get/check the return type without code duplication.~~ ~~Also, is this unwrap be okay `ty::Binder::bind(*tables.liberated_fn_sigs().get(hir_id).unwrap())`?~~ r? @eddyb Closes: https://github.com/rust-lang/rust/issues/56132
2019-07-19Auto merge of #62684 - petrochenkov:scopevisit, r=davidtwcobors-362/+194
resolve: Improve candidate search for unresolved macro suggestions Use same scope visiting machinery for both collecting suggestion candidates and actually resolving the names. The PR is better read in per-commit fashion with whitespace changes ignored (the first commit in particular moves some code around). This should be the last pre-requisite for https://github.com/rust-lang/rust/pull/62086. r? @davidtwco
2019-07-18Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddybbors-17/+473
rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
2019-07-18Auto merge of #62782 - Mark-Simulacrum:rollup-1hz5ya6, r=Mark-Simulacrumbors-262/+248
Rollup of 15 pull requests Successful merges: - #61926 (Fix hyperlinks in From impls between Vec and VecDeque) - #62615 ( Only error about MSVC + PGO + unwind if we're generating code) - #62696 (Check that trait is exported or public before adding hint) - #62712 (Update the help message on error for self type) - #62728 (Fix repeated wording in slice documentation) - #62730 (Consolidate hygiene tests) - #62732 (Remove last use of mem::uninitialized from std::io::util) - #62740 (Add missing link to Infallible in TryFrom doc) - #62745 (update data_layout and features for armv7-wrs-vxworks) - #62749 (Document link_section arbitrary bytes) - #62752 (Disable Z3 in LLVM build) - #62764 (normalize use of backticks in compiler messages for librustc/lint) - #62774 (Disable simd_select_bitmask test on big endian) - #62777 (Self-referencial type now called a recursive type) - #62778 (Emit artifact notifications for dependency files) Failed merges: - #62746 ( do not use mem::uninitialized in std::io) r? @ghost
2019-07-18Rollup merge of #62777 - gilescope:self-referencial-to-recursion, r=eddybMark Rousskov-17/+35
Self-referencial type now called a recursive type As per Boat's suggestion - #62539, this makes the error message clearer.
2019-07-18Rollup merge of #62774 - smaeul:pr/simd-tests, r=petrochenkovMark Rousskov-0/+4
Disable simd_select_bitmask test on big endian Per #59356 it is expected that the interpretation of the bitmask depends on target endianness. Closes #59356
2019-07-18Rollup merge of #62764 - ↵Mark Rousskov-172/+172
fakenine:normalize_use_of_backticks_compiler_messages_p7, r=alexreg normalize use of backticks in compiler messages for librustc/lint https://github.com/rust-lang/rust/issues/60532
2019-07-18Rollup merge of #62730 - matthewjasper:hygiene-tests, r=petrochenkovMark Rousskov-42/+26
Consolidate hygiene tests Some general clean-up extracted out from another PR
2019-07-18Rollup merge of #62712 - limira:self-type-help, r=estebankMark Rousskov-11/+11
Update the help message on error for self type Fix #62609
2019-07-18Rollup merge of #62696 - chocol4te:fix_#62194, r=estebankMark Rousskov-20/+0
Check that trait is exported or public before adding hint Closes #62194. This PR checks the `AccessLevels` of a trait to check whether adding the intercrate ambiguity hint is valid or not. I am unsure of both the use of `.unwrap()` as well as removing hints for [downstream *and* [upstream](https://github.com/rust-lang/rust/blob/92b0f52584c9375505ecdefdd7855b93a5919d51/src/librustc/traits/select.rs#L112-L142).
2019-07-18Auto merge of #62682 - alessandrod:issue-58375, r=eddybbors-0/+23
Normalize type parameters in create_mono_items_for_default_impls. Fix for https://github.com/rust-lang/rust/issues/58375. I've added a test in `src/tests/run-pass` to reproduce the bug, not sure that's the best place for it. See https://github.com/rust-lang/rust/issues/58375#issuecomment-509156977 for more context.
2019-07-18resolve: Attempt to resolve unresolved paths in macro namespaceVadim Petrochenkov-43/+43
2019-07-18resolve: Visit all scopes to collect suggestion candidates for unresolved macrosVadim Petrochenkov-22/+19
2019-07-18resolve: Use `feature(custom_attribute)` fallback only if the feature is enabledVadim Petrochenkov-306/+141
Normally `#![feature(...)]` shouldn't change behavior, but custom attributes in particular are in the process of retirement, and we should not produce a message telling to enable them. It also helps with unifying diagnostics for unresolved macros.
2019-07-18Self-referencial type renamed to recursive type.Giles Cope-17/+17
2019-07-18Auto merge of #62669 - estebank:suggest-assoc-type, r=cramertjbors-0/+16
Suggest assoc type on type not found in trait method definition Given ``` trait A { type Bla; fn to_bla(&self) -> Bla; } ``` suggest using `Self::Bla`: ``` error[E0412]: cannot find type `Bla` in this scope --> file.rs:3:25 | LL | fn to_bla(&self) -> Bla; | ^^^ help: try: `Self::Bla` ``` Fix #62650.
2019-07-17Disable simd_select_bitmask test on big endianSamuel Holland-0/+4
Per #59356 it is expected that the interpretation of the bitmask depends on target endianness. Closes #59356
2019-07-17normalize use of backticks in compiler messages for librustc/lintSamy Kacimi-172/+172
https://github.com/rust-lang/rust/issues/60532
2019-07-17Test case for #62506.Giles Cope-0/+18
2019-07-17rustc_typeck: improve diagnostics for -> _ fn return typeDenys Otrishko-7/+51
Closes: https://github.com/rust-lang/rust/issues/56132
2019-07-16Auto merge of #62592 - nikic:actually-update-llvm, r=alexcrichtonbors-12/+14
Update to LLVM 9 trunk Following the preparatory changes in #62474, this updates the LLVM submodule to https://github.com/rust-lang/llvm-project/tree/rustc/9.0-2019-07-12 and: * Changes the LLVM Rust bindings to account for the new SubtargetSubTypeKV. * Adjusts a codegen test for the new form of the byval attribute that takes a type. * Makes a PGO codegen test more liberal with regard to order and linkage. * Builds InstrProfilingPlatformWindows.c as part of libprofiler_builtins. * Moves registration of additional passes (in particular sanitizers) to the end of the module pass manager. * Disables LLDB on builders. r? @alexcrichton
2019-07-16Make pretty-expanded-hygiene a `ui` testMatthew Jasper-21/+12
`normalize-stdout-test` removes the need for Make, and it can be updated with `--bless` this way
2019-07-16Change all run-pass hygiene tests to `ui` testsMatthew Jasper-21/+14
Change some tests to `check-pass` that are only testing name resolution.
2019-07-16Rollup merge of #62703 - ↵Mark Rousskov-5/+5
fakenine:normalize_use_of_backticks_compiler_messages_p6, r=eddyb normalize use of backticks in compiler messages for libsyntax/parse https://github.com/rust-lang/rust/issues/60532
2019-07-16Rollup merge of #62702 - ↵Mark Rousskov-3/+3
fakenine:normalize_use_of_backticks_compiler_messages_p5, r=Centril normalize use of backticks in compiler messages for libsyntax_ext https://github.com/rust-lang/rust/issues/60532
2019-07-16Check that trait is exported or public before adding intercrate ambiguity hintFerdia McKeogh-20/+0
2019-07-16Update the help message on error for self typeLimira-11/+11
2019-07-15Specific error for positional args after named args in `format!()`Esteban Küber-19/+29
When writing positional arguments after named arguments in the `format!()` and `println!()` macros, provide a targeted diagnostic.
2019-07-15Rollup merge of #62685 - nathanwhit:as_ref_suggest_fix, r=estebankMark Rousskov-0/+1
Add info about undefined behavior to as_ref suggestions Fixes #61786. A very small fix, but suggestions on wording/content are welcomed.
2019-07-15Rollup merge of #62673 - RalfJung:validity-msg, r=oli-obkMark Rousskov-3/+3
miri validation: better error messages for dangling references Cc @oli-obk
2019-07-15Rollup merge of #62668 - goodmanjonathan:fix-62660, r=estebankMark Rousskov-0/+19
Fix #62660 If the explicitly given type of a `self` parameter fails to parse correctly, we need to propagate the error rather than dropping it and causing an ICE. Fixes #62660.
2019-07-15Rollup merge of #62646 - estebank:wording, r=petrochenkovMark Rousskov-59/+59
Tweak wording in feature gate errors
2019-07-15Rollup merge of #62639 - immunant:invariant_valistimpl, r=eddybMark Rousskov-44/+116
Make VaListImpl<'f> invariant over the 'f lifetime After doing some research on variance and going back to look at `VaList` and `VaListImpl`, I realized that `VaList<'a, 'f>` is invariant over the `'f` lifetime (and covariant over `'a`), but `VaListImpl<'f>` isn't invariant but probably should be. This patch makes `VaListImpl<'f>` invariant over `'f`. r? @eddyb cc @dlrobertson
2019-07-15Rollup merge of #62405 - hellow554:patch-1, r=varkorMark Rousskov-0/+9
Remove never_type feature requirement for exhaustive patterns I **think** this resolves #51221 At least for me, it doesn't ICE anymore and all tests are still passing, so LGTM
2019-07-15Rollup merge of #62103 - RalfJung:debug-assert, r=alexcrichtonMark Rousskov-0/+3
Add debug assertions to write_bytes and copy* Looks like @nitnelave went MIA in https://github.com/rust-lang/rust/pull/58783, so I am re-submitting their PR, tweaked just a bit. I took care to preserve commit authorship. Cc https://github.com/rust-lang/rust/issues/53871
2019-07-16normalize use of backticks in compiler messages for libsyntax/parseSamy Kacimi-5/+5
https://github.com/rust-lang/rust/issues/60532
2019-07-15normalize use of backticks in compiler messages for libsyntax_extSamy Kacimi-3/+3
https://github.com/rust-lang/rust/issues/60532
2019-07-15ignore some codegen tests in debug modeRalf Jung-0/+3
2019-07-15Relax checks in pgo-instrumentation codegen testNikita Popov-4/+4
Don't require a specific order for the per-function globals, and don't require the locals to have private linkage (apparently internal linkage is also possible).
2019-07-15pprust: Support `macro` macrosVadim Petrochenkov-1/+8
2019-07-15pprust: Fix formatting regressions from the previous commitsVadim Petrochenkov-39/+86
Fix some remaining cases of bad formatting Update some failing tests
2019-07-15pprust: Do not convert attributes into `MetaItem`s for printingVadim Petrochenkov-2/+9
Fixes https://github.com/rust-lang/rust/issues/62628
2019-07-15pprust: Use `print_mac_common` for delimited token groupsVadim Petrochenkov-50/+50
2019-07-15pprust: Use `print_mac_common` for attributesVadim Petrochenkov-1/+1
2019-07-15pprust: Use `print_mac_common` for `macro_rules` definitionsVadim Petrochenkov-3/+5
2019-07-15pprust: Move some methods to the `PrintState` traitVadim Petrochenkov-2/+2
So that path and macro argument printing code can be shared