summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2019-06-28arbitrary_self_types lifetime elision: --bless --compare-mode=nll.Mazdak Farrokhzad-0/+42
2019-06-28Remove query for `.pin_type()`Taiki Endo-2/+15
2019-06-28Allow lifetime elision in `Pin<&(mut) Self>`Taiki Endo-0/+137
2019-06-26rustc_typeck: correctly compute `Substs` for `Res::SelfCtor`.Eduard-Mihai Burtescu-0/+75
2019-06-26bless ui testsPietro Albini-8/+1
2019-06-26Fix ICE involving mut referencesEsteban Küber-0/+33
2019-06-26Hygienize macros in the standard libraryVadim Petrochenkov-27/+6
2019-06-26Handle index out of bound errors during const eval without panicEsteban Küber-0/+30
2019-06-26Regression test for issue #60654.Felix S. Klock II-0/+26
2019-06-06Add test for denying overflowing literal in loopvarkor-1/+10
2019-06-06Update unreachable loop patterns testvarkor-1/+8
2019-06-06Turn ICE on type arguments on variables into an errorOliver Scherer-0/+33
2019-06-06Add regression testEsteban Küber-0/+15
2019-05-28add ui testsMark Mansi-0/+47
2019-05-21Auto merge of #60950 - taiki-e:arbitrary_self_types-tests, r=Centrilbors-0/+990
Move arbitrary self types's tests into ui/self https://github.com/rust-lang/rust/pull/60944#discussion_r285362006 r? @Centril
2019-05-20Rollup merge of #60823 - oli-obk:used_unused_no_mangle, r=michaelwoeristerMazdak Farrokhzad-7/+1
Fix incremental compilation of cdylib emitting spurious unused_attributes lint fixes #60050
2019-05-20Rollup merge of #60590 - petertodd:2018-test-union-nonzero, ↵Mazdak Farrokhzad-0/+43
r=nikomatsakis,Centril Test interaction of unions with non-zero/niche-filling optimization Notably this nails down part of the behavior that MaybeUninit assumes, e.g. that a Option<MaybeUninit<&u8>> does not take advantage of non-zero optimization, and thus is a safe construct. It also verifies the status quo: that even unions that could theoretically take advantage of niches don't. (relevant: https://github.com/rust-lang/rust/issues/36394)
2019-05-19Move run-pass/self/* to ui/selfTaiki Endo-0/+696
2019-05-19Move arbitrary_self_types's tests into ui/selfTaiki Endo-0/+294
2019-05-19Rollup merge of #60924 - estebank:try-msg, r=petrochenkovMazdak Farrokhzad-0/+3
Explain that ? converts the error type using From Fix #60917.
2019-05-19Rollup merge of #60370 - Richard-W:const-layout-construction, r=sfacklerMazdak Farrokhzad-0/+21
Mark core::alloc::Layout::from_size_align_unchecked const Makes it possible (pending stabilization of #57563 (`const_fn`)) to rewrite code like ```rust const BUFFER_SIZE: usize = 0x2000; const BUFFER_ALIGN: usize = 0x1000; fn foo() { let layout = std::alloc::Layout::from_size_align(BUFFER_SIZE, BUFFER_ALIGN) .unwrap(); let buffer = std::alloc::alloc(layout); } ``` to ```rust const BUFFER_LAYOUT: std::alloc::Layout = unsafe { std::alloc::Layout::from_size_align_unchecked(0x2000, 0x1000) }; fn foo() { let buffer = std::alloc::alloc(BUFFER_LAYOUT); } ``` which (although `unsafe` is used) looks somewhat cleaner and is easier to read.
2019-05-18Auto merge of #60252 - davidtwco:issue-57672, r=Mark-Simulacrumbors-51/+47
Don't suggest changing extern crate w/ alias to use. Fixes #57672.
2019-05-18Auto merge of #60386 - Goirad:sgx-ignore-tests, r=nikomatsakisbors-18/+23
Added ignore-sgx for appropriate tests in src/test These are all the tests that make sense to ignore when targeting fortanix-unknonw-sgx, at least in test/runpass. Other suites not yet covered.
2019-05-17Auto merge of #49799 - hdhoang:46205_deny_incoherent_fundamental_impls, ↵bors-5/+2
r=nikomatsakis lint: convert incoherent_fundamental_impls into hard error *Summary for affected authors:* If your crate depends on one of the following crates, please upgrade to a newer version: - gtk-rs: upgrade to at least 0.4 - rusqlite: upgrade to at least 0.14 - nalgebra: upgrade to at least 0.15, or the last patch version of 0.14 - spade: upgrade or refresh the Cargo.lock file to use version 1.7 - imageproc: upgrade to at least 0.16 (newer versions no longer use nalgebra) implement #46205 r? @nikomatsakis
2019-05-17Explain that ? converts the error type using FromEsteban Küber-0/+3
2019-05-17Rollup merge of #60901 - estebank:str-str-str, r=CentrilManish Goregaokar-11/+170
Handle more string addition cases with appropriate suggestions
2019-05-17Account for &String + StringEsteban Küber-2/+2
2019-05-17Auto merge of #60171 - matthewjasper:full-nll-compare-mode, r=pnkfelixbors-930/+5199
Use -Zborrowck=mir for NLL compare mode closes #56993 r? @pnkfelix
2019-05-17Auto merge of #60892 - davidtwco:issue-60622, r=oli-obkbors-0/+45
Checking generic args after late bound region err. Fixes #60622. This PR fixes an ICE that occurs when a late bound region error is emitted and that resulted in the rest of the generic arguments of a function not being checked. For example, you could specify a generic type parameter `T` in a function call `foo<'_, T>()` to a function that doesn't have a generic type parameter. Since an error wasn't emitted from the function, compilation continued to parts of typeck that didn't expect a generic type argument in a call for a function that didn't have any generic type arguments.
2019-05-17Checking generic args after late bound region err.David Wood-0/+45
This commit fixes an ICE that occurs when a late bound region error is emitted and that resulted in the rest of the generic arguments of a function not being checked. For example, you could specify a generic type parameter `T` in a function call `foo<'_, T>()` to a function that doesn't have a generic type parameter. Since an error wasn't emitted from the function, compilation continued to parts of typeck that didn't expect a generic type argument in a call for a function that didn't have any generic type arguments.
2019-05-16review commentsEsteban Küber-13/+13
2019-05-16Fix binop spanEsteban Küber-12/+9
2019-05-16Handle more string addition cases with appropriate suggestionsEsteban Küber-4/+166
2019-05-16Fix span for await macro callEsteban Küber-1/+1
2019-05-16fixed issues relating to line numbers being shiftedDario Gonzalez-17/+17
2019-05-16Added ignore-sgx for appropriate testsDario Gonzalez-1/+6
2019-05-16Review commentsEsteban Küber-13/+13
- Change wording of suggestion - Move recovery logic to `diagnostics.rs` - Reduce ammount of code duplication
2019-05-16readd match await test caseEsteban Küber-2/+31
2019-05-16Point at enclosing fn/closure when it's not asyncEsteban Küber-32/+53
2019-05-16tidy fixEsteban Küber-1/+1
2019-05-16Simplify span usage for incorrect awaitEsteban Küber-42/+20
2019-05-16Parse alternative incorrect uses of await and recoverEsteban Küber-27/+306
2019-05-16Rollup merge of #60691 - topecongiro:await-macro-span, r=CentrilMazdak Farrokhzad-1/+1
Include expression to wait for to the span of Await Currently the span of `await!` only includes itself: ```rust await!(3); // ^^^^^ ``` This PR changes it so that the span holds the whole `await!` expression: ```rust await!(3); // ^^^^^^^^^
2019-05-14Rollup merge of #60799 - ↵Mazdak Farrokhzad-0/+30
matthewjasper:allow-bound-regions-in-existential-types, r=oli-obk Allow late-bound regions in existential types closes #60655 r? @oli-obk
2019-05-14Rollup merge of #60444 - nikomatsakis:issue-60010-cycle-error-investigation, ↵Mazdak Farrokhzad-0/+91
r=pnkfelix forego caching for all participants in cycles, apart from root node This is a targeted fix for #60010, which uncovered a pretty bad failure of our caching strategy in the face of coinductive cycles. The problem is explained in the comment in the PR on the new field, `in_cycle`, but I'll reproduce it here: > Starts out as false -- if, during evaluation, we encounter a > cycle, then we will set this flag to true for all participants > in the cycle (apart from the "head" node). These participants > will then forego caching their results. This is not the most > efficient solution, but it addresses #60010. The problem we > are trying to prevent: > > - If you have `A: AutoTrait` requires `B: AutoTrait` and `C: NonAutoTrait` > - `B: AutoTrait` requires `A: AutoTrait` (coinductive cycle, ok) > - `C: NonAutoTrait` requires `A: AutoTrait` (non-coinductive cycle, not ok) > > you don't want to cache that `B: AutoTrait` or `A: AutoTrait` > is `EvaluatedToOk`; this is because they were only considered > ok on the premise that if `A: AutoTrait` held, but we indeed > encountered a problem (later on) with `A: AutoTrait. So we > currently set a flag on the stack node for `B: AutoTrait` (as > well as the second instance of `A: AutoTrait`) to supress > caching. > > This is a simple, targeted fix. The correct fix requires > deeper changes, but would permit more caching: we could > basically defer caching until we have fully evaluated the > tree, and then cache the entire tree at once. I'm not sure what the impact of this fix will be in terms of existing crates or performance: we were accepting incorrect code before, so there will perhaps be some regressions, and we are now caching less. As the comment above notes, we could do a lot better than this fix, but that would involve more invasive rewrites. I thought it best to start with something simple. r? @pnkfelix -- but let's do crater/perf run cc @arielb1
2019-05-14Update ui testsOliver Scherer-7/+1
2019-05-14Add ui test for const Layout::from_size_align_uncheckedRichard Wiedenhöft-0/+21
2019-05-13Allow late bound regions in existential typesMatthew Jasper-0/+30
2019-05-13Rollup merge of #60770 - Pulkit07:issue60764, r=CentrilMazdak Farrokhzad-7/+21
add impl_trait_in_bindings to INCOMPLETE_FEATURES impl_trait_in_bindings is not yet complete and can lead to compiler crashes. Fixes #60764.
2019-05-13Rollup merge of #60710 - varkor:delay_span_bug-const-parent, r=matthewjasperMazdak Farrokhzad-0/+60
Use `delay_span_bug` for error cases when checking `AnonConst` parent Fixes #60704. Fixes #60650.