about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2019-09-01Be accurate on `format!` parse error expectationsEsteban Küber-6/+6
2019-08-31Auto merge of #63991 - Centril:unique-improper-ctype, r=rkruppebors-13/+23
`improper_ctypes`: guard against accidental change to `Unique<T>` r? @eddyb
2019-08-31improper_ctypes: guard against accidental change to Unique<T>.Mazdak Farrokhzad-13/+23
2019-08-30Auto merge of #64026 - Centril:rollup-le667lp, r=Centrilbors-106/+162
Rollup of 7 pull requests Successful merges: - #62957 (Match the loop examples) - #63600 (Merge oli-obk mail addresses) - #63684 (Constify LinkedList new function) - #63847 ([rustdoc] Fix system theme detection) - #63999 (Add missing links on AsRef trait) - #64014 ( miri: detect too large dynamically sized objects ) - #64015 (some const-eval test tweaks) Failed merges: r? @ghost
2019-08-30Rollup merge of #64015 - RalfJung:const-tests, r=oli-obkMazdak Farrokhzad-60/+84
some const-eval test tweaks Best reviewed commit-by-commit. r? @oli-obk
2019-08-30Rollup merge of #64014 - RalfJung:miri-slice, r=oli-obkMazdak Farrokhzad-46/+78
miri: detect too large dynamically sized objects Needed to make https://github.com/rust-lang/miri/pull/929 pass. r? @oli-obk
2019-08-30Auto merge of #63982 - sam09:fix-63976, r=estebankbors-2/+2
When accessing private field of union, do not misidentify it as a struct Fix incorrect error message when accessing private field of union. Fixes #63976.
2019-08-30add testRalf Jung-0/+29
2019-08-30const-eval tests: make all unions repr(C)Ralf Jung-59/+79
2019-08-30explain why REF_AS_USIZE is importantRalf Jung-0/+3
2019-08-30tweak const-valid testRalf Jung-1/+2
2019-08-30make unions repr(C)Ralf Jung-18/+21
2019-08-30Auto merge of #63402 - estebank:strip-margin, r=oli-obkbors-24/+118
Strip code to the left and right in diagnostics for long lines Fix #62999.
2019-08-30better variable namesRalf Jung-28/+28
2019-08-30Update testsOliver Scherer-2/+2
2019-08-30Add a "diagnostic item" schemeOliver Scherer-0/+32
This allows lints and other diagnostics to refer to items by a unique ID instead of relying on whacky path resolution schemes that may break when items are relocated.
2019-08-30Fix test.Sam Radhakrishan-2/+2
2019-08-29Rollup merge of #63956 - alexcrichton:fix-lto-all-cached, r=michaelwoeristerMazdak Farrokhzad-1/+1
rustc: Handle modules in "fat" LTO more robustly When performing a "fat" LTO the compiler has a whole mess of codegen units that it links together. To do this it needs to select one module as a "base" module and then link everything else into this module. Previously LTO passes assume that there's at least one module in-memory to link into, but nowadays that's not always true! With incremental compilation modules may actually largely be cached and it may be possible that there's no in-memory modules to work with. This commit updates the logic of the LTO backend to handle modules a bit more uniformly during a fat LTO. This commit immediately splits them into two lists, one serialized and one in-memory. The in-memory list is then searched for the largest module and failing that we simply deserialize the first serialized module and link into that. This refactoring avoids juggling three lists, two of which are serialized modules and one of which is half serialized and half in-memory. Closes #63349
2019-08-29Rollup merge of #63880 - RalfJung:miri-meta, r=oli-obkMazdak Farrokhzad-66/+123
Validation: check raw wide pointer metadata While I was at it, I also added a missing check for slices not to be too big. r? @oli-obk Fixes https://github.com/rust-lang/miri/issues/918
2019-08-29Rollup merge of #63867 - petrochenkov:dhelpers, r=matthewjasperMazdak Farrokhzad-75/+88
resolve: Block expansion of a derive container until all its derives are resolved So, it turns out there's one more reason to block expansion of a `#[derive]` container until all the derives inside it are resolved, beside `Copy` (https://github.com/rust-lang/rust/pull/63248). The set of derive helper attributes registered by derives in the container also has to be known before the derives themselves are expanded, otherwise it may be too late (see https://github.com/rust-lang/rust/pull/63468#issuecomment-524550872 and the `#[stable_hasher]`-related test failures in https://github.com/rust-lang/rust/pull/63468). So, we stop our attempts to unblock the container earlier, as soon as the `Copy` status is known, and just block until all its derives are resolved. After all the derives are resolved we immediately go and process their helper attributes in the item, without delaying it until expansion of the individual derives. Unblocks https://github.com/rust-lang/rust/pull/63468 r? @matthewjasper (as a reviewer of https://github.com/rust-lang/rust/pull/63248) cc @c410-f3r
2019-08-29Rollup merge of #63961 - JohnTitor:improve-require-lang-item, r=estebankMazdak Farrokhzad-0/+4
Add Option<Span> to `require_lang_item` Fixes #63954 I'm not sure where to take `Some(span)` or something so I use `None` in many places. r? @estebank
2019-08-29Rollup merge of #63945 - Centril:recover-mut-pat, r=estebankMazdak Farrokhzad-116/+392
Recover `mut $pat` and other improvements - Recover on e.g. `mut Foo(x, y)` and suggest `Foo(mut x, mut y)`. Fixes https://github.com/rust-lang/rust/issues/63764. - Recover on e.g. `let mut mut x;` - Recover on e.g. `let keyword` and `let keyword(...)`. - Cleanups in `token.rs` with `fn is_non_raw_ident_where` and friends.
2019-08-29Rollup merge of #63938 - tshepang:typo, r=CentrilMazdak Farrokhzad-2/+2
or-pattern: fix typo in error message cc https://github.com/rust-lang/rust/issues/54883.
2019-08-29Rollup merge of #63811 - estebank:impl-trait-arg, r=cramertjMazdak Farrokhzad-0/+55
Correctly suggest adding bounds to `impl Trait` argument Fix #63706.
2019-08-28Auto merge of #63853 - matthewjasper:test-ast-serialization, r=estebankbors-0/+51
Add default serialization for `Ident`s Also add tests for `-Zast-json` and `-Zast-json-noexpand` closes #63728
2019-08-28Auto merge of #63820 - oli-obk:eager_const_eval, r=nikomatsakisbors-10/+10
Simplify eager normalization of constants r? @nikomatsakis
2019-08-28Auto merge of #63127 - kper:pr, r=nikomatsakisbors-12/+12
Cleanup: Consistently use `Param` instead of `Arg` #62426 Fixes #62426
2019-08-28or-pattern: fix typo in error messageTshepang Lekhonkhobe-2/+2
2019-08-28Remove `sized` spansYuki Okushi-14/+2
2019-08-28Apply review commentsYuki Okushi-2/+14
2019-08-28Add Option<Span> to `require_lang_item`Yuki Okushi-0/+4
2019-08-27Add default serialization for `Ident`sMatthew Jasper-0/+51
Add tests for -Zast-json and -Zast-json-noexpand, which need this impl.
2019-08-27Improve 'mut ' diagnostic.Mazdak Farrokhzad-17/+48
2019-08-27rustc: Handle modules in "fat" LTO more robustlyAlex Crichton-1/+1
When performing a "fat" LTO the compiler has a whole mess of codegen units that it links together. To do this it needs to select one module as a "base" module and then link everything else into this module. Previously LTO passes assume that there's at least one module in-memory to link into, but nowadays that's not always true! With incremental compilation modules may actually largely be cached and it may be possible that there's no in-memory modules to work with. This commit updates the logic of the LTO backend to handle modules a bit more uniformly during a fat LTO. This commit immediately splits them into two lists, one serialized and one in-memory. The in-memory list is then searched for the largest module and failing that we simply deserialize the first serialized module and link into that. This refactoring avoids juggling three lists, two of which are serialized modules and one of which is half serialized and half in-memory. Closes #63349
2019-08-27Ensure 'let mut ;' where ':pat' is banned.Mazdak Farrokhzad-1/+18
2019-08-27Changing error messages and renaming tests #63127Kevin Per-2/+2
`async-await/no-args-non-move-async-closure` `generator/no-arguments-on-generators`
2019-08-27Cleanup: Consistently use `Param` instead of `Arg` #62426Kevin Per-4/+4
2019-08-27recover on 'mut ' and improve recovery for keywords.Mazdak Farrokhzad-116/+344
2019-08-27Rollup merge of #63917 - lzutao:langitem_gen_63912, r=centril,cramertMazdak Farrokhzad-0/+23
Error when generator trait is not found Closes #63912
2019-08-27Rollup merge of #63761 - petrochenkov:procattrs, r=eddybMazdak Farrokhzad-41/+188
Propagate spans and attributes from proc macro definitions Thanks to https://github.com/rust-lang/rust/pull/63269 we now have spans and attributes from proc macro definitions available in metadata. However, that PR didn't actually put them into use! This PR finishes that work. Attributes `rustc_macro_transparency`, `allow_internal_unstable`, `allow_internal_unsafe`, `local_inner_macros`, `rustc_builtin_macro`, `stable`, `unstable`, `rustc_deprecated`, `deprecated` now have effect when applied to proc macro definition functions. From those attributes only `deprecated` is both stable and supposed to be used in new code. (`#![staged_api]` still cannot be used in proc macro crates for unrelated reasons though.) `Span::def_site` from the proc macro API now returns the correct location of the proc macro definition. Also, I made a mistake in https://github.com/rust-lang/rust/pull/63269#discussion_r312702919, loaded proc macros didn't actually use the resolver cache. This PR fixes the caching issue, now proc macros go through the `Resolver::macro_map` cache as well. (Also, the first commit turns `proc_macro::quote` into a regular built-in macro to reduce the number of places where `SyntaxExtension`s need to be manually created.)
2019-08-27proc_macro: Update `Span::def_site` to use the proc macro definition locationVadim Petrochenkov-41/+143
Which is no longer dummy and is available from metadata now.
2019-08-27Respect attributes on proc macro definitionsVadim Petrochenkov-0/+43
2019-08-26Rollup merge of #63693 - Centril:polish-parse-or-pats, r=estebankMazdak Farrokhzad-117/+871
Fully implement or-pattern parsing Builds upon the initial parsing in https://github.com/rust-lang/rust/pull/61708 to fully implement or-pattern (`p | q`) parsing as specified in [the grammar section of RFC 2535](https://github.com/rust-lang/rfcs/blob/master/text/2535-or-patterns.md#grammar). Noteworthy: - We allow or-patterns in `[p | q, ...]`. - We allow or-patterns in `let` statements and `for` expressions including with leading `|`. - We improve recovery for `p || q` (+ tests for that in `multiple-pattern-typo.rs`). - We improve recovery for `| p | q` in inner patterns (tests in `or-patterns-syntactic-fail.rs`). - We rigorously test or-pattern parsing (in `or-patterns-syntactic-{pass,fail}.rs`). - We harden the feature gating tests. - We do **_not_** change `ast.rs`. That is, `ExprKind::Let.0` and `Arm.pats` still accept `Vec<P<Pat>>`. I was starting work on that but it would be cleaner to do this in a separate PR so this one has a narrower scope. cc @dlrobertson cc the tracking issue https://github.com/rust-lang/rust/issues/54883. r? @estebank
2019-08-26Rollup merge of #63317 - estebank:dead-code, r=matthewjasperMazdak Farrokhzad-14/+152
Do not complain about unused code when used in `impl` `Self` type Fix https://github.com/rust-lang/rust/issues/18290.
2019-08-27proc_macro: Turn `quote` into a regular built-in macroVadim Petrochenkov-0/+2
Previously in was implemented using a special hack in the metadata loader
2019-08-27resolve: Block expansion of a derive container until all its derives are ↵Vadim Petrochenkov-75/+88
resolved Also mark derive helpers as known as a part of the derive container's expansion instead of expansion of the derives themselves which may happen too late.
2019-08-26review commentEsteban Küber-2/+2
2019-08-26adjust testsRalf Jung-18/+9
2019-08-26parser: fix span for leading vert.Mazdak Farrokhzad-4/+4
2019-08-26Error when generator trait is not foundLzu Tao-0/+23