about summary refs log tree commit diff
path: root/src/librustc/infer
AgeCommit message (Collapse)AuthorLines
2019-04-28Fix lint findings in librustcflip1995-13/+13
2019-04-27Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoeristerbors-4/+5
Use arenas to avoid Lrc in queries #1 Based on https://github.com/rust-lang/rust/pull/59536.
2019-04-25Auto merge of #59111 - gilescope:generator-better-errors, r=nikomatsakisbors-25/+62
Improved error message when type must be bound due to generator. Fixes #58930. Keen to get some feedback - is this as minimal as we can get it or is there an existing visitor I could repurpose?
2019-04-25Update trait queriesJohn Kåre Alsaker-4/+5
2019-04-25Improved error message when type must be bound due to generator.Giles Cope-25/+62
Error now mentions type var name and span is highlighted.
2019-04-23Rollup merge of #60177 - rasendubi:rustdoc-comments, r=varkorMazdak Farrokhzad-137/+134
Promote rust comments to rustdoc
2019-04-23Rollup merge of #59823 - davidtwco:issue-54716, r=cramertjMazdak Farrokhzad-14/+10
[wg-async-await] Drop `async fn` arguments in async block Fixes #54716. This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body. ``` async fn foo(<pattern>: <type>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern>: <ty> = __arg0; } // <-- dropped as you "exit" the async block } ``` However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this. r? @cramertj cc @nikomatsakis
2019-04-22Promote rust comments to rustdocAlexey Shmalko-137/+134
2019-04-22Remove double trailing newlinesvarkor-2/+0
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-2/+2
This also fully stabilizes two-phase borrows on all editions
2019-04-21Introduce `ArgSource` for diagnostics.David Wood-14/+10
This commit introduces an `ArgSource` enum that is lowered into the HIR so that diagnostics can correctly refer to the argument pattern's original name rather than the generated pattern.
2019-04-14Rollup merge of #59735 - matklad:deadcode, r=sanxiynMazdak Farrokhzad-1/+1
remove lookup_char_pos_adj It is now exactly equivalent to lookup_char_pos.
2019-04-10Suggest removing `?` to resolve type errors.David Wood-1/+27
This commit adds a suggestion to remove the `?` from expressions if removing the `?` would resolve a type error.
2019-04-05remove lookup_char_pos_adjAleksey Kladov-1/+1
It is now exactly equivalent to lookup_char_pos.
2019-04-03Deny internal lints in librustcflip1995-11/+11
2019-04-01Refactor async fn return type loweringTaylor Cramer-20/+60
async fn now lowers directly to an existential type declaration rather than reusing the `impl Trait` return type lowering. As part of this, it lowers all argument-position elided lifetimes using the in-band-lifetimes machinery, creating fresh parameter names for each of them, using each lifetime parameter as a generic argument to the generated existential type. This doesn't currently successfully allow multiple argument-position elided lifetimes since `existential type` doesn't yet support multiple lifetimes where neither outlive the other. This requires a separate fix.
2019-03-31Suggest using anonymous lifetime in `impl Trait` return without hacksEsteban Küber-34/+13
Fallback to `static_impl_trait` for nice error message by peeking at the return type and the lifetime type. Point at the return type instead of the return expr/stmt in NLL mode.
2019-03-29Suggest using anonymous lifetime in `impl Trait` returnEsteban Küber-6/+36
2019-03-27Use Vec instead of FxHashMapvarkor-19/+20
2019-03-27Lookup region variable origin instead of choosing onevarkor-12/+16
2019-03-27Store type variable origins in InferenceFudgervarkor-6/+13
2019-03-27Use `eq_relations`varkor-10/+8
2019-03-27Add `next_int_var` and `next_float_var`varkor-6/+14
2019-03-27Simplify `fudge_inference_if_ok`varkor-19/+19
2019-03-27Add int variables and float variables to `InferenceFudger`varkor-9/+35
2019-03-27Rename `RegionFudger` to `InferenceFudger`varkor-7/+7
2019-03-27Remove `TypeVariableMap`varkor-2/+0
2019-03-27Use Ranges for vars_since_snapshotvarkor-39/+37
2019-03-27Simplify `TypeVariableTable::vars_since_snapshot`varkor-13/+4
2019-03-27Simplify `RegionConstraintCollector::vars_since_snapshot`varkor-6/+1
2019-03-27Make `vars_since_snapshot` naming consistentvarkor-12/+10
2019-03-20expand the fixmeNiko Matsakis-1/+4
2019-03-20refactor so that `relate_ty_var` can accommodate vid on a or b sideNiko Matsakis-22/+130
2019-03-20nll_relate/mod.rs: rustfmtNiko Matsakis-25/+27
2019-03-20Fix a bug in chalk unification codescalexm-2/+14
2019-03-15rustc: provide DisambiguatedDefPathData in ty::print.Eduard-Mihai Burtescu-2/+4
2019-03-15rustc: slice substs in ty::print instead of passing the full ones.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.Eduard-Mihai Burtescu-34/+34
2019-03-15rustc: don't thread existential projections through path_generic_args.Eduard-Mihai Burtescu-4/+11
2019-03-15rustc: make `pretty_path_generic_args`' task as simple as possible.Eduard-Mihai Burtescu-3/+2
2019-03-15rustc: print elided regions as '_ instead of nothing, and use a separate ↵Eduard-Mihai Burtescu-3/+7
check when optional.
2019-03-15rustc: move ty::print::PrintConfig's fields to FmtPrinter.Eduard-Mihai Burtescu-10/+5
2019-03-15rustc: make util::ppaux private.Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: don't pass Namespace explicitly, but rather track it in FmtPrinter.Eduard-Mihai Burtescu-7/+6
2019-03-15rustc: support overriding type printing in ty::print::Printer.Eduard-Mihai Burtescu-0/+8
2019-03-15rustc: support overriding region printing in ty::print::Printer.Eduard-Mihai Burtescu-0/+8
2019-03-15rustc: centralize region printing in ty::RegionKind's Print impl.Eduard-Mihai Burtescu-2/+5
2019-03-15rustc: don't keep RegionHighlightMode in a thread-local.Eduard-Mihai Burtescu-113/+142
2019-03-15rustc: pass ty::print::PrintCx by value.Eduard-Mihai Burtescu-11/+26
2019-03-15rustc: split off most of ty::print::PrintCx's fields into a separate struct.Eduard-Mihai Burtescu-2/+3