about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2020-03-24Rollup merge of #70241 - RalfJung:global-mem, r=oli-obkMazdak Farrokhzad-4/+48
Miri: move ModifiedStatic to ConstEval errors Also generally adjust terminology from "static" to "global" where appropriate (to avoid confusion with specifically `static` items).
2020-03-24Rollup merge of #70234 - anp:tracked-std-traits, r=AmanieuMazdak Farrokhzad-0/+22
#[track_caller] on core::ops::{Index, IndexMut}. Applies the attribute to `core::ops::Index(Mut)` and enough std internals to cover the [functions listed in "tier 1" in the original RFC](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md#survey-of-panicking-standard-functions). Split out from #69251 to allow separate assessment of perf impact. To my knowledge, this is the last piece of implementing RFC 2091. Tracking issue: https://github.com/rust-lang/rust/issues/47809
2020-03-24bless youRalf Jung-1/+1
2020-03-24get back the more precise error messageRalf Jung-1/+1
2020-03-24bless; add test for mutating a staticRalf Jung-4/+48
2020-03-24Rollup merge of #70284 - lcnr:issue70273-what-the-heck-git, r=eddybMazdak Farrokhzad-0/+54
correctly handle const params in type_of extends #70223, retry of #70276 fixes #70273 r? @eddyb cc @varkor
2020-03-24Rollup merge of #70077 - Aaron1011:feature/new-def-path-ident, r=petrochenkovMazdak Farrokhzad-37/+292
Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-24Rollup merge of #70074 - Centril:unpanictry, r=petrochenkovMazdak Farrokhzad-59/+359
Expand: nix all fatal errors Basically, we go after all `.span_fatal` / `FatalError.raise()` and similar things and remove them one by one until there are no fatal errors left. r? @petrochenkov
2020-03-24Rollup merge of #68884 - Zoxc:gen-type, r=nikomatsakisMazdak Farrokhzad-89/+224
Make the `type_of` return a generic type for generators Fixes https://github.com/rust-lang/rust/issues/67651. r? @nikomatsakis
2020-03-24pacify missing sysroot spans issueMazdak Farrokhzad-4/+9
2020-03-24fix rebase fallout due to #69497.Mazdak Farrokhzad-10/+25
2020-03-24fix rebase falloutMazdak Farrokhzad-0/+2
2020-03-24expand: address review commentsMazdak Farrokhzad-46/+53
2020-03-24expand: add recovery for parse_ntMazdak Farrokhzad-0/+44
2020-03-24defatalize expand_test_or_benchMazdak Farrokhzad-2/+18
2020-03-24defatalize `compile_declarative_macro`Mazdak Farrokhzad-0/+22
2020-03-24mbe::transcribe: defatalize errors.Mazdak Farrokhzad-8/+46
2020-03-24defatalize ProcMacroDerive::expandMazdak Farrokhzad-13/+36
Also remove ExtCtxt::struct_span_fatal.
2020-03-24defatalize BangProcMacro::expandMazdak Farrokhzad-6/+25
2020-03-24generic_extension: defatalize Error caseMazdak Farrokhzad-8/+27
2020-03-24nix panictry! in ParserAnyMacro::makeMazdak Farrokhzad-16/+106
2020-03-24Rollup merge of #70294 - estebank:bad-placeholder-in-where, r=CentrilMazdak Farrokhzad-55/+158
Account for bad placeholder types in where clauses Fix #70291. Follow up to #69148.
2020-03-24Rollup merge of #70283 - CDirkx:regression-test-70155, r=oli-obkMazdak Farrokhzad-0/+30
Add regression test for #70155. With #70166 merged, `RangeInclusive` now derives `PartialEq` and `Eq`, implementing structural equality and as a side effect the range is now usable with const generics, closing #70155. As per [#70166 (comment)](https://github.com/rust-lang/rust/pull/70166#issuecomment-601872201) a test is added to avoid a change to the private fields or the equality implementation of the range from subtly reverting #70155.
2020-03-24Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakisMazdak Farrokhzad-14/+14
Remove `ReClosureBound` We now substitute external names for regions in the query response. r? @nikomatsakis
2020-03-24Rollup merge of #70264 - tirr-c:issue-69789-mut-suggestion, r=estebankMazdak Farrokhzad-0/+23
Fix invalid suggestion on `&mut` iterators yielding `&` references Fixes #69789. rustc suggested an invalid code when `&` reference from `&mut` iterator is mutated. The compiler knew we're mutating a value behind `&` reference, but as the assignment RHS is from desugaring, it could only see the iterator expression from source and inserted `mut` there. r? @estebank
2020-03-24Rollup merge of #70242 - DeeDeeG:improve-e0308, r=Dylan-DPCMazdak Farrokhzad-32/+32
Improve E0308 error message wording Hi folks, I made [a post on Reddit](https://old.reddit.com/r/rust/comments/fmi11x/consider_linting_rusts_documentationerror_text/) about how (IMO) the docs/error messages can be a bit intimidating, one thing led to another, and I was encouraged to submit a Pull Request if I felt I could re-phrase the error message that I used as an example. So that's this Pull Request. Open to any feedback or style changes, and I understand this is subjective. (On another note: I am happy to see [this message was recently improved](https://github.com/rust-lang/rust/pull/69139) in `master`, so it's already better than it is in stable Rust 1.42.0.) Ideally the last sentence could be split into at least two: [sentence explaining the inferred type.] [Sentence explaining explicit type.] [Sentence that summarizes that "this is bad," and why.] But I'm not sure how to do so; I'm wary of writing something that turns out to be technically incorrect.
2020-03-24Rollup merge of #70087 - ecstatic-morse:remove-const-eval-loop-detector, ↵Mazdak Farrokhzad-70/+46
r=RalfJung Remove const eval loop detector Now that there is a configurable instruction limit for CTFE (see #67260), we can replace the loop detector with something much simpler. See #66946 for more discussion about this. Although the instruction limit is nightly-only, the only practical way to reach the default limit uses nightly-only features as well (although CTFE will still execute code using such features inside an array initializer on stable). This will at the very least require a crater run, since it will result in an error wherever the "long running const eval" warning appeared before. We may need to increase the default for `const_eval_limit` to work around this. Resolves #54384 cc #49980 r? @oli-obk cc @RalfJung
2020-03-24Rollup merge of #69981 - oli-obk:const_blocks, r=eddybMazdak Farrokhzad-118/+167
Evaluate repeat expression lengths as late as possible Fixes #68567 r? @varkor
2020-03-24Rollup merge of #69740 - mark-i-m:describe-it-3, r=eddybMazdak Farrokhzad-12/+12
Replace some desc logic in librustc_lint with article_and_desc r? @eddyb @Centril @matthewjasper Followup to https://github.com/rust-lang/rust/pull/69674 Blocked on #69498
2020-03-23Remove leftover mentions of `from_anon_const`Oliver Scherer-1/+1
2020-03-23Account for bad placeholder types in where clausesEsteban Küber-55/+158
2020-03-23Update testsJohn Kåre Alsaker-89/+224
2020-03-23Merge tests.CDirkx-68/+30
Merge tests to a single test file.
2020-03-23Add const generics test for all range types.CDirkx-2/+58
In addition to the regression test of `RangeInclusive` for #70155, now all range types are checked for usability within const generics: - `RangeFrom` - `RangeFull` - `RangeToInclusive` - `RangeTo` - `Range` The test are moved from `test\ui\const-generics\issues\issue-70155` to `test\ui\const-generics\std\range` in anticipation of future similar tests for std types.
2020-03-23Rollup merge of #70300 - aleksator:66636_reword_unused_variable_warning, ↵Mazdak Farrokhzad-66/+66
r=Dylan-DPC Reword unused variable warning Fixes #66636
2020-03-23Rollup merge of #70195 - rylev:test-for-53275, r=CentrilMazdak Farrokhzad-0/+9
Add test for issue #53275 Fixes #53275
2020-03-23Remove `ReClosureBound`Matthew Jasper-14/+14
2020-03-23#[track_caller] on core::ops::{Index, IndexMut}.Adam Perry-0/+22
2020-03-23Auto merge of #69649 - estebank:negative-impl-span, r=Centrilbors-23/+37
Tweak output for invalid negative impl errors Follow up to #69722. Tweak negative impl errors emitted in the HIR: ``` error[E0192]: invalid negative impl --> $DIR/E0192.rs:9:6 | LL | impl !Trait for Foo { } | ^^^^^^ | = note: negative impls are only allowed for auto traits, like `Send` and `Sync` ```
2020-03-23Evaluate repeat expression lengths as late as possibleOliver Scherer-117/+166
2020-03-23Make sure issue 53275 test goes through codegenRyan Levick-1/+2
2020-03-23Rollup merge of #70233 - petrochenkov:superproc, r=ecstatic-morseMazdak Farrokhzad-0/+39
resolve: Do not resolve visibilities on proc macro definitions twice Fixes https://github.com/rust-lang/rust/issues/68921
2020-03-23Rollup merge of #69968 - eddyb:tupled-closure-captures, r=nikomatsakisMazdak Farrokhzad-7/+51
rustc: keep upvars tupled in {Closure,Generator}Substs. Previously, each closure/generator capture's (aka "upvar") type was tracked as one "synthetic" type parameter in the closure/generator substs, and figuring out where the parent `fn`'s generics end and the synthetics start involved slicing at `tcx.generics_of(def_id).parent_count`. Needing to query `generics_of` limited @davidtwco (who wants to compute some `TypeFlags` differently for parent generics vs upvars, and `TyCtxt` is not available there), which is how I got started on this, but it's also possible that the `generics_of` queries are slowing down `{Closure,Generator}Substs` methods. To give an example, for a `foo::<T, U>::{closure#0}` with captures `x: X` and `y: Y`, substs are: * before this PR: `[T, U, /*kind*/, /*signature*/, X, Y]` * after this PR: `[T, U, /*kind*/, /*signature*/, (X, Y)]` You can see that, with this PR, no matter how many captures, the last 3 entries in the substs (or 5 for a generator) are always the "synthetic" ones, with the last one being the tuple of capture types. r? @nikomatsakis cc @Zoxc
2020-03-23Rollup merge of #69942 - estebank:sized-verbose-sugg, r=matthewjasperMazdak Farrokhzad-581/+724
Increase verbosity when suggesting subtle code changes Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion. Fix #69243.
2020-03-23Reword unused variable warningAlex Tokarev-66/+66
2020-03-23resolve: Do not resolve visibilities on proc macro definitions twiceVadim Petrochenkov-0/+39
2020-03-23Ignore tests on some platforms due to #53081Aaron Hill-36/+121
2020-03-22Tweak output for invalid negative impl errorsEsteban Küber-23/+37
2020-03-22Store idents for `DefPathData` into crate metadataAaron Hill-1/+171
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-23Rollup merge of #70249 - lcnr:issue70125, r=eddybMazdak Farrokhzad-0/+51
handle ConstKind::Unresolved after monomorphizing fixes #70125 r? @bjorn3