summary refs log tree commit diff
path: root/src/test
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/+146
#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-13Rollup merge of #74147 - dennis-hamester:fix/issue-74134, r=jyn514Manish Goregaokar-0/+51
rustdoc: Allow linking from private items to private types Fixes #74134 After PR #72771 this would trigger an intra_doc_link_resolution_failure warning when rustdoc is invoked without --document-private-items. Links from private items to private types are however never actually generated in that case and thus shouldn't produce a warning. These links are in fact a very useful tool to document crate internals. Tests are added for all 4 combinations of public/private items and link targets. Test 1 is the case mentioned above and fails without this commit. Tests 2 - 4 passed before already but are added nonetheless to prevent regressions.
2020-07-13Rollup merge of #73852 - euclio:rustdoc-attr-newlines, r=GuillaumeGomezManish Goregaokar-2/+2
rustdoc: insert newlines between attributes Fixes #73205.
2020-07-13Remove trailing whitespacewangtheo-0/+1
2020-07-13Merge branch 'master' into E0688Pankaj Chaudhary-13969/+53339
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/+72
2020-07-12Added tests for volatile and nearbyint intrinsicsTeddy_Wang-0/+73
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 #73715 - MaulingMonkey:pr-natvis-tuples, r=AmanieuManish Goregaokar-0/+109
debuginfo: Mangle tuples to be natvis friendly, typedef basic types These changes are meant to unblock rust-lang/rust#70052 "Update hashbrown to 0.8.0" by allowing the use of `tuple<u64, u64>` as a .natvis expression in MSVC style debuggers (MSVC, WinDbg, CDB, etc.) * f8eb81b does the actual mangling of `(u64, u64)` -> `tuple<u64, 64>` * 24a728a allows `u64` to resolve (fixing `$T1` / `$T2` when used to visualize `HashMap<u64, u64, ...>`)
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-11rustdoc: insert newlines between attributesAndy Russell-2/+2
2020-07-11Add the test case mentioned in #74236Dan Aloni-0/+28
2020-07-11test: rustdoc-ui: issue-74134: Shorten a too long lineDennis Hamester-1/+1
2020-07-11test: rustdoc-ui: Expand issue-74134 to cover types in a private moduleDennis Hamester-0/+15
2020-07-11test: rustdoc-ui: Add issue-74134, replacing test/rustdoc/issue-74134-*Dennis Hamester-43/+36
As per the discussion in PR #74147, the 4 individual tests are replaced by a single one. The test is expanded to cover all 4 public/private cases, each with and without --document-private-items.
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-18/+18
Avoid "whitelist" Other terms are more inclusive and precise.
2020-07-10Rollup merge of #74125 - ayazhafiz:i/74050, r=matthewjasperManish Goregaokar-86/+114
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/+20
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-18/+18
Other terms are more inclusive and precise.
2020-07-10Only add cfguard module flag on windows-msvcAndrew Paverd-0/+20
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-09Rollup merge of #74150 - tamird:blocklist, r=nikomatsakisManish Goregaokar-1/+1
Avoid "blacklist" 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-09Rollup merge of #74107 - nbdd0121:rustdoc, r=GuillaumeGomezManish Goregaokar-0/+21
Hide `&mut self` methods from Deref in sidebar if there are no `DerefMut` impl for the type. This partially addresses #74083.
2020-07-09Rollup merge of #74079 - nnethercote:session-globals, r=nikomatsakisManish Goregaokar-2/+2
Eliminate confusing "globals" terminology. There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs` r? @Aaron1011