summary refs log tree commit diff
path: root/src/librustc_trait_selection
AgeCommit message (Collapse)AuthorLines
2020-05-22Fix E0284 to not use incorrect wordingEsteban Küber-3/+17
Fix #71584, fix #69683. (cherry picked from commit a7b03ad4eddb65abede497dbc408244f23c36256)
2020-05-10Remove some allocations in predicate evaluationEsteban Küber-5/+7
2020-05-10Use more `Iterator`s instead of `Vec`sEsteban Küber-51/+35
2020-05-10Remove unnecessary allocationEsteban Küber-26/+25
2020-05-10Remove some `Vec` allocations in an effort to improve perfEsteban Küber-33/+25
2020-05-09fix error code for E0751YI-1/+1
2020-04-21Rollup merge of #71174 - Nokel81:fix-async-main-error, r=petrochenkovDylan DPC-12/+7
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-20Check that main/start is not asyncSebastian Malton-12/+7
* 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-19Dogfood more or_patterns in the compilerJosh Stone-35/+30
2020-04-19Auto merge of #69793 - estebank:predicate-obligations-4, r=nikomatsakisbors-183/+67
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-18Add label to item source of bound obligationEsteban Küber-2/+2
2020-04-18Do not emit note for projected derived obligationsEsteban Küber-3/+15
2020-04-18Remove `AssocTypeBound` and propagate bound `Span`sEsteban Küber-188/+50
2020-04-18Maintain chain of derived obligationsEsteban Küber-0/+10
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-18remove build warningsTshepang Lekhonkhobe-2/+2
Code blocks that are not annotated are assumed to be Rust
2020-04-17Auto merge of #71049 - eddyb:const-err, r=oli-obkbors-4/+13
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-16mir/interpret: only use `ErrorHandled::Reported` for `ErrorReported`.Eduard-Mihai Burtescu-3/+12
2020-04-16ty: add `ty::ConstKind::Error` to replace `tcx.consts.err`.Eduard-Mihai Burtescu-1/+1
2020-04-16Rollup merge of #71179 - matthiaskrgr:cl6ppy, r=Dylan-DPCDylan DPC-13/+13
fix more clippy warnings
2020-04-16Rollup merge of #71141 - Duddino:master, r=estebankDylan DPC-1/+22
Provide better compiler output when using `?` on `Option` in fn returning `Result` and vice-versa Fixes #71089
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-11/+11
2020-04-15Fix clippy warningsMatthias Krüger-2/+2
clippy::{filter_next,single_char_pattern,unit_arg,identity_conversion,nonminimal_bool}
2020-04-15Provide better compiler output when using `?` on `Option` in fn returning ↵Duddino-2/+2
`Result` and vice-versa
2020-04-14Provide better compiler output when using `?` on `Option` in fn returning ↵Duddino-1/+22
`Result` and vice-versa
2020-04-14traits/query/normalize: add some `debug!` logging for the result.Eduard-Mihai Burtescu-2/+13
2020-04-14Auto merge of #70679 - tmandry:issue-68112, r=nikomatsakisbors-82/+162
Improve async-await/generator obligation errors in some cases Fixes #68112. This change is best read one commit at a time (I add a test at the beginning and update it in each change after). The `test2` function is a case I found while writing the test that we don't handle with this code yet. I don't attempt to fix it in this PR, but it's a good candidate for future work. r? @davidtwco, @nikomatsakis
2020-04-13Incorporate feedback into diagnosticsTyler Mandry-26/+18
2020-04-13Fix style nitsTyler Mandry-45/+37
2020-04-13Include type info when available for awaited exprTyler Mandry-6/+8
2020-04-13rustfmtTyler Mandry-26/+33
2020-04-13Don't double-annotate the same SpanTyler Mandry-1/+3
2020-04-13Use clearer message when obligation is caused by await exprTyler Mandry-34/+108
2020-04-13Use "generator" instead of "future" when appropriateTyler Mandry-16/+13
2020-04-13Don't annotate type when type is opaqueTyler Mandry-1/+6
2020-04-13Improve span labelTyler Mandry-10/+18
2020-04-13Use inner/outer generator naming instead of first/lastTyler Mandry-12/+13
I personally find this clearer.
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-7/+7
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-12Rollup merge of #71069 - marmeladema:dummy-hir-id-obligation-clause, r=eddybDylan DPC-12/+6
Remove some usage of `DUMMY_HIR_ID` Use `ObligationClause::dummy()` when appropriate or replace `hir::DUMMY_HIR_ID`by `hir::CRATE_HIR_ID`, as used in `ObligationClause::dummy()`.
2020-04-12Remove usage of `DUMMY_HIR_ID` in calls to `ObligationClause::misc`marmeladema-12/+6
Use `ObligationClause::dummy()` when appropriate or replace `hir::DUMMY_HIR_ID` by `hir::CRATE_HIR_ID`, as used in `ObligationClause::dummy()`.
2020-04-12Rollup merge of #71041 - JohnTitor:rustc-dev-guide, r=jonas-schievinkDylan DPC-2/+2
Update links of `rustc guide` Picks up the things we left behind in the transition, hopefully they're last ones. r? @spastorino
2020-04-11review commentsEsteban Küber-8/+8
2020-04-11review commentsEsteban Küber-2/+30
2020-04-11Try to use the first char in the trait name as type paramEsteban Küber-2/+2
2020-04-11Account for existing names when suggesting adding a type paramEsteban Küber-4/+5
2020-04-11Account for type params with boundsEsteban Küber-5/+6
2020-04-11review commentsEsteban Küber-92/+86
2020-04-11review commentsEsteban Küber-130/+140
2020-04-11Handle `impl Trait` where `Trait` has an assoc type with missing boundsEsteban Küber-21/+131
Fix #69638.
2020-04-12Update links of `rustc guide`Yuki Okushi-2/+2
2020-04-11Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakisbors-4/+8
Allocate some query results on an arena This avoids a cloning few `Lrc` and `Vec`s in the queries.