about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2021-01-06Auto merge of #80714 - jakevossen5:master, r=lcnrbors-54/+54
fixed const_generics error help Closes https://github.com/rust-lang/rust/issues/80702
2021-01-05Remove useless doc_alias featureGuillaume Gomez-19/+15
2021-01-05Auto merge of #80686 - GuillaumeGomez:error-doc-alias-same-name, r=jyn514bors-0/+12
Error when #[doc(alias)] has same name as the item Something I came across when reviewing some doc alias PRs. r? `@jyn514`
2021-01-05fixed feature gate stderrJake Vossen-1/+1
2021-01-05fixed const_generics error helpJake Vossen-53/+53
2021-01-05Rollup merge of #80696 - RalfJung:failing-promoteds, r=oli-obkYuki Okushi-2/+13
make sure that promoteds which fail to evaluate in dead const code behave correctly https://github.com/rust-lang/rust/pull/80243 showed that we'll have to live with these kinds of failing promoteds for a while, so let's make sure we have a test that covers them.
2021-01-05Rollup merge of #80538 - JulianKnodt:err_usize, r=lcnrYuki Okushi-0/+25
Add check for `[T;N]`/`usize` mismatch in astconv Helps clarify the issue in #80506 by adding a specific check for mismatches between [T;N] and usize. r? `@lcnr`
2021-01-04make sure that promoteds which fail to evaluate in dead const code behave ↵Ralf Jung-2/+13
correctly
2021-01-04Add tests for new doc alias checkGuillaume Gomez-0/+12
2021-01-04Auto merge of #80651 - GroteGnoom:issue-78123-fix, r=Nadrierilbors-0/+29
Add note to non-exhaustive match on reference to empty Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123
2021-01-04Add check for array/usize mismatch in astconvkadmin-0/+25
2021-01-04Auto merge of #80418 - oli-obk:this_could_have_been_so_simple, r=RalfJungbors-55/+126
Allow references to interior mutable data behind a feature gate supercedes #80373 by simply not checking for interior mutability on borrows of locals that have `StorageDead` and thus can never be leaked to the final value of the constant tracking issue: https://github.com/rust-lang/rust/issues/80384 r? `@RalfJung`
2021-01-03Add notes to stderr of non-exhaustive-reference testDaniel Noom-2/+6
2021-01-03Add note on void reference testDaniel Noom-0/+1
This test is also changed by adding a note about uninhabited references still counting as inhabited.
2021-01-03Add note to non-exhaustive match on reference to emptyDaniel Noom-0/+24
Rust prints "type `&A` is non-empty" even is A is empty. This is the intended behavior, but can be confusing. This commit adds a note to non-exhaustive pattern errors if they are a reference to something uninhabited. I did not add tests to check that the note is not shown for non-references or inhabited references, because this is already done in other tests. Maybe the added test is superfluous, because `always-inhabited-union-ref` already checks for this case. This does not handle &&Void or &&&void etc. I could add those as special cases as well and ignore people who need quadruple references. Fixes #78123
2021-01-03Stylistic fixes to diagnostic messagesoli-1/+1
2021-01-03Refactor the non-transient cell borrow error diagnosticoli-22/+24
2021-01-03Update now-more-precise operation with a preciser messageoli-14/+14
2021-01-02Auto merge of #80592 - Skynoodle:snake-case-lint-reserved-identifier, ↵bors-0/+86
r=davidtwco Suggest renaming or escaping when fixing non-snake-case identifiers which would conflict with keywords Fixes #80575
2021-01-02Add snake case lint note about keyword identifiers which cannot be rawSkynoodle-0/+2
2021-01-02Rollup merge of #80613 - bugadani:issue-80607, r=matthewjasperMara Bos-0/+24
Diag: print enum variant instead of enum type Closes #80607
2021-01-02Print actual enum variantDániel Buga-3/+3
2021-01-02Add test for #80607 with undesired outputDániel Buga-0/+24
2021-01-02Auto merge of #79883 - frewsxcv:frewsxcv-san, r=shepmasterbors-1/+1
Enable ASan, TSan, UBSan for aarch64-apple-darwin. I confirmed ASan, TSan, UBSan all work for me locally with `clang` on my new Macbook Air. ~This requires https://github.com/rust-lang/llvm-project/pull/86~
2021-01-01Bless ui testsoli-2/+2
2021-01-01Add reserved identifier test cases for snake case lintSkynoodle-0/+84
2021-01-01Reinstate the error-code error over the feature gate erroroli-18/+8
2021-01-01Enhance some commentsoli-9/+14
2021-01-01Fix cell checks in const fnoli-0/+2
2021-01-01Allow references to interior mutable data behind a feature gateoli-38/+110
2021-01-01Auto merge of #80547 - lqd:const_generics_defaults, r=varkorbors-7/+45
In which we start to parse const generics defaults As discussed in this [zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/const.20generic.20defaults), this PR extracts the parsing parts from `@JulianKnodt's` PR #75384 for a better user-experience using the newly stabilized `min_const_generics` (albeit temporary) as shown in #80507: trying to use default values on const generics currently results in parse errors, as if the user didn't use the correct syntax (which is somewhat true but also misleading). This PR extracts (and slightly modifies in a couple places) `@JulianKnodt's` parsing code (with attribution if I've done everything correctly), AST and HIR changes, and feature gate setup. This feature is now marked as "incomplete" and thus will also print out the expected "const generics default values are unstable" error instead of a syntax error. Note that, as I've only extracted the parsing part, the actual feature will not work at all if enabled. There will be ICEs, and inference errors on the const generics default values themselves. Fixes #80507. Once this merges, I'll: - modify the const generics tracking issue to refer to the `const_generics_defaults` gate rather than the older temporary name it uses there. - create the GH `F-const_generics_defaults` label r? `@varkor`
2021-01-01make `const_generics_defaults` use the unstable syntax mechanismRémy Rakic-18/+27
This is important to not accidentally stabilize the parsing of the syntax while it still is experimental and not formally accepted
2021-01-01adjust const generics defaults FIXMEs to the new feature gateRémy Rakic-1/+1
2021-01-01update `min_const_generics` tests using default values for const paramsRémy Rakic-8/+12
The `const_generics_defaults` now handles them, and they correctly parse, so we can update these tests expecting a parser error .
2021-01-01add test for the `const_generics_defaults` feature gateRémy Rakic-0/+25
2021-01-01Auto merge of #80539 - JohnTitor:ui-test-root-cleanup, r=petrochenkovbors-27/+19
Reduce the entry on `src/test/ui` (UI test root) CC #73494, similar to #79776. r? `@petrochenkov`
2020-12-31Merge remote-tracking branch 'origin/master' into frewsxcv-sanCorey Farwell-1571/+5238
2021-01-01Auto merge of #79576 - m-ou-se:2021, r=Mark-Simulacrumbors-42/+49
Add edition 2021. :fireworks: Happy new ~~year~~ Rust. :champagne: This adds --edition=2021, and updates suggestions about 2018 to say "2018 *or later*". Related Cargo PR: https://github.com/rust-lang/cargo/pull/8922 --- Edit: This adds the new edition as *unstable*. Without `-Z unstable-options`, `--edition=2021` results in: ``` $ rustc --edition=2021 error: edition 2021 is unstable and only available with -Z unstable-options. ```
2021-01-01Move feature gate-related testsYuki Okushi-0/+0
2021-01-01Move rmeta-related testsYuki Okushi-0/+0
2021-01-01Move builtin-superkinds-related testsYuki Okushi-8/+0
2021-01-01Move block-related testsYuki Okushi-2/+2
2020-12-31Rollup merge of #80551 - lcnr:const-arg-wildcard, r=varkorDylan DPC-0/+76
support pattern as const parents in type_of nice to know that there's still stuff about rust i didn't know about :laughing: fixes #80531 r? `@varkor`
2020-12-31Rollup merge of #80548 - JohnTitor:wfcheck-foreign-fn-ice, r=davidtwcoDylan DPC-0/+41
FIx ICE on wf check for foreign fns Fixes #80468 r? `@davidtwco` `@lcnr`
2020-12-31Rollup merge of #80519 - max-heller:issue-80512-fix, r=varkorDylan DPC-10/+22
Take type defaults into account in suggestions to reorder generic parameters Fixes #80512
2020-12-31Require `-Z unstable-options` for unstable editions.Mara Bos-0/+1
2020-12-31Consistently call editions "Rust 20xx" in messages.Mara Bos-27/+27
2020-12-31Add edition 2021.Mara Bos-19/+25
2020-12-31Auto merge of #80459 - mark-i-m:or-pat-reg, r=petrochenkovbors-0/+43
Implement edition-based macro :pat feature This PR does two things: 1. Fixes the perf regression from https://github.com/rust-lang/rust/pull/80100#issuecomment-750893149 2. Implements `:pat2018` and `:pat2021` matchers, as described by `@joshtriplett` in https://github.com/rust-lang/rust/issues/54883#issuecomment-745509090 behind the feature gate `edition_macro_pat`. r? `@petrochenkov` cc `@Mark-Simulacrum`
2020-12-31support pattern as const parents in type_ofBastian Kauschke-0/+76