summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2020-05-22Fix hang in lexical_region_resolveMatthew Jasper-0/+7
(cherry picked from commit e7b02046a0b34ec6d114a7ba5549db8457684ec4)
2020-05-22Fix E0284 to not use incorrect wordingEsteban Küber-12/+100
Fix #71584, fix #69683. (cherry picked from commit a7b03ad4eddb65abede497dbc408244f23c36256)
2020-05-09fix error code for E0751YI-28/+28
2020-05-09normalize field projection ty to fix broken MIR issueSantiago Pastorino-0/+1
2020-05-09Do not try to find binop method on RHS `TyErr`Esteban Küber-0/+27
Fix #71798.
2020-05-09resolve: Relax fresh binding disambiguation slightly to fix regressionVadim Petrochenkov-0/+1
2020-04-22adjust testsRalf Jung-133/+113
2020-04-21Auto merge of #71170 - spastorino:dyn-fnonce-alignment, r=nikomatsakisbors-12/+36
Make Box<dyn FnOnce> respect self alignment Closes #68304 r? @eddyb @nikomatsakis
2020-04-21Rollup merge of #71174 - Nokel81:fix-async-main-error, r=petrochenkovDylan DPC-0/+43
Check that main/start is not async * Add new error code E0752 * Add span to hir::IsAsync::Yes * Emit an error if main or the start function is marked as async * Add two regression tests This PR fixes #68523.
2020-04-20Rollup merge of #71284 - JOE1994:serialize_id, r=petrochenkovDylan DPC-2/+14
fix -Zast-json to output correct JSON form fixes #71086 (Reverts some of the changes made in #70215) JSON output (from an empty library) after fix has something for **"id"** field ```shell lonelyjoe@lonelyjoe-desktop:~/workspace/empty_lib/src$ rustc lib.rs -Zast-json ``` ```json { "module":{ "inner":{ "lo":0, "hi":94 }, "items":[ { "attrs":[ { "kind":{ "variant":"Normal", "fields":[ { "path":{ "span":{ "lo":0, "hi":0 }, "segments":[ { "ident":{ "name":"prelude_import", "span":{ "lo":0, "hi":0 } }, "id":3, "args":null } ] }, "args":"Empty" } ] }, "id":null, "style":"Outer", "span":{ "lo":0, "hi":0 } } ], "id":4, "span":{ "lo":0, "hi":0 }, "vis":{ "node":"Inherited", "span":{ "lo":0, "hi":0 } }, "ident":{ "name":"", "span":{ "lo":0, "hi":0 } }, "kind":{ "variant":"Use", "fields":[ { "prefix":{ "span":{ "lo":0, "hi":0 }, "segments":[ { "ident":{ "name":"{{root}}", "span":{ "lo":0, "hi":0 } }, "id":5, "args":null }, { "ident":{ "name":"std", "span":{ "lo":0, "hi":0 } }, "id":6, "args":null }, { "ident":{ "name":"prelude", "span":{ "lo":0, "hi":0 } }, "id":7, "args":null }, { "ident":{ "name":"v1", "span":{ "lo":0, "hi":0 } }, "id":8, "args":null } ] }, "kind":"Glob", "span":{ "lo":0, "hi":0 } } ] }, "tokens":null }, { "attrs":[ { "kind":{ "variant":"Normal", "fields":[ { "path":{ "span":{ "lo":0, "hi":0 }, "segments":[ { "ident":{ "name":"macro_use", "span":{ "lo":0, "hi":0 } }, "id":9, "args":null } ] }, "args":"Empty" } ] }, "id":null, "style":"Outer", "span":{ "lo":0, "hi":0 } } ], "id":10, "span":{ "lo":0, "hi":0 }, "vis":{ "node":"Inherited", "span":{ "lo":0, "hi":0 } }, "ident":{ "name":"std", "span":{ "lo":0, "hi":0 } }, "kind":{ "variant":"ExternCrate", "fields":[ null ] }, "tokens":null } ], "inline":true }, "attrs":[ ], "span":{ "lo":0, "hi":94 }, "proc_macros":[ ] } ```
2020-04-20Check that main/start is not asyncSebastian Malton-0/+43
* Add new error code E0752 * Add span to hir::IsAsync::Yes * Emit an error if main or the start function is marked as async * Add two regression tests Fix formatting errors and bless test outputs * move tests to ui/async-await fix test error text remove span from IsAsync
2020-04-19check '-Zast-json' & '-Zast-json-noexpand' to output legal JSONJOE1994-2/+14
2020-04-20Auto merge of #71007 - Amanieu:deprecate_asm, r=Mark-Simulacrumbors-4/+22
Deprecate the asm! macro in favor of llvm_asm! Since we will be changing the syntax of `asm!` soon, deprecate it and encourage people to use `llvm_asm!` instead (which preserves the old syntax). This will avoid breakage when `asm!` is changed. RFC: https://github.com/rust-lang/rfcs/pull/2843
2020-04-19Rollup merge of #71324 - petrochenkov:passcheck2, r=RalfJungDylan DPC-3/+3
Fix some tests failing in `--pass check` mode r? @RalfJung
2020-04-19Rollup merge of #71317 - RalfJung:unleash-inline-asm, r=ecstatic-morseDylan DPC-0/+25
miri-unleash test for llvm_asm r? @oli-obk @ecstatic-morse
2020-04-19Rollup merge of #71310 - JohnTitor:dont-did, r=estebankDylan DPC-2/+24
Do not show DefId in diagnostics Fixes #71222 r? @estebank cc @eddyb
2020-04-19Rollup merge of #71026 - seiyab:issue-64362-adhoc, r=varkorDylan DPC-1/+21
Fix false "never constructed" warnings for `Self::` variant paths Closes #64362 .
2020-04-19Fix commentRalf Jung-3/+2
2020-04-19Fix some tests failing in `--pass check` modeVadim Petrochenkov-3/+3
2020-04-19Rollup merge of #71188 - Duddino:fix, r=matthewjasperDylan DPC-2/+10
Fixed missing trait method suggests incorrect code (self parameter not named "self"). fixes #71150
2020-04-19test for false "never constructed" warnings for `Self::` variant pathsjakubadamw-1/+21
2020-04-19miri-unleash test for llvm_asmRalf Jung-0/+26
2020-04-19Auto merge of #70015 - jonas-schievink:gen-needs-drop, r=matthewjasperbors-13/+9
Make `needs_drop` less pessimistic on generators Generators only have non-trivial drop logic when they may store (in upvars or across yields) a type that does. This prevents generation of some unnecessary MIR in simple generators. There might be some impact on compile times, but this is probably limited in real-world applications. ~~This builds off of https://github.com/rust-lang/rust/pull/69814 since that contains some fixes that are made relevant by *this* PR (see https://github.com/rust-lang/rust/pull/69814#issuecomment-599147269).~~ (this has been merged)
2020-04-19Auto merge of #69793 - estebank:predicate-obligations-4, r=nikomatsakisbors-118/+212
Maintain chain of derived obligations When evaluating the derived obligations from super traits, maintain a reference to the original obligation in order to give more actionable context in the output. Continuation (and built on) #69745, subset of #69709. r? @eddyb
2020-04-19Do not show DefId in diagnosticsYuki Okushi-2/+24
2020-04-18Add label to item source of bound obligationEsteban Küber-59/+59
2020-04-18Do not emit note for projected derived obligationsEsteban Küber-44/+0
2020-04-18Remove `AssocTypeBound` and propagate bound `Span`sEsteban Küber-88/+55
2020-04-18Maintain chain of derived obligationsEsteban Küber-0/+171
When evaluating the derived obligations from super traits, maintain a reference to the original obligation in order to give more actionable context in the output.
2020-04-19Rollup merge of #71276 - RalfJung:miri-unleash-box, r=ecstatic-morseDylan DPC-0/+29
miri-unleashed: test that we detect heap allocations This removes the second-to-last use of `IS_SUPPORTED_IN_MIRI = false`. r? @ecstatic-morse @oli-obk
2020-04-18Make Box<dyn FnOnce> respect self alignmentSantiago Pastorino-12/+36
2020-04-18Auto merge of #71218 - eddyb:a-lifetime-stranded-in-fn-def, r=nikomatsakisbors-0/+13
outlives: ignore lifetimes shallowly found in `ty::FnDef`s. Fixes #70917 by restoring the pre-#70164 behavior for now. r? @nikomatsakis
2020-04-18miri-unleashed: test that we detect heap allocationsRalf Jung-0/+29
2020-04-18Auto merge of #71147 - cuviper:min-llvm8, r=Mark-Simulacrumbors-1/+0
Update the minimum external LLVM to 8 LLVM 8 was released on March 20, 2019, over a year ago.
2020-04-17Rollup merge of #71243 - Duddino:Fix2, r=estebankDylan DPC-0/+39
Account for use of `try!()` in 2018 edition and guide users in the right direction fixes #71155
2020-04-17Rollup merge of #71239 - JohnTitor:llvm-asm, r=AmanieuDylan DPC-19/+19
Rename `asm` test directory in favor of `llvm_asm` r? @Amanieu
2020-04-17Rollup merge of #69642 - ecstatic-morse:issue-69615, r=oli-obkDylan DPC-0/+28
Use query to determine whether function needs const checking Resolves #69615. The HIR const-checker was checking the `constness` of a function's `fn_sig` to determine whether a function needed const-checking. Now that const trait impls are a thing, this is no longer enough. All code should use the `is_const_fn_raw` query instead, which takes the constness of the impl block into account. r? @oli-obk
2020-04-17Make `needs_drop` less pessimistic on generatorsJonas Schievink-13/+9
2020-04-17Account for use of `try!()` in 2018 edition and guide users in the right ↵Duddino-0/+39
direction
2020-04-17Auto merge of #71049 - eddyb:const-err, r=oli-obkbors-293/+47
Add `ConstKind::Error` and convert `ErrorHandled::Reported` to it. By replicating the `ty::Error` approach to encoding "an error has occurred", all of the mechanisms that skip redundant/downstream errors are engaged and help out (see the reduction in test output). This PR also adds `ErrorHandled::Linted` for the lint case because using `ErrorHandled::Reported` *without* having emitted an error that is *guaranteed* to stop compilation, is incorrect now. r? @oli-obk cc @rust-lang/wg-const-eval @varkor @yodaldevoid
2020-04-17Rename `asm` test directory in favor of `llvm_asm`Yuki Okushi-19/+19
2020-04-17Auto merge of #70629 - anyska:fields-variant, r=oli-obkbors-3/+1
rustc_target::abi: add Primitive variant to FieldsShape. Originally suggested by @eddyb.
2020-04-17Rollup merge of #71206 - RalfJung:dont-try, r=oli-obkDylan DPC-1/+1
Miri error messages: avoid try terminology r? @oli-obk
2020-04-17Rollup merge of #71182 - JohnTitor:regression-tests, r=Mark-SimulacrumDylan DPC-0/+64
Add some regression tests Closes #24843 Closes #28575 Closes #54067 Closes #66868 Closes #67893 Closes #68813
2020-04-17Rollup merge of #71164 - RalfJung:uninit-not-undef, r=oli-obkDylan DPC-5/+115
reword Miri validity errors: undefined -> uninitialized I don't think we say "undefined value" or anything like that anywhere in the docs or so, but we do use the term "uninitialized memory", so I think we should do the same here. Longer-term, I think we should also internally rename "undef" to "uninit". r? @oli-obk
2020-04-17Rollup merge of #70578 - PankajChaudhary5:master, r=GuillaumeGomezDylan DPC-0/+1
Add long error explanation for E0657 Added proper error explanation for issue E0657 in the Rust compiler. Part of #61137 r? @GuillaumeGomez
2020-04-16Rollup merge of #70611 - pawanbisht62:doc/61137-add-long-error-code-e0708, ↵Dylan DPC-0/+1
r=GuillaumeGomez Add long error explanation for E0708 #61137 Add long explanation for the E0708 error code Part of #61137 r? @GuillaumeGomez
2020-04-17Avoid emitting stderr for nowYuki Okushi-24/+2
2020-04-17Add test for issue-67893Yuki Okushi-0/+45
2020-04-17Add test for issue-54067Yuki Okushi-0/+12