summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2020-08-20Don't immediately error for cycles during normalizationMatthew Jasper-47/+103
2020-08-20allow escaping bound vars when normalizing `ty::Opaque`Bastian Kauschke-0/+13
2020-08-20Add UI test for issue 74933Gary Guo-0/+38
2020-08-07typeck: check for infer before type impls traitDavid Wood-0/+21
This commit checks that the target type of the cast (an error related to which is being reported) does not have types to be inferred before checking if it implements the `From` trait. Signed-off-by: David Wood <david@davidtw.co>
2020-08-07improper_ctypes_definitions: allow `Box`David Wood-63/+46
This commit stops linting against `Box` in `extern "C" fn`s for the `improper_ctypes_definitions` lint - boxes are documented to be FFI-safe. Signed-off-by: David Wood <david@davidtw.co>
2020-08-07Don't panic if the lhs of a div by zero is not statically knownOliver Scherer-4/+21
2020-08-07lint: use `transparent_newtype_field` to avoid ICEDavid Wood-0/+14
This commit re-uses the `transparent_newtype_field` function instead of manually calling `is_zst` on normalized fields to determine which field in a transparent type is the non-zero-sized field, thus avoiding an ICE. Signed-off-by: David Wood <david@davidtw.co>
2020-08-07Use `ReEmpty(U0)` as the implicit region bound in typeckMatthew Jasper-0/+101
2020-08-07Fix #[track_caller] shims for trait objects.Adam Perry-0/+23
We were missing an Instance::resolve_for_fn_ptr in resolve_for_vtable. Closes #74764.
2020-08-07tweak error messageBastian Kauschke-6/+6
2020-08-07forbid `#[track_caller]` on mainBastian Kauschke-0/+35
2020-08-07Forbid non-derefable types explicitly in unsizing castsYuki Okushi-0/+22
2020-07-13Rollup merge of #74286 - PankajChaudhary5:E0688, r=GuillaumeGomezManish Goregaokar-0/+1
Added detailed error code explanation for issue E0688 in Rust compiler. Added proper error explanation for issue E0688 in the Rust compiler. Error Code E0688 Sub Part of Issue #61137 r? @GuillaumeGomez
2020-07-13Rollup merge of #74285 - wangtheo:issue-71669, r=lcnrManish Goregaokar-0/+55
#71669: add ui, codegen tests for volatile + nearby int intrinsics Added some tests for intrinsics. See https://github.com/rust-lang/rust/issues/71669.
2020-07-13Remove trailing whitespacewangtheo-0/+1
2020-07-13Merge branch 'master' into E0688Pankaj Chaudhary-9562/+40824
2020-07-13Added proper explanation of ErrorCode-E0688PankajChaudhary5-0/+1
2020-07-13Removed trailing whitespaceTeddy_Wang-1/+1
2020-07-13Added ui tests for volatile and nearby intrinsicsTeddy_Wang-0/+54
2020-07-11Rollup merge of #74240 - da-x:fix-74081, r=ManishearthManish Goregaokar-0/+28
Fix #74081 and add the test case from #74236
2020-07-11Rollup merge of #74197 - estebank:self-sugg, r=petrochenkovManish Goregaokar-3/+3
Reword incorrect `self` token suggestion
2020-07-11Rollup merge of #74168 - JohnTitor:help-for-in-band-lifetimes, r=petrochenkovManish Goregaokar-0/+67
Add a help to use `in_band_lifetimes` in nightly Fixes #73775
2020-07-11Rollup merge of #72920 - oli-obk:const_transmute, r=RalfJungManish Goregaokar-93/+212
Stabilize `transmute` in constants and statics but not const fn cc #53605 (leaving issue open so we can add `transmute` to `const fn` later) Previous attempt: #64011 r? @RalfJung cc @rust-lang/wg-const-eval
2020-07-11Add the test case mentioned in #74236Dan Aloni-0/+28
2020-07-11Stabilize `transmute` in constants and statics but not const fnOliver Scherer-93/+212
2020-07-10Rollup merge of #74127 - tamird:allowlist, r=oli-obkManish Goregaokar-5/+5
Avoid "whitelist" Other terms are more inclusive and precise.
2020-07-10Rollup merge of #74125 - ayazhafiz:i/74050, r=matthewjasperManish Goregaokar-0/+28
Correctly mark the ending span of a match arm Closes #74050 r? @matthewjasper
2020-07-10Rollup merge of #74109 - nbdd0121:issue-74082, r=petrochenkovManish Goregaokar-0/+28
Only allow `repr(i128/u128)` on enum Fixes #74082
2020-07-10Rollup merge of #74103 - ajpaverd:cfguard-msvc-only, r=nikomatsakisManish Goregaokar-0/+6
Only add CFGuard on `windows-msvc` targets As @ollie27 pointed out in #73893, the `cfguard` module flag causes incorrect behavior on `windows-gnu` targets. This patch restricts rustc to only add this flag for `windows-msvc` targets (this may need to be changed if other linkers gain support for CFGuard).
2020-07-10Rollup merge of #73989 - RalfJung:ub-enum-test, r=oli-obkManish Goregaokar-8/+9
adjust ub-enum test to be endianess-independent @cuviper noted that our test fails on "other" endianess systems (I never know which is which^^), so let's fix that.
2020-07-10Rollup merge of #73887 - DutchGhost:master, r=oli-obkManish Goregaokar-2/+0
stabilize const mem::forget Stabilizes const `mem::forget` as implemented in https://github.com/rust-lang/rust/pull/69617 and tracked in https://github.com/rust-lang/rust/issues/69616. Closes https://github.com/rust-lang/rust/issues/69616
2020-07-10Rollup merge of #73862 - oli-obk:const_array_to_slice, r=RalfJungManish Goregaokar-29/+22
Stabilize casts and coercions to `&[T]` in const fn Part of #64992 There was never a reason to not stabilize this, we just accidentally prevented them when we implemented the `min_const_fn` feature that gave us `const fn` on stable. This PR stabilizes these casts (which are already stable in `const` outside `const fn`), while keeping all other unsizing casts (so `T` -> `dyn Trait`) unstable within const fn. These casts have no forward compatibility concerns with any future features for const eval and users were able to use them under the `const_fn` feature gate already since at least the miri merger, possibly longer. r? @rust-lang/lang
2020-07-10Rollup merge of #71322 - petrochenkov:tuple00, r=nikomatsakisManish Goregaokar-21/+533
Accept tuple.0.0 as tuple indexing (take 2) If we expect something identifier-like when parsing a field name after `.`, but encounter a float token, we break that float token into parts, similarly to how we break `&&` into `&` `&`, or `<<` into `<` `<`, etc. An alternative to https://github.com/rust-lang/rust/pull/70420.
2020-07-10Avoid "whitelist"Tamir Duberstein-5/+5
Other terms are more inclusive and precise.
2020-07-10Only add cfguard module flag on windows-msvcAndrew Paverd-0/+6
2020-07-10Tweak wordingYuki Okushi-42/+42
2020-07-10Add a help to use `in_band_lifetimes` in nightlyYuki Okushi-0/+67
2020-07-09Reword incorrect `self` token suggestionEsteban Küber-3/+3
2020-07-09Rollup merge of #74188 - estebank:tweak-ascription-typo-heuristic, ↵Manish Goregaokar-18/+11
r=petrochenkov Tweak `::` -> `:` typo heuristic and reduce verbosity Do not trigger on correct type ascription expressions with trailing operators and _do_ trigger on likely path typos where a turbofish is used. On likely path typos, remove note explaining type ascription. Clean up indentation. r? @petrochenkov
2020-07-09Tweak `::` -> `:` typo heuristic and reduce verbosityEsteban Küber-18/+11
Do not trigger on correct type ascription expressions with trailing operators and _do_ trigger on likely path typos where a turbofish is used. On likely path typos, remove note explaining type ascription.
2020-07-08Avoid "blacklist"Tamir Duberstein-1/+1
Other terms are more inclusive and precise. Clippy still has a lint named "blacklisted-name", but renaming it would be a breaking change, so is left for future work. The target configuration option "abi-blacklist" has been depreciated and renamed to "unsupported-abis". The old name continues to work.
2020-07-08Correctly mark the ending span of a match armAyaz Hafiz-0/+28
Closes #74050 r? @matthewjasper
2020-07-07Auto merge of #74059 - RalfJung:miri-uninit-validation, r=oli-obkbors-5/+16
Miri value validation: fix handling of uninit memory Fixes https://github.com/rust-lang/miri/issues/1456 Fixes https://github.com/rust-lang/miri/issues/1467 r? @oli-obk
2020-07-06Rollup merge of #74102 - oli-obk:const_prop_icde, r=wesleywiserManish Goregaokar-0/+9
Fix const prop ICE we used to erase the local just before we tried to read it for diagnostics fixes #73993 r? @wesleywiser
2020-07-06Rollup merge of #73969 - ↵Manish Goregaokar-0/+30
davidtwco:issue-73914-checkedadd-temp-generator-interior, r=matthewjasper mir: mark mir construction temporaries as internal Fixes #73914. This PR marks temporaries from MIR construction as internal such that they are skipped in `sanitize_witness` (where each MIR local is checked to have been contained within the generator interior computed during typeck). This resolves an ICE whereby the construction of checked addition introduced a `(u64, bool)` temporary which was not in the HIR and thus not in the generator interior. r? @matthewjasper
2020-07-06Rollup merge of #73953 - JohnTitor:audit-hidden-sugg, r=estebankManish Goregaokar-310/+1793
Audit hidden/short code suggestions Should fix #73641. Audit uses of `span_suggestion_short` and `tool_only_span_suggestion` (`span_suggestion_hidden` is already tested with `run-rustfix`). Leave some FIXMEs for futher improvements/fixes. r? @estebank
2020-07-06Add UI test for issue 74082Gary Guo-0/+28
2020-07-05Rollup merge of #74000 - lcnr:lazy_normalisation_consts, r=varkorManish Goregaokar-0/+97
add `lazy_normalization_consts` feature gate In #71973 I underestimated the amount of code which is influenced by lazy normalization of consts and decided against having a separate feature flag for this. Looking a bit more into this, the following issues are already working with lazy norm in its current state #47814 #57739 #73980 I therefore think it is worth it to enable lazy norm separately. Note that `#![feature(const_generics)]` still automatically activates this feature, so using `#![feature(const_generics, lazy_normalization_consts)]` is redundant. r? @varkor @nikomatsakis
2020-07-05Rollup merge of #73973 - Nadrieril:fix-71977, r=matthewjasperManish Goregaokar-12/+51
Use `Span`s to identify unreachable subpatterns in or-patterns Fixes #71977
2020-07-05Rollup merge of #73937 - JohnTitor:note-exhaustive-sized-int, r=varkorManish Goregaokar-0/+61
Explain exhaustive matching on {usize,isize} maximum values The wording is taken from https://github.com/rust-lang/rfcs/blob/master/text/2591-exhaustive-integer-pattern-matching.md#reference-level-explanation. Fixes #73919 r? @varkor